Database load balancer should stick to the primary less aggressively
Currently when we perform a write we will stick to the primary for the duration of the request. In many cases the writes are replicated very quickly, putting unnecessary pressure on the primary. To work around this we could do the following:
- Perform the write
- On the next read-only query, check if all secondaries are in-sync. If so we will read from the secondary.
- If the secondaries are not in sync we'll read from the primary as usual