Grokking Operating Systems and Networking for Backend Engineers
0% completed
TTLs, Caching and Failover
Five copies of Checkout's database client were running when the primary database stopped. Within the same second, its DNS record was changed to point at the new primary. The Python, Node.js, and Go clients reached the new database on their next attempt. The Java client, with default settings, printed this:
Output:
0.2 s 10.0.1.10 db-a answered 5.3 s 10.0.1.10 Connection refused 30.3 s 10.0.1.11 db-b answered
For 25 seconds, Java kept connecting to an address that DNS no longer returned. The record's TTL was 5 seconds, so the record itself was not the cause.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%