Data persistence process is prone to errors
Last Updated on Feb 26, 2021
At first glance, data persistence sounds pretty simple: save changes from the application to the database and fetch data when requested. In reality, though, many things can go wrong in this simple handoff and retrieval.
- The database software or hardware may fail in the middle of a write operation.
- The application may crash at any time, sometimes halfway through a series of operations.
- Network issues may cut off the database and the application or one database node from another.
- Several application instances may write to the database at the same time, overwriting each other's changes.
- A client may read data that has only been partially updated.
Most of the effort in improving database reliability and availability is spent thinking about these issues and safeguarding against them.
Moreover, solutions to these issues depend on the target scale of an application. Implementations that would suffice under nominal user load, for example, would outright fail under conditions of high contention. So ensuring database availability and reliability is a tailored activity for every application.