Configuring SSL

The Neo4j SSL Framework can be used with Neo4j Helm charts. You can specify SSL policy objects for bolt, https, cluster, and backup. SSL public certificates and private keys to use with a Neo4j Helm deployment must be stored in Kubernetes Secrets.

To enable Neo4j SSL policies, configure the ssl.<policy name> object in the Neo4j Helm deployment’s values.yaml file to reference the Kubernetes Secrets containing the SSL certificates and keys to use. This example shows how to configure the bolt SSL policy:

ssl:
 bolt:
   privateKey:
     secretName: bolt-cert
     subPath: private.key
   publicCertificate:
     secretName: bolt-cert
     subPath: public.crt

When a private key is specified in the values.yaml file, the Neo4j ssl policy is enabled automatically. To disable a policy, add dbms.ssl.policy.{{ $name }}.enabled: "false" to the config object.

Unencrypted http is not disabled automatically when https is enabled. If https is enabled, add server.http.enabled: "false" to the config object to disable http.

For more information on configuring SSL policies, see SSL configuration.

The following examples show how to deploy a Neo4j cluster with configured SSL policies.

Create a self-signed certificate

If you do not have a self-signed certificate to use, follow the steps to create one:

  1. Create a new folder for the self-signed certificate. This example uses the /neo4j-ssl folder.

    mkdir neo4j-ssl
    cd neo4j-ssl
  2. Create the private.key and public.crt for the self-signed certificate by using the openssl command and passing all the values in the subj argument:

    openssl req -newkey rsa:2048 -nodes -keyout private.key -x509 -days 365 -out public.crt -subj "/C=GB/ST=London/L=London/O=Neo4j/OU=IT Department"
  3. Verify that the private.key and public.crt files are created:

    ls -lst
    Example output
    -rw-r--r--  1 user  staff  1679  28 Dec 15:00 private.key
    -rw-r--r--  1 user  staff  1679  28 Dec 15:00 public.crt

Create a neo4j namespace and configure it to be used in the current context

kubectl create namespace neo4j
kubectl config set-context --current --namespace=neo4j

Configure an SSL policy using a tls Kubernetes secret

