Back to Anthony Eden - Making Business Look Simple, with Anthony Eden.
How Did Postgres Copies Cut Australia's Hour-long Reload?
On IndieRails, a name server in Australia could take almost an hour to reload because it connected to the core database and pulled all the zone data, while the same reload in Chicago took four minutes. Replicating zone data to each edge brought a full reload down to four minutes, and the edges now finish together.
Stock tools were tried early and did not work well across a large spread of systems or at the needed speed. The design still running today keeps the core application in Rails with a Postgres database behind it. A zone change sends a notification through a small Go application that lives at each edge, and the Go application fans that notification out to the name servers, which are written in Erlang. The name servers can reach back and ask for any changes missing from the payload. A portion of the Postgres database is replicated to the edges as well. Each edge holds a full copy of the zone data and reads it locally, so a full reload of an edge is expected to take four minutes.
Anthony Eden - Making Business Look Simple ·
From the transcript
So there were not, so we've tried things early with stock tools, but we found that, that when you deal with that larger type of distribution of systems, it, some of those things don't work as well as you would like them to or at the speed you would like them to, and, and can be a strategic advantage to be able to do something fast. So what we ended up doing, and we still run this design today, is we have, sort of our core application written in Rails with a Postgres database that backs it.
And when we want to deploy changes of a zone to our edges, that notification goes out through a little Go application that lives in, like we have those living at each of our edges, and then that fans out the notification to all of our name servers, which are written in Erlang. And then those name servers can reach back and say, give me the, the changes that I need if they're not in the payload.