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?