This example shows how to configure an SSL policy for intra-cluster communication using a self-signed certificate stored in a tls Kubernetes secret.

  1. Create a Kubernetes TSL secret using the public.crt and private.key files:

    You must have a Kubernetes cluster running and the kubectl command installed. For more information, see Prerequisites.
    1. To create a TLS secret, use the tls option and a secret name, e.g., neo4j-tls:

      kubectl create secret tls neo4j-tls --cert=/path/to/neo4j-ssl/public.crt --key=/path/to/neo4j-ssl/private.key
    2. Verify that the secret is created:

      kubectl get secret
      Example output
      NAME                  TYPE                                  DATA   AGE
      neo4j-tls             kubernetes.io/tls                     2      4s
    3. Verify that the secret contains the public.crt and private.key files:

      kubectl get secret neo4j-tls -o yaml
      Example output
      apiVersion: v1
      data:
        tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURLakNDQWhJQ0NRRGRYYVg1Y29mczdEQU5CZ2txaGtpRzl3MEJBUXNGQURCWE1Rc3dDUVlEVlFRR0V3SkgKUWpFUE1BMEdBMVVFQ0F3R1RHOXVaRzl1TVE4d0RRWURWUVFIREFaTWIyNWtiMjR4RGpBTUJnTlZCQW9NQlU1bApielJxTVJZd0ZBWURWUVFMREExSlZDQkVaWEJoY25SdFpXNTBNQjRYRFRJeU1USXlPREl4TURjeU5sb1hEVEl6Ck1USXlPREl4TURjeU5sb3dWekVMTUFrR0ExVUVCaE1DUjBJeER6QU5CZ05WQkFnTUJreHZibVJ2YmpFUE1BMEcKQTFVRUJ3d0dURzl1Wkc5dU1RNHdEQVlEVlFRS0RBVk9aVzgwYWpFV01CUUdBMVVFQ3d3TlNWUWdSR1Z3WVhKMApiV1Z1ZERDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTDBRc0c2Ukwrd3hxZSt3CjJGSWljZldVaUFtdmNqeVdlS0lKaThuT2tBSGIvSTYzUUU2L3ZpR3RNeEI3S28xdUJLNlVPZXBaeU91UzE2bUMKaitpMDAwbmFnWkR3RGNyRXd3UUE1cTBGMC90VXB5UHBaL1p3clhEaGFDOXhzVnFnVms0TXl5aUtTNzRIOUc2UgprUUV4dHBaNFArcTlaRHVFVk1KVGVaL2pQNGZoTkg2MUpSTVdORTJ3NjNUWkx2ZGMyUitXL2U5N3h2TGQ5Y0FnCjlqTm9FMHo5UHRmczB2L2lyUGhuUHpzWHQ5bzE0MWlnOVFZ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GhBTlYKNVZPckk5SFhnVTRMSElVMmNwVVZxYVo3N1J1b2JnTmlDenBmOVZPVkNadzdmQzRPYkFqcTMzQ3RtT2taR0hRbAo2dkJtNm1ubFZ3S0JnQ2FnOW95TUplZjA3TGtXcExTQ1ovN1FHRDRLMmJFMGtHVzVEOFFZL1ZHNEZkS1JKbVRkCmQ2WTJZUjJ2cEpheFJ2TDlGQ3BwYncyKzkvL0pHWlJGd0p4dEdoS09oWTNjVUF6ZE9BRnNJVm0vNkFNa1JLdC8KWFNEU0ppc1VXb2hMRXFVM3lpNWcveGh6WVppVHM2MmhKMFZQNGhOVFhPQWw5aDUvVEE4UlFqc05Bb0dBTm84Twp5R2xuTGJrOWVMZGZwK2NmK3ltQS9DNVloellNdW9aQ1pkc3hMR0JLSFRXOXZJeHRPZFFJL0JuNGM5cWhEMWt1CjgrR0F5aXdVeUNXTFRxWGdEa0lNTlN5dUQyVnlsRXpPY1MzSkxQTkVPNEVpVnlnUTdGMCtud3R2cWh1anNUUzcKeGd5Qks5Z3ZodHU3d3VHNXhHc0dDTDZkY2xEU0RYbERwSHJTVmpFQ2dZQWx0STNjMzJxaG5KU2xHSGhjdW1wRwpReGpvYnJBUUxUa3dyOWk2TkNuS0EyNVR1SVFXa1NiN2JUWWtuUi80WDhOT2w2U2EvYm9QK2dncWNJM0haSk05CkxJRnpPUTFWT1luQ2ZYZVd0SmlHQklwUExadFdobnA3NGVhdmJKYW9udlhVVGNZcm5qcytIWGhpaFhjOUhENWsKeEJEaWJKYUlEbXg2T1FpVWI2RndJZz09Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
      kind: Secret
      metadata:
        creationTimestamp: "2023-01-04T13:53:14Z"
        managedFields:
        - apiVersion: v1
          fieldsType: FieldsV1
          fieldsV1:
            f:data:
              .: {}
              f:tls.crt: {}
              f:tls.key: {}
            f:type: {}
          manager: kubectl
          operation: Update
          time: "2023-01-04T13:53:14Z"
        name: neo4j-tls
        namespace: neo4j
        resourceVersion: "212009"
        uid: b1be45dd-4cbe-41c9-a6e5-c814c5e39c25
      type: kubernetes.io/tls
  2. Configure ssl object in the ssl-values.yaml file using the created secret:

    ssl:
    # setting per "connector" matching neo4j config
      bolt:
        privateKey:
          secretName: neo4j-tls
          subPath: tls.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: tls.crt
      https:
        privateKey:
          secretName: neo4j-tls
          subPath: tls.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: tls.crt
        trustedCerts:
          sources:
          - secret:
              name: neo4j-tls
              items:
              - key: tls.crt
                path: public.crt
      cluster:
        privateKey:
          secretName: neo4j-tls
          subPath: tls.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: tls.crt
        trustedCerts:
          sources:
          - secret:
              name: neo4j-tls
              items:
              - key: tls.crt
                path: public.crt
        revokedCerts:
          sources: [ ]

