5 ms·
Can't you put a load balancer in front of several elixir servers? So that the load balancer can point you to whichever is closest. Then just share the database
by ecmascript 6y ago
Can't you put a load balancer in front of several elixir servers? So that the load balancer can point you to whichever is closest.
Then just share the database connection between these elixir servers.
- Existenceblinks 6y agoNot straightforward as it sounds. Where is a center for all of those nodes? The edge server part is easy with Fly.io, but distributed "problem" and latency are still not great for realtime application selling worldwide. The latency between the edge servers and the database server will give you bad UX with current "mount/3 gets called twice" strategy. Going from edge to db twice is really bad in my experience. Now you would think about adding read-only postgresql nodes on at least 3 nodes (US, EU, and Asia), $$$$.