Examples
This page provides configuration examples for common Neo4j deployment scenarios. Each scenario adds one or more deployment entries to your config.yaml. For the minimal required configuration, see Configuration → Minimal example.
Neo4j GDS (Graph Data Science) cluster
When running Neo4j with Graph Data Science in a cluster, queries should be directed to a secondary to avoid impacting the write leader. Add a deployment entry that points to the secondary’s address:
neo4jDeployments:
gdscluster:
name: "GDS Cluster (Read Replica)"
uri: neo4j://read-replica-host:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin
- role: studioCreator
members:
- kind: databaseRole
name: analyst
To enable data ingestion and database writes, add the write-enabled primary as a separate deployment:
neo4jDeployments:
gdscluster:
name: "GDS Cluster (Read Replica)"
uri: neo4j://read-replica-host:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin
- role: studioCreator
members:
- kind: databaseRole
name: analyst
gdsleader:
name: "GDS Cluster (Leader)"
uri: neo4j://leader-host:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin
Neo4j Infinigraph
To connect Enterprise Studio to an Infinigraph deployment, add a deployment entry pointing to the Infinigraph endpoint:
neo4jDeployments:
infinigraph:
name: "Infinigraph"
uri: neo4j://infinigraph-host:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin
- role: studioCreator
members:
- kind: databaseRole
name: editor
Multiple deployments
You can configure as many deployments as needed. Users will see all configured deployments in the connection bar and can switch between them.
neo4jDeployments:
production:
name: "Production"
uri: neo4j://prod-host:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin
gdsreadreplica:
name: "GDS (Read Replica)"
uri: neo4j://gds-replica:7687
authorization:
roleMapping:
- role: studioCreator
members:
- kind: databaseRole
name: analyst
infinigraph:
name: "Infinigraph"
uri: neo4j://infinigraph:7687
authorization:
roleMapping:
- role: studioAdmin
members:
- kind: databaseRole
name: admin