Now you are ready to deploy the Neo4j cluster using the configured ssl-values.yaml file and the Neo4j Helm charts.

Configure an SSL policy using a generic Kubernetes secret

This example shows how to configure an SSL policy for intra-cluster communication using a self-signed certificate stored in a generic Kubernetes secret.

  1. Create a Kubernetes generic secret using the public.crt and private.key files:

    You must have a Kubernetes cluster running and the kubectl command installed. For more information, see Prerequisites.
    1. Get the Base64-encoded value of your public.crt and private.key:

      cat public.crt| base64
      cat private.key| base64
    2. Using the Base64-encoded values of your public.crt and private.key, create a secret.yaml file:

      apiVersion: v1
      data:
        public.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURLakNDQWhJQ0NRRGRYYVg1Y29mczdEQU5CZ2txaGtpRzl3MEJBUXNGQURCWE1Rc3dDUVlEVlFRR0V3SkgKUWpFUE1BMEdBMVVFQ0F3R1RHOXVaRzl1TVE4d0RRWURWUVFIREFaTWIyNWtiMjR4RGpBTUJnTlZCQW9NQlU1bApielJxTVJZd0ZBWURWUVFMREExSlZDQkVaWEJoY25SdFpXNTBNQjRYRFRJeU1USXlPREl4TURjeU5sb1hEVEl6Ck1USXlPREl4TURjeU5s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TkVPNEVpVnlnUTdGMCtud3R2cWh1anNUUzcKeGd5Qks5Z3ZodHU3d3VHNXhHc0dDTDZkY2xEU0RYbERwSHJTVmpFQ2dZQWx0STNjMzJxaG5KU2xHSGhjdW1wRwpReGpvYnJBUUxUa3dyOWk2TkNuS0EyNVR1SVFXa1NiN2JUWWtuUi80WDhOT2w2U2EvYm9QK2dncWNJM0haSk05CkxJRnpPUTFWT1luQ2ZYZVd0SmlHQklwUExadFdobnA3NGVhdmJKYW9udlhVVGNZcm5qcytIWGhpaFhjOUhENWsKeEJEaWJKYUlEbXg2T1FpVWI2RndJZz09Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K
      kind: Secret
      metadata:
        name: neo4j-tls
        namespace: neo4j
      type: Opaque
    3. Create the generic secret using the kubectl create command and the secret.yaml file:

      kubectl create -f /path/to/secret.yaml
      Example output
      secret/neo4j-tls created
    4. Verify that the secret is created:

      kubectl get secret
      Example output
      NAME        TYPE     DATA   AGE
      neo4j-tls   Opaque   2      85s
  2. Configure the ssl object in the ssl-values.yaml file using the created secret:

    ssl:
    # setting per "connector" matching neo4j config
      bolt:
        privateKey:
          secretName: neo4j-tls
          subPath: private.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: public.crt
      https:
        privateKey:
          secretName: neo4j-tls
          subPath: private.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: public.crt
        trustedCerts:
          sources:
          - secret:
              name: neo4j-tls
              items:
              - key: public.crt
                path: public.crt
      cluster:
        privateKey:
          secretName: neo4j-tls
          subPath: private.key
        publicCertificate:
          secretName: neo4j-tls
          subPath: public.crt
        trustedCerts:
          sources:
          - secret:
              name: neo4j-tls
              items:
              - key: public.crt
                path: public.crt
        revokedCerts:
          sources: [ ]

Now you are ready to deploy the Neo4j cluster using the ssl-values.yaml file and the Neo4j Helm charts.

Deploy a Neo4j cluster with SSL certificates

