Answer the question
In order to leave comments, you need to log in
How to design a fault-tolerant solution for an application with an unstable database?
Good day everyone.
I have the following case:
there is an application in which the user performs certain actions that lead to changes in the database.
The database may be unavailable for several seconds (2-3 s) several times a day, while user actions should be processed correctly during this time.
Application on ASP.NET MVC + EF, MSSQL database
I am looking for beautiful practices for working with a similar case.
Answer the question
In order to leave comments, you need to log in
add to the local cache and then deploy to the database, or give the user that it was not possible to connect to the database and ask to try again?
Your approach is wrong. If you have shown the user that the data has been saved, then it should be saved. And then they will scold you for a long time "I saved it, then closed it, but it was not updated!".
In a good way, make sure that the request is wrapped in a transaction and repeat it until it completes successfully, showing pending states. It is possible not to block the application, but to accumulate changes in some kind of queue
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question