socketcluster icon indicating copy to clipboard operation
socketcluster copied to clipboard

Multi data center / region cluster

Open RJPhillips01 opened this issue 6 years ago • 0 comments

Hello, we are looking to use socketcluster & pubsub for a new project and need to ensure the lowest latency data delivery possible. We would like to understand whether the following is possible and perhaps even default or configurable behaviour:

1 - when a client connects are they always connected to the closest server / node to them geographically, or would there need to be some load balancer that routes the client based on their location or perhaps some sort of preset preference? ie client connects, we know their location is Chicago so we connect them to our US SocketCluster nodes.

For example - if we had 9 servers making up the cluster spread across 3 regions (A,B & C). Could a client located in region A be connected into the servers located in region A?

2 - Similar question for publication:

So using our previous example, if I have data being generated in region C can I ensure that it is published into the SocketCluster servers in the same region and then distributed to any subscribed clients in region C immediately?

We want to ensure that data we publish into the SocketCluster travels the minimum distance to get to a connected client - so if we generate data on servers in, say Germany, we'd want to publish to the Global SocketCluster via nodes located in Europe. If we then have a client, say in France, subscribed to the relevant channel then we don't want the client to have to wait for data to be propagated across the cluster before they receive it. We would want that client to be connected into the European SocketCluster servers so that they receive the data as fast as possible.

That same data would then be propagated across the cluster to any other clients who may be subscribed to the channel and connected to their local SocketCluster servers.

Thanks very much, Rich.

RJPhillips01 avatar Sep 14 '19 10:09 RJPhillips01