Re:Monitoring Elixir Apps on Fly.io with Prometheus and PromEx
by mrkurt on Thursday July 01, 2021 @06:13PM
(#27705544)
That's our answer, yes. Read replicas and we redirect requests that need writes to a "primary" region: https://fly.io/blog/globally-distributed-postgres/
We tried cross region database calls for HTTP requests. They were bad. They seem to work ok for long lived connections like websockets, though.
Re:Monitoring Elixir Apps on Fly.io with Prometheus and PromEx
by lawik on Friday July 02, 2021 @07:37AM
(#27710193)
Using something like CockroachDB you should be able to avoid the single-writer situation. It has it's own complexities I'm sure but seems very compelling.
Re:Monitoring Elixir Apps on Fly.io with Prometheus and PromEx
by matthewcford on Friday July 02, 2021 @11:55AM
(#27713129)
Would need to commercial licence for this to work though
I understand you can put your application server in any location but generally there is only one storage so are these application servers doing cross region database calls?
Having only worked with single cluster setup web apps, I am always curious about this part.
Is the answer always - use a managed replicated database and send read queries to one near your location and all write queries goes to the primary instance?