Neo4j node and relationship size on a single instance

634 Views Asked by At

I started my pet project - this is a decision-making system. The project is built on different technologies but Neo4j is the main database and the core of it. I use Spring Data Neo4j 5 together with Spring Boot 2 in order to work with Neo4j.

I use Neo4j Community Edition 3.3.0

My project is a universal application that can store and compare the decisions(Neo4j nodes) of any nature and domain. Everything that can be compared and filtered can be stored and presented there.

Right now I'm testing my solution on cryptocurrencies - http://decisionwanted.com/decisions/1/blockchain/categories/cryptocurrency/comparison/5a49e8a3f2ee40361037c56c

While I'm working on the bug fixing and feature activation on the UI(right now it contains a ton of bugs and ~70% of UI features are not activated yet) I noticed that the amount of data inside of Neo4j database is dramatically increased because I'm collecting the history for every value, for example, here http://decisionwanted.com/decisions/2/bitcoin I'm collecting the historical values for

Price (USD)
Available Supply
Total Supply
Change 1h (%)
Change 24h (%)
Change 7d (%)
Market Cap (USD)
Volume 24h (USD)

Right now the system adds ~2-3 million of a new node every day.

This is the current state of my Neo4j database(the system works only a few days)

MATCH(n) RETURN count(n)

8288217

enter image description here

Right now I'm wondering how many nodes and relationships Neo4j can hold on a single instance(one physical server) for a normal work and what is the point when my application will face the issue with a data storage. Please advise.

1

There are 1 best solutions below

1
On BEST ANSWER

The community edition has a limit of 64 billions nodes and 64 billions relationships, at the current pace your db will reach this limit in approximately 58 years.

Let's say you will be pro-active and set yourself a deadline being 32 billions so it will give you about 29 years.

What can happen till then :

  • You will never reach 2 billions because your girlfriend would have destroyed your laptop after coding too much
  • US and North Korea presidents will make so that you will never reach this timeline though
  • Neo4j's founder, Emil Efrem, will close Neo4j to start Frogrom's to beat its all time Swedish competitor Krisprolls.

So, in a more serious way, if you do not need the historical data after a while, you can send it in a historical storage system, like ES dynamic indexes or whatever. Neo4j is fast at traversing relationships, it is generally unusual to have to traverse long historical data.