1

I am working on a web application which is going to have billions of graphs each of size not more than 500 nodes. I'm trying to use Neo4j to store all my graph data. I have been doing research on how Neo4j can be scaled to achieve my purpose. After a lot of research I seek help from SO for the issues I am not clear about. Please excuse me if my issues are already on Internet and I was unable to figure them out.

  1. All my graphs are small and disconnected. So dividing them horizontally is not a problem for me. But I didn't find anywhere on Internet on how I can create more than one Neo4j database (NOT instance) to support my web application. Is there any way to do that? If it is not possible, is it going to be included in near future? EDIT: As mentioned in comments below I've used labeling to identify small graphs in my DB but every article related to horizontal sharding speaks about dividing the graph optimally and storing them in seperate databases. As of now I hardcode the db path '/data/graph.db' in neo4j-server.properties during configuration. Is there a way that I can hardcode two paths like that for 2 different dbs and on the fly decide which one to connect to?

  2. For a single graph database, I read about Cache Sharding and HA clustering combination to achieve high performance. All articles mention that every database instance can handle many requests. Could anyone give me approximate number of requests each database instance (slave of HA cluster) can handle as of now and if its going to be increased in near future?

The graph is sole of my web product and I would like to achieve the highest performance possible. Please help me better understand Neo4j to see if it suits my purpose. Any suggestions on other databases which would serve my purpose are most welcome. Thank you for your patience! :)

2 Answers 2

1

I can answer 1. The idea of independent graphs or graph islands within a neo4j db can be implemented using lables starting Neo4j 2.0.

1
  • 1
    Neo4j 2.0 has implemented many new features that helped me in achieving the requirements. The Neo4j labels lets you uniquely identify nodes of a particular type. While the legacy indexing (indexing on the db schema) still remains, Neo4j feature of being able to index on a particular property on a particular label (introduced in 2.0) has increased the RTO cypher query results significantly proving labellling is the right approach for my issue in Q1. And as per Q2 it highly depends on your architecture as Peter Neubauer pointed out in the answer below! Thank you for the help! :) May 20, 2016 at 7:07
0

For 2), it highly depends on the type of queries and weather you can cache reads or not. Normally, you would set up an HA cluster, and direct queries of the same data vicinity to the same cluster nodes, thereby hitting warm caches. Do you have more details about your domain, data volume etc?

1
  • My database will have billions of user nodes who have their own small graphs of 500 nodes each. I am looking at separating out user nodes and their respective graphs into two databases as a solution to scaling. As a users local data is present in a single db, I can take the advantage of warm caches. I would like to know how many db connections each of these db instances would support at a time and the possible method of accessing two Neo4j dbs and firing queries to a particular db decided at run-time. Any pointers would be really helpful. Thank you Aug 2, 2013 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.