Deploy a Neo4j cluster using the Neo4j Helm chart and the ssl-values.yaml file.

  1. Install server-1:

    helm install server-1 neo4j/neo4j --namespace neo4j --set neo4j.acceptLicenseAgreement=yes --set neo4j.password=my-password --set neo4j.name="my-cluster" --set neo4j.minimumClusterSize=3 --set neo4j.edition="enterprise" --set volumes.data.mode=defaultStorageClass -f ~/Documents/neo4j-ssl/ssl-values.yaml
  2. Repeat the command from the previous step for server-2 and server-3.

  3. Verify that the Neo4j cluster is running:

    kubectl get pods
    Example output
    NAME                       READY   STATUS    RESTARTS   AGE
    server-1-0                   1/1     Running   0          2m
    server-2-0                   1/1     Running   0          2m
    server-3-0                   1/1     Running   0          2m
  4. Connect to one of the servers and verify that the /certificates/cluster directory contains the certificates:

    kubectl exec -it server-1-0 -- bash
    neo4j@server-1-0:~$ cd certificates/
    neo4j@server-1-0:~/certificates$ ls -lst
    Example output
    total 12
    4 drwxr-xr-x 2 root root 4096 Jan  4 13:55 bolt
    4 drwxr-xr-x 3 root root 4096 Jan  4 13:55 cluster
    4 drwxr-xr-x 3 root root 4096 Jan  4 13:55 https
    neo4j@server-1-0:~/certificates$ cd cluster/
    neo4j@server-1-0:~/certificates/cluster$ ls -lst
    Example output
    total 8
    0 drwxrwsrwt 3 root neo4j  100 Jan  4 13:56 trusted
    4 -rw-r--r-- 1 root neo4j 1704 Jan  4 13:56 private.key
    4 -rw-r--r-- 1 root neo4j 1159 Jan  4 13:56 public.crt
    neo4j@server-1-0:~/certificates/cluster$ cd trusted/
    neo4j@server-1-0:~/certificates/cluster/trusted$ ls -lst
    Example output
    total 0
    0 lrwxrwxrwx 1 root neo4j 17 Jan  4 13:56 public.crt -> ..data/public.crt
  5. Exit the pod:

    exit
  6. Check that the LoadBalancer service is available using the neo4j.name used for the installation:

    export NEO4J_NAME=my-cluster
    kubectl get service ${NEO4J_NAME}-lb-neo4j
    Example output
    NAME                  TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)                                        AGE
    my-cluster-lb-neo4j   LoadBalancer   10.0.134.210   20.237.50.207   7474:31168/TCP,7473:31045/TCP,7687:32708/TCP   3m30s
  7. Connect to the Neo4j cluster using one of the following options:

    • Neo4j Browser:

      1. Open a web browser and type https://lb-EXTERNAL_IP:7473 (in this example, https://20.237.50.207:7473/browser/). You should see the Neo4j browser.

      2. Authenticate using the user neo4j and the password you set when deploying the cores, in this example, my-password.

      3. Verify that the cluster is online by running :sysinfo or SHOW SERVERS:

        Cluster sysinfo
      4. Run SHOW SETTINGS YIELD name, value WHERE name CONTAINS 'ssl' to verify that the configuration is deployed as expected.

    • Cypher Shell:

      1. Open a terminal and connect to one of the cluster pods:

        kubectl exec -it server-1-0 -- bash
      2. Navigate to the bin directory and connect to server-1 using cypher-shell:

        neo4j@server-1-0:~$ cd bin
        neo4j@server-1-0:~/bin$ ./cypher-shell -u neo4j -p my-password -a neo4j+ssc://server-1.neo4j.svc.cluster.local:7687
        Example output
        Connected to Neo4j using Bolt protocol version 5.26 at neo4j+ssc://server-1.neo4j.svc.cluster.local:7687 as user neo4j.
        Type :help for a list of available commands or :exit to exit the shell.
        Note that Cypher queries must end with a semicolon.
        neo4j@neo4j>
      3. Verify that the cluster is online by running SHOW SERVERS:

        neo4j@server-1-0:~/bin$ SHOW SERVERS;
        Example output
        +-----------------------------------------------------------------------------------------------------------------------------------+
        | name                                   | address                                  | state     | health      | hosting             |
        +-----------------------------------------------------------------------------------------------------------------------------------+
        | "1c5946b1-0eb5-43b9-a549-5601087c57f2" | "server-3.neo4j.svc.cluster.local:7687" | "Enabled" | "Available" | ["neo4j", "system"]  |
        | "ba63cd32-3e7d-4042-9935-c8eba925a98f" | "server-1.neo4j.svc.cluster.local:7687"  | "Enabled" | "Available" | ["neo4j", "system"] |
        | "cbad7ed6-0c13-4ba7-b6a1-f20c5552dfcd" | "server-2.neo4j.svc.cluster.local:7687" | "Enabled" | "Available" | ["neo4j", "system"]  |
        +-----------------------------------------------------------------------------------------------------------------------------------+
      4. Run SHOW SETTINGS YIELD name, value WHERE name CONTAINS 'ssl' to verify that the configuration is deployed as expected.

        Example output
        +----------------------------------------------------------------------------------------------------+
        | name                                           | value                                             |
        +----------------------------------------------------------------------------------------------------+
        | "dbms.netty.ssl.provider"                      | "JDK"                                             |
        | "dbms.ssl.policy.bolt.base_directory"          | "/var/lib/neo4j/certificates/bolt"                |
        | "dbms.ssl.policy.bolt.ciphers"                 | "No Value"                                        |
        | "dbms.ssl.policy.bolt.client_auth"             | "NONE"                                            |
        | "dbms.ssl.policy.bolt.enabled"                 | "true"                                            |
        | "dbms.ssl.policy.bolt.private_key"             | "/var/lib/neo4j/certificates/bolt/private.key"    |
        | "dbms.ssl.policy.bolt.private_key_password"    | "No Value"                                        |
        | "dbms.ssl.policy.bolt.public_certificate"      | "/var/lib/neo4j/certificates/bolt/public.crt"     |
        | "dbms.ssl.policy.bolt.revoked_dir"             | "/var/lib/neo4j/certificates/bolt/revoked"        |
        | "dbms.ssl.policy.bolt.tls_versions"            | "TLSv1.2"                                         |
        | "dbms.ssl.policy.bolt.trust_all"               | "false"                                           |
        | "dbms.ssl.policy.bolt.trusted_dir"             | "/var/lib/neo4j/certificates/bolt/trusted"        |
        | "dbms.ssl.policy.bolt.verify_hostname"         | "true"                                           |
        | "dbms.ssl.policy.cluster.base_directory"       | "/var/lib/neo4j/certificates/cluster"             |
        | "dbms.ssl.policy.cluster.ciphers"              | "No Value"                                        |
        | "dbms.ssl.policy.cluster.client_auth"          | "REQUIRE"                                         |
        | "dbms.ssl.policy.cluster.enabled"              | "true"                                            |
        | "dbms.ssl.policy.cluster.private_key"          | "/var/lib/neo4j/certificates/cluster/private.key" |
        | "dbms.ssl.policy.cluster.private_key_password" | "No Value"                                        |
        | "dbms.ssl.policy.cluster.public_certificate"   | "/var/lib/neo4j/certificates/cluster/public.crt"  |
        | "dbms.ssl.policy.cluster.revoked_dir"          | "/var/lib/neo4j/certificates/cluster/revoked"     |
        | "dbms.ssl.policy.cluster.tls_versions"         | "TLSv1.2"                                         |
        | "dbms.ssl.policy.cluster.trust_all"            | "false"                                           |
        | "dbms.ssl.policy.cluster.trusted_dir"          | "/var/lib/neo4j/certificates/cluster/trusted"     |
        | "dbms.ssl.policy.cluster.verify_hostname"      | "true"                                           |
        | "dbms.ssl.policy.https.base_directory"         | "/var/lib/neo4j/certificates/https"               |
        | "dbms.ssl.policy.https.ciphers"                | "No Value"                                        |
        | "dbms.ssl.policy.https.client_auth"            | "NONE"                                            |
        | "dbms.ssl.policy.https.enabled"                | "true"                                            |
        | "dbms.ssl.policy.https.private_key"            | "/var/lib/neo4j/certificates/https/private.key"   |
        | "dbms.ssl.policy.https.private_key_password"   | "No Value"                                        |
        | "dbms.ssl.policy.https.public_certificate"     | "/var/lib/neo4j/certificates/https/public.crt"    |
        | "dbms.ssl.policy.https.revoked_dir"            | "/var/lib/neo4j/certificates/https/revoked"       |
        | "dbms.ssl.policy.https.tls_versions"           | "TLSv1.2"                                         |
        | "dbms.ssl.policy.https.trust_all"              | "false"                                           |
        | "dbms.ssl.policy.https.trusted_dir"            | "/var/lib/neo4j/certificates/https/trusted"       |
        | "dbms.ssl.policy.https.verify_hostname"        | "true"                                           |
        +----------------------------------------------------------------------------------------------------+
        
        37 rows
        ready to start consuming query after 212 ms, results consumed after another 11 ms

