When something fails, what's going to happen?
This is the key question of any deployment, because it matters. Consider applications like WhatsApp; if they go down, even for a minute, then the user base is going to go crazy. With your application, too, if the system fails, then you are going to lose users but, more importantly, you are also going to lose your reputation.
Cosmos DB is a managed database provider and I believe that they care about failover a lot. There are generally two ways to handle failover:
- Automatic failover
- Manual failover
Let's discuss each of them.
In rare cases of a system outage, automatic failover tries to recover and reassign the traffic to the existing regions. There are generally two cases where this applies:
- Read region failover
- Write region failover
If any read regions fails, Cosmos DB automatically marks them offline, in order to avoid any existing traffic trying to route to that region (to avoid 404 and 502 errors), and, using the...