[openstreetmap/openstreetmap-website] Use database replicas for read requests (#2634)

Andy Allan notifications at github.com
Wed Jun 3 08:39:45 UTC 2020


> Is this a „because we can“ type of thing

For me, mostly yes. It's really easy to switch in rails, and we already have cgimap reading from replica databases so it seems to make sense for other read-only things to come from the replicas too. And even if karm isn't loaded today, our master databases are still really stonkingly expensive servers, so scaling reads without having to scale the primary database will come in useful at some point (e.g. maybe save a few euro on the cost of the next generation master db).

The rabbit hole with the code refactoring is one of our own making, really, rather than being directly related to the database switching. But over the years I've found that fixing some aspects (e.g. bringing our controller tests up to date) often comes in useful in other situations further down the road. So I'm not concerned if the amount of work here seems disproportionate to the matter at hand.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2634#issuecomment-638050790
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200603/b73c71fa/attachment.htm>


More information about the rails-dev mailing list