1

We have a neo4j 3.1 causal cluster with three core nodes.
We are using the PHP graphaware driver (we have already an existing codebase in PHP, switching to another language at this time is not really feasible)
This is how we connect:

   $neo4j  = ClientBuilder::create()
            ->addConnection('bolt+routing', 'bolt://user:pswd@ip:7687')
            ->setDefaultTimeout(99)
            ->build();

I can read from the cluster no problem.
Writes are the problem, if the ip provided is not the leader then writes fail. (Leaders do change, among the three-core nodes)

Does the PHP graphaware driver have support for causal clustering?

Albert S
  • 2,552
  • 1
  • 22
  • 28

1 Answers1

2

For the time being you should be able to implement a simple routing yourself by using the cluster monitoring procedures and creating a new driver for writes/read-bolt-URLs if the routing table changes.

https://neo4j.com/docs/operations-manual/current/monitoring/causal-cluster/

There are also some routing endpoints that can help you with a TCP load balancer:

/db/manage/server/core/available
/db/manage/server/core/writable
/db/manage/server/read-replica/available
Michael Hunger
  • 41,339
  • 3
  • 57
  • 80