0

We have a Socket.io service that needs constant communication with Mongodb. We currently have a load balancer server, 16 containers in a server (due to nodejs being single threaded, we split processes by dockers so we can utilize entire server) and a MongoDB server.

We aren't in production yet so we didn't create a replication system. But we have a problem.

Our servers are located in Europe. When I measure the latency between South America (We have lots of clients over there) and Europe, it measures around 200 ms. That might be a problem for us. If we create a socket server in South America, then our socket server and database server will have latency issues.

Any idea on how to distribute them globally?

Dave M
  • 4,494
  • 21
  • 30
  • 30
Ümit Yayla
  • 11
  • 1
  • 4
  • Will your application actually *have* latency issues, or is that an assumption? – ceejayoz Jun 20 '19 at 13:29
  • it's an assumption. @ceejayoz – Ümit Yayla Jun 21 '19 at 09:11
  • You should verify that assumption first, then. This adds an enormous amount of complexity to your application, and there's a very good chance your app will work fine with the latency. Consider instead "optimistic updates" - have your app reflect the update immediately, and roll it back only if the failure comes back in ~200ms. – ceejayoz Jun 21 '19 at 13:06

0 Answers0