1

I have a single server at my disposal, and on this same server I need to employ two seperate Neo4J instances (a test instance and a production instance). I know I can have a single instance with several databases as mentioned in this answer, however, I would like Chinese walls between my test and production database (and they may not be configured exactly the same), and so two seperate instances are required. I know I can use different ports for the the two instances so bolt://neo4j.mydomain.com:7687 maps to the one instance, and bolt://neo4j.mydomain.com:7688 maps to the other. This works fine - but is it possible to have the two instances on the same port but at a different URI? So for example bolt://neo4j-prod.mydomain.com:7687 maps to one instance and bolt://neo4j-test.mydomain.com:7687 maps to the other? This is very common for web servers by using the hostname requested, so I would think it should be simple to do the same for other ressources even if they do not use the HTTP protocol. What I don't like about the double port solution is that it is very easy to forget which is test and which is production, and explicit is better than implicit.

user787267
  • 2,550
  • 1
  • 23
  • 32

1 Answers1

0

I do not believe you can do this directly with Neo4j, but I'd be interested in hearing about it, if it is.

It should be possible to have a server in front of neo4j that makes it "appear to users" as you suggested by remapping/redirecting incoming connections... (Note: and neo4j still runs on different ports on it's server)

plastic
  • 121
  • 6
  • It can be done: https://neo4j.com/developer/kb/hosting-multiple-neo4j-instances-on-one-machine-2/ But it is not advised. – Blake G Dec 06 '20 at 05:38
  • We tried with a few common reverse proxies, but have found that these are incompatible with the low-level Neo4J Bolt protocol. – user787267 Dec 07 '20 at 09:05