Article DetailsDetailsHelp DetailsYou may encounter this error in your application logs when trying to connect to Neo4j Cluster deployed on Kubernetes behind a load balancer. Failed to connect to Neo4j: Failed to obtain connection towards 'WRITE' server. This error is due to the fact that load balancer distributes the incoming requests to different pods in the cluster. When the WRITE request is sent to a FOLLOWER in the cluster then the error is observed in the client application logs because the FOLLOWER cannot process the WRITE requests. To overcome this default behaviour, a configuration has to be made in the neo4j.conf so that the Neo4j Server can route the WRITE requests to the LEADER/WRITER instance in the cluster. By default, CLIENT side routing is enabled. Server Side Routing can be enabled by adding the below configuration in the values.yaml file for all the pods in the cluster - dbms.routing.enabled=truedbms.routing.default_router=SERVER References - https://neo4j.com/docs/operations-manual/current/clustering/setup/routing/#clustering-routinghttps://neo4j.com/docs/operations-manual/current/configuration/configuration-settings/#config_dbms.routing.default_routerInformationTitleFailed to obtain connection towards 'WRITE' server in K8s ClusterArticle Created Date12/24/2024, 7:18 AMURL NameFailed-to-obtain-connection-towards-WRITE-server-in-K8s-ClusterLast Modified Date12/30/2024, 2:10 AM