neo4j

neo4j scheme vs bolt scheme -- what is the difference, when should I use one over the other


I am setting up a neo4j aura database

I have a choice of two schemes:

What are the similarities?

What are the differences?

connecting to an instance of neo4j hosted Aura, the user has the choice between neo4j+s and bolt+s schemes


Solution

  • Before Neo4j 4, single server instances did NOT support the neo4j scheme, they would fail returning routing information. That is not true anymore, which is why using the neo4j scheme (or its variants thereof) is usually a good default since both single instances and clusters support it.

    Using the bolt scheme in a highly dynamic cluster environment is a BAD idea. The cluster topology can change pretty quickly. For instance, the initially targeted server may change from a leader to a follower role for a given database. When that happens, the server then starts to fail serving writes for that database.

    The neo4j scheme (or its variants) avoids this problem since the driver will keep an up-to-date view of the cluster topology and route queries accordingly.

    All official drivers supports Bolt over raw TCP. The JavaScript driver also supports Bolt over Websocket. The Go driver also supports Bolt over Unix sockets.