Glossary

allocator

A component in the cluster that allocates databases to servers according to the topology constraints specified and an allocation strategy.

asynchronous replication

Asynchronous replication is used by secondary copies to poll for new transactions, which means they cannot be guaranteed to have received the most recent transactions. This enables efficient scale-out of read-performance.

Aura instance

A fully-managed DBMS represented by a single instance ID, that is running in the Neo4j Aura cloud.

auto-commit transaction

An automatically committed transaction that contains a single query.

Bolt protocol

Bolt is a protocol used for interaction between Neo4j instances and drivers.

bookmark

A marker the client can request from the cluster to ensure that it is able to read its own writes so that the application’s state is consistent and only databases that have a copy of the bookmark are permitted to respond.

category (Bloom)

A category is based on a node label and is defined in a Perspective as a way of visually distinguishing nodes with the same label(s).

causal consistency

All servers in a cluster agree on the order in which transactions take place. The position of a server on the causal chain can be guaranteed using a bookmark.

cluster

A Neo4j DBMS that spans multiple servers working together to increase fault tolerance and/or read scalability. Databases on a cluster may be configured to replicate across servers in the cluster thus achieving read scalability or high availability.

client application

Software that interacts with a Neo4j server.

commit

A commit is the successful completion of a transaction, which ensures durability of any changes made. For more details, visit Operations Manual → Transaction management.

