I am setting up a neo4j aura database
I have a choice of two schemes:
neo4j+s://
bolt+s://
What are the similarities?
ssc
(self signed certificate) variationWhat are the differences?
neo4j
scheme has "routing" whereas bolt
does not
bolt+routing
schemebolt
say it is a "binary protocol over persistent TCP" suggesting it is "high-performance", is it better than neo4j scheme then?
neo4j://
scheme replaces bolt+routing://
and can be used for both clustered and single-instance configurations..."bolt+routing
is the ancestor of the neo4j
scheme, in the 3.x version of Neo4j (where the +s
and +ssc
were specified through explicit configuration, not through the scheme)neo4j
, neo4j+s
, neo4j+ssc
imply (client-side) routing, the driver will regularly fetch routing information (initially from the target server) and route further queries appropriatelybolt
, bolt+s
, bolt+ssc
means direct connection to the target serverBefore 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.