Open LewisCarey2 opened 4 years ago
We do not recommend using Load Balancers in front of ESDB. ESDB internally supports load balancing based on the Node Preferences. Depending on the node preferences and configuration of the ELB the result may be unpredictable. E.g. the load balancer may keep the sticky connection to the node, or if you're not using the default leader preference then ESDB may select a different node than the previous one.
Describe the bug Using the Create() method for connecting to Event Store cluster via a load balancer in conjunction with Node Preference settings results in inconsistent connectivity behaviour. If the client lands on the preferred node during the initial connection through the ELB, the client will remain connected to that node through the ELB. If the client does not land on it's preferred node, it will reconnect directly to the prefered node. The result is some clients connected through the ELB and some connected directly to nodes.
Expected behavior The behaviour should be consistent - either always through the load balancer or directly to a node.
Related to EventStore/EventStoreDB-Client-Dotnet-Legacy#32 - this issue happens when our clients have connected over load balancer via the Create() method.