composite database

Composite databases are the means to access partitioned graph data with a single Cypher query.

constraint

Constraints are sets of data modeling rules that ensure the data is consistent and reliable.

Cypher®

Neo4j’s graph query language.

data model

A data model defines how information is organized in a database. A good data model will make querying and understanding your data easier. In Neo4j, the data models have a graph structure.

database

A database is a container used by the DBMS to manage and store graph data. The physical structure of data is controlled by the database.

database vs graph

Databases are the physical containers of graph data. Graphs are the logical structure of data in Neo4j.

Database Management System

Database Management System, or DBMS, capable of managing multiple databases. A DBMS may run on a single server, or span several servers configured as a cluster.

database schema

The prescribed property existence and datatypes for nodes and relationships.

deallocate

An act of removing a database from a server or a server from a cluster without loss of data or reduced fault tolerance.

degree (of a node)

The number of relationships of a specific node; loops are counted twice.

disaster recovery

A manual intervention to restore availability of a cluster, or databases within a cluster.

driver

A software library that provides access to Neo4j from a particular programming language.

election

In the event that the Raft leader becomes unresponsive, followers automatically trigger an election and vote for a new leader.

entity

A node or a relationship.

expression (Cypher)

A component of a Cypher query which produces values. It may be used in projections, as a predicate, or when setting properties on graph elements.

fabric

Fabric is the architectural design of a unified system that provides a single access point to local or distributed graph data.

fault tolerance

A guarantee that a cluster can maintain a database’s persistence and availability in the event of one or more servers failing.

follower

A primary copy of a database acting as a follower, receives and acknowledges synchronous writes from the leader.

Generative AI (GenAI)

A type of artificial intelligence (AI) system that generates text, images, or other media in response to prompts.

graph

A logical representation of a set of nodes where some pairs are connected by relationships.

