4 ms·
I think there's a stateful load balancer polling every replica "By routing read operations only to replicas that are caught up enough to run them accurately"
by dustingetz 9y ago
I think there's a stateful load balancer polling every replica
"By routing read operations only to replicas that are caught up enough to run them accurately"
"To save every api process from having to reach out and check on the replication status of every replica for itself, we’ll have a process called an observer that periodically refreshes the state of every replica and stores it to a Postgres table. ... Keep in mind that this status information could really go anywhere. If we have Redis available, we could put it in there for fast access"
"The observer runs in a loop, and executes something like this on every iteration"
Also, "The technique is inspired by GitLab’s article on scaling their database, where they refer to it as 'sticky connections'"