Multiple graph sessions


I just downloaded neo4j and started trying out a few things. I've the desktop app and can only start 1 graph at a time and connect via Rest. I'm just trying out Rest, but I have node.js server which will be connecting to the database.

Is there a way to connect and query different graphs at the same time?


Not with Desktop. It's designed to only have one graph online at a time.

You could install several Neo4j instances and change their port settings in their neo4j.conf files and run them at the same time.

Is there any particular reason why you need multiple separate graphs at this point in time?

I've a similar questiont to this. I mostly use Neo4j on Ubuntu, but am using it on Windows on a project. In Windows it's possible to have multiple databases all with different versions using the VERY convenient Neo4j Desktop app.

Is it possible to do something similar on linux? I've been using the same version neo4j that I used for the first of my projects for all my projects because I assumed this wasn't possible, but having seen it on Windows...

1 Like

I have a web application which lets clients create a new session to a "server node". Each session will sync some graph topology data from a server in json, store it in a db and visualize at the client. I currently use mongodb and create a new collection for each session. Recently my data set size blew up several folds due to new requirements and mongodb is not viable for me anymore. I imported some of my data into neo4j and ran some cypher queries and it looks very promising to meet my needs.

I need a way to connect to a neo4j instance and do a get_graph_instance_by_name(). It cannot be a conf file configuration, Can I create new instances dynamically via JS driver?

I have a few hundred servers and 10-50 simultaneous clients. Servers are virtual nodes, so I periodically cleanup inactive ones. There is a 1-1 server to graph instance mapping.

Hi Kumar, currently I don't believe Neo4j can support that use case.

We currently have multi-cluster, which is a separate cluster per graph, but that isn't meant for scaling or impromptu graph creation.

We are working on multi-tenancy features for the next major release, but that's looking into 2019.

Neo4j isn't designed for deployment across a massive number of servers, it's powerful enough that only a few instances are needed in a single cluster. Typically a 3-5 instance cluster is enough to support enterprise usage, though read replicas can be added for scaling read operations. Here's our causal clustering overview for review.

Hi Doug, there's a Linux version of the Desktop app, give it a try, just choose the Neo4j Desktop tab here look for the Linux download link:

Ooo thank you! Will definately check that out!

I want to use neo4j in distributed manner.
Is it possible?

Can you clarify what you mean by that?

We currently offer causal clustering for Neo4j Enterprise, will that meet your needs? If not, you'll have to be more specific on what your requirements are.

Actually I want to connect multiple graphs. So I want to know that, is there any functionality by which we can connect multiple instances of Neo4j through which we can connect multiple graphs. Because right now at a time only one graph is running by server

I've done the port configuration though it says the instance is already running at a process ID. What would make it think it's the same if the port values are different?

You can run multiple instances of Neo4j on the same box, but you will have to alter their configurations so their ports do not conflict. As for having them communicate, there are some APOC Procedures that should allow you to call into a different Neo4j instance, but really this is not a recommended approach.

If you need something to simulate multi-tenancy, you will have to do this in some other way, such as with labels for nodes under specific tenants with filtering in your queries so you only query over and return data from nodes of the tenant in question.

Looking to the future, our next major release Neo4j 4.0, which is aimed roughly at the end of 2019, should include multi-graph capability, and while this is expected to begin with shared-nothing separate graph instances that cannot interact, we are planning out richer capabilities for down the line.

Thanks for this! I found the issue to be that the 'run' directory in Linux holds a file called '' and that held my pid information incorrectly. I removed it after turning off the database and it let it start up. Though now my issue is that it won't let me connect over browser to the new instance. I have it setup to Though nothing in the browser recognizes that as a valid connection.

Though is a newly setup broadcast with a port value in that range usually dysfunctional?

Edited: Checked the firewall settings, those weren't a problem. Connection to the port seems to be the issue. Is there any problem where second instances consolidate into the first?

What deployment are you using? A tar file deployment? You aren't using ubuntu or debian are you?

Nope, we are on a red-hat enterprise setup. We built from tar files and set up two deployments of neo4j running side by side. Changed the process information for the second and the config for the broadcast ip/port to be different. They both run and curl shows both are active.

[root@-----------------------]# curl
"data" : "",
"management" : "",
"bolt" : "bolt://"
}[root@-------------------]# curl
"data" : "",
"management" : "",
"bolt" : "bolt://"

I believe it's just a network issue since the machine thinks its broadcasting it must be caught on the network.