Load balance with .NET EventStore.Client (4.0.0 version)


There are two cluster configurations:

  • PerformOnAnyNode(). This is old. Description: Allow for writes to be forwarded and read requests to be served locally if the current node is not master.
  • PreferRandomNode() which was introduced in 3.9.5 version. Description: The client can now be configured to randomly select a node in the cluster instead of preferring master. This can help spread the load, specifically around reads for clients connecting to a cluster.

I have some questions:

  1. PerformOnAnyNode
  2. is affected only write operations or r/w?
  3. is best practices? In which cases I have to use this option? What problems can I have
  4. PreferRandomNode
  5. is affected only read operations or r/w?
  6. Can these configurations work separately or together?
  7. What are the best practices to load balance between cluster nodes?