Hi all,
Our team want to improve application’s availability by balance the load to different instances of EventStore cluster. our application use secure tcp connections to persist events into EventStore using single instance of IEventStoreConnection
.
It seems we have two approaches to do the load balance.
- EventStore.ClientAPI
var clusterSettings = ClusterSettings
.Create()
.DiscoverClusterViaGossipSeeds()
.SetGossipSeedEndPoints(gossipSeeds);
var connectionSettingsBuilder = ConnectionSettings
.Create()
.PerformOnAnyNode()
By setting the gossip seed of EventStore cluster, ClientAPI will be able to discover the health status of each EventStore instance and choose the best one to accept coming tcp request. Even if one of the instance is in the status of outage, application can still write events.
- EventStore cluster behind load balancer (f5)
By creating a pool contains all the listening secure tcp port of each EventStore instance, Application will only talk to f5. f5 will be responsible for managing the health status by telnet
secure tcp port of each instance.
On this case, It would be much easier to add new EventStore instance into cluster without changing all the application configurations.
We would like to know which approach is recommended to do the load balance? Is there any risk for the second approach?
We are looking forward for your suggestions and advice.
Thanks