Quick clustering questions

I have EventStore installed on three locations which are geographically far from each other e.g. New York, Belarus and Japan. All of them are database nodes.

I am planning to use the following parameters below as given in the docs, where int-ip and ext-ip will be the actual ip of the machine its running on and all three machines will be given the same domain name.

EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log1 --int-ip 192.168.0.1 --ext-ip 192.168.0.1 --int-tcp-port=1111 --ext-tcp-port=1112 --int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns mydomain.com --cluster-gossip-port=2113

EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log2 --int-ip 192.168.0.2 --ext-ip 192.168.0.2 --int-tcp-port=1111 --ext-tcp-port=1112 --int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns mydomain.com --cluster-gossip-port=2113

EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log3 --int-ip 192.168.0.3 --ext-ip 192.168.0.3 --int-tcp-port=1111 --ext-tcp-port=1112 --int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns mydomain.com --cluster-gossip-port=2113

  1. Do I need to copy the *.chk files and the data folders too from New York to Belarus and Japan so that they are the same? or will they gossip and come in sync with each other automatically?

  2. Also, when one node goes down will it automatically switch to another node? and how does it decide the next node to go to?

  3. If there are multiple clients e.g. One client in Japan and one in New York who are connecting to the same domain. Will they connect to the same machine i.e New York or will they connect to the ones closer to each other. I would rather prefer them to connect to one closer to each other and then gossip and keep the data even?

  4. Is it ok if I use the same http and tcp ports as given in the parameters or is there some special setup needed?

inline

I have EventStore installed on three locations which are geographically far
from each other e.g. New York, Belarus and Japan. All of them are database
nodes.

I am planning to use the following parameters below as given in the docs,
where int-ip and ext-ip will be the actual ip of the machine its running on
and all three machines will be given the same domain name.

EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log1 --int-ip
192.168.0.1 --ext-ip 192.168.0.1 --int-tcp-port=1111 --ext-tcp-port=1112
--int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns
mydomain.com --cluster-gossip-port=2113
EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log2 --int-ip
192.168.0.2 --ext-ip 192.168.0.2 --int-tcp-port=1111 --ext-tcp-port=1112
--int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns
mydomain.com --cluster-gossip-port=2113
EventStore.ClusterNode.exe --mem-db --log c:\dbs\cluster\log3 --int-ip
192.168.0.3 --ext-ip 192.168.0.3 --int-tcp-port=1111 --ext-tcp-port=1112
--int-http-port=2113 --ext-http-port=2114 --cluster-size=3 --cluster-dns
mydomain.com --cluster-gossip-port=2113

1) Do I need to copy the *.chk files and the data folders too from New York
to Belarus and Japan so that they are the same? or will they gossip and come
in sync with each other automatically?

Not quite clear why you would be doing this? If you bring a single
node to cluster replication will handle this unless you are trying to
optimize.

2) Also, when one node goes down will it automatically switch to another
node? and how does it decide the next node to go to?

It uses gossip and the client automatically switches. It depends how
you have configured how it works either it will discover via dns
(prefered) a cluster node to gossip with or it will discover via a
list of "gossip seeds" you give the client"

3) If there are multiple clients e.g. One client in Japan and one in New
York who are connecting to the same domain. Will they connect to the same
machine i.e New York or will they connect to the ones closer to each other.
I would rather prefer them to connect to one closer to each other and then
gossip and keep the data even?

They connect to whatever node and nodes forward. Not the best for
latency but its 100% consistent.

4) Is it ok if I use the same http and tcp ports as given in the parameters
or is there some special setup needed?

--

This should be fine unless you have conflicts with something else.