Auto Auto fail-over?

you can certainly do that based on a timeout. your retry can issue a replica read. however replica reads come with some downsides - for example if your timeout on the original read was due to an overloaded server (could not respond in time) and your replica was not fully caught up on replication, your replica read will end up reading stale data. As long as you are ok trading in consistency for better availability, you are in good shape in these cases.

You can avoid this situation by issues your writes with ReplicateTo flag to ensure replica is updated before you get the write ack. with that you don’t have the issue but replicateTo has a higher latency due to laws of physics. (and we don’t have a way to beat that yet :))
thanks

3 Likes