index

Data structure that improves read performance of a database.

knowledge graph

A specific type of graph that has an organizing principle so that a user (or a computer system) can reason about the underlying data. The organizing principle provides an additional layer of structure that adds context to support knowledge discovery.

label

Marks a node as a member of a named and indexed subset. A node may be assigned zero or more labels.

leader

A single primary copy of a database is designated as the leader. It receives all write transactions from clients and replicates writes synchronously to followers and asynchronously to secondary copies of the database.

main database

In terms of Neo4j Enterprise Studio, the database(s) containing the user’s data. Can exist in the same Neo4j deployment as the tool asset database.

motif

A description of a specific pattern within a graph.

node

A node represents an entity or discrete object in your graph data model. Nodes can be connected by relationships, hold data in properties, and are classified by labels.

operator

A symbol representing a mathematical or logical operation.

parameter

Named value provided when running a Cypher statement.

path

A sequence of nodes and the relationships connecting them, that does not contain duplicate relationships. Several paths can match a pattern.

pattern

A specific arrangement of nodes and relationships that can be matched in a graph. A pattern follows a motif.

perspective (Bloom)

A Perspective defines a certain business view or domain that can be found in the target Neo4j graph. A single Neo4j graph can be viewed through different Perspectives, each tailored for a different business purpose.

primary

A copy of the database that is able to process write transactions and is eligible to be elected as a leader. It participates in fault tolerant writes as it is part of the majority required to acknowledge and commit write transactions.

primary vs secondary

In a cluster, databases can operate in either primary or secondary mode. Primary databases are able to process write and read transactions, ensuring fault tolerance. Secondary databases are replicated asynchronously from primaries, and their main purpose is to provide read scaling within the cluster.

project (Aura)

An isolated environment in the unified Aura console that contains its own database instances, configurations, and resources. Preceded by tenant in the classic Aura console.

property

Properties are key-value pairs that are used for storing data on nodes and relationships.

query (Cypher)

A statement that retrieves or writes information to a database.

Raft group

A group of servers that are participating in hosting a particular database in primary mode.

Raft group member

A server that is participating in a Raft group. A server can be a member of one or more groups.

Raft log

A shared log between all Raft group members that is guaranteed to be consistently updated and viewed by those members. The log contains both database data and operational state of the Raft group.

Raft protocol

The networking mechanism that enables a database to replicate its data across multiple servers to give high availability for accessing the data and high durability to the data stored.

read scaling

Distributing query load by creating additional database copies hosted in secondary mode (read-only).

relationship

A relationship represents a connection between nodes in your graph data model. Relationships connect a source node to a target node, hold data in properties, and are classified by type.

secondary

An asynchronously replicated copy of the database that provides read scaling within the cluster.

seed

A seed is a database dump or a full backup used to create a database on a cluster. This is sometimes called seeding.

server

A physical machine, a virtual machine, or a container running an instance of Neo4j. Servers can be standalone or part of a cluster.

session

A causally linked sequence of transactions.

session consistency

An alternative name for Neo4j’s causal consistency.

standalone

A single server running Neo4j and not part of a cluster.

synchronous replication

Synchronous replication requires the leader primary to replicate a transaction and block the commit until a quorum of the follower primaries acknowledges that the transaction is successfully replicated. Once the transaction is replicated, the commit is allowed to proceed. This ensures data durability and consistency within the cluster.

system database

A database used by Neo4j to store system information.

tenant (Aura)

An isolated environment in the classic Aura console that contains its own database instances, configurations, and resources. Replaced by project in the unified Aura console.

tool asset database

In terms of Neo4j Enterprise Studio, the database where tools' assets are stored. This can be in the same Neo4j deployment as the main database(s) or in a separate deployment.

topology

A configuration that describes how the copies of a database should be spread across the servers in a cluster, see primary mode and secondary mode.

transaction

A transaction comprises a unit of work performed against a database. It is treated in a coherent and reliable way, independent of other transactions. Transactions comply with the ACID consistency model (atomic, consistent, isolated, and durable).