Different ways of running a [[Neo4j]] database in production.
Options to consider:
- Fully managed:
- Neo4j Aura (managed hosted PaaS)
- Neo4j [Sandbox](https://neo4j.com/sandbox/). Free option.
- [GrapheneDB](https://www.graphenedb.com)
- Self-managed:
- [[AWS EC2]]:
- [Community edition neoj4 AMI on Marketplace](https://aws.amazon.com/marketplace/pp/B071P26C9D#pdp-pricing))
## Neo4j Aura
[Neo4j Aura](https://neo4j.com/cloud/aura/?ref=menu) is available directly from Neo4j.com or on [[GCP]]. Hourly [pricing](https://neo4j.com/cloud/aura/pricing/) based on instance size, starting at $65/mo for a 1GB RAM, 1CPU storage.
![[Neo4jAura-Pricing.png]]
Pros:
- No upfront config or network config required. Just provision a new database via pointing and clicking in the browser
- Automated scheduled backups
- No patching of servers required
- Provided by Neo4j’s parent company
Cons:
- Custom stored procedures aren’t supported in the Professional Edition, only the Enterprise one. While the APOC plugin comes preinstalled, other plugins you might want to use such as “Graph Data Science Library” don’t seem to be available. This is possibly a deal breaker.
- Unknown what level of service and support you get from Aura. This looks like a pretty new service (General Availability only [announced in August 2020](https://neo4j.com/blog/announcing-neo4j-aura-on-google-cloud-platform/)) and I couldn’t find any reviews from existing customers online.
- Given Aura is hosted inside Google Cloud Platform data center and the rest of the ContentGraph application is inside AWS, there will be a small latency going from AWS data center to GCP.
- Runs on multi-tenant servers so you could be sharing with other Neo4j customers which can cause unpredictable performance issues.
## [[GrapheneDB]]
![[GrapheneDB Pricing.png]]
Pros:
- Runs in AWS so low latency
- No upfront config or network config required. Just provision a new database via pointing and clicking in the browser
- Automated scheduled backups
- No patching of servers required
- Runs on a dedicated server
- Website claim: “No one currently manages more graph databases in the cloud than GrapheneDB.”
- [Supports plugins and other extensions](https://docs.graphenedb.com/docs/extensions) via the Admin UI
- Free trial for 14 days
- New startups can get a 10% discount
- More mature service than Aura as it has been running since 2013
- Supports multiple databases within the same account
Cons:
- Unclear if there are any limitations on other features that you may need
- Can’t shutdown a database when you’re not using it
## Neo4j on AWS EC2
This involves spinning up an [[AWS EC2|EC2]] “instance” (AKA a Virtual Machine) and installing the Community Edition of Neo4j on it. Prebuilt machine images with this installed on it are available on the AWS Marketplace (e.g. [here](https://aws.amazon.com/marketplace/pp/Neo4j-Neo4j-Graph-Database-Community-Edition/B071P26C9D#pdp-usage)).
Pros:
- You have full control over what version and features of neo4j to install (plugins, stored procedures, etc)
- Very low latency between Apollo server (inside AWS Lambda) and neo4j database as they’re in the same data center.
- You have the option of turning off an EC2 instance when you’re not using it to save on costs
Cons:
- Requires much more infrastructure knowledge — A LOT of upfront setup is needed to configure the EC2 instance inside the VPC (Virtual Private Cloud), SSL, and other network configuration to make sure it’s secure and accessible
- The EC2 instance will need to be regularly patched with latest operating system and neo4j updates
- You need to write your own backup code (and test the backups are restorable)
---
## Resources:
- https://www.reddit.com/r/Neo4j/comments/i7x9hy/looking_for_recommendations_for_managed_neo4j/
---
tags: