NebulaGraph Distributed Graph Database

repository·master·Indexed 11 days ago

https://github.com/vesoft-inc/nebula

An open-source, distributed, and scalable graph database designed for large-scale graph analytics and real-time queries. It features a decoupled storage and computing architecture, supports the OpenCypher query language, and ensures strong data consistency via the RAFT protocol. The system consists of core components including nebula-graphd (query engine), nebula-metad (metadata management), and nebula-storaged (storage engine).

Tokens
7.6K
Snippets
18
Records
34
Agent score
95%

What's inside NebulaGraph

  1. What is NebulaGraph?

    master

    NebulaGraph is an open-source distributed graph database designed to handle massive datasets with hundreds of billions of vertices and trillions of edges, providing millisecond-level query latency.

    Key features include:

    • Fully Symmetric Distributed Architecture: Designed for high availability and scale.
    • Separation of Storage and Compute: Allows independent scaling of storage and query processing.
    • Horizontal Scalability: Easily expand the cluster as data grows.
    • Strong Consistency: Uses the RAFT protocol to ensure data integrity.
    • Query Language Support: Supports openCypher for graph queries.
    • Security: Includes user authentication/authorization.
    • Graph Algorithms: Supports various types of graph computing algorithms.
  2. Introduction to NebulaGraph

    master

    NebulaGraph is an open-source, distributed, and scalable graph database designed for high-volume data with millisecond latency and fast graph analytics. It is suitable for use cases such as social media, recommendation systems, knowledge graphs, security, and AI.

    Key features include:

    • Symmetrically distributed architecture.
    • Separation of storage and computing.
    • Horizontal scalability.
    • Strong data consistency via the RAFT protocol.
    • OpenCypher-compatible query language.
    • Role-based access control (RBAC) for security.
    • Support for various graph analytics algorithms.
  3. Available Docker images for NebulaGraph services

    master

    NebulaGraph services are available as production-ready Docker images on Docker Hub. These images correspond to the core components of the NebulaGraph distributed system:

    • nebula-graphd: The query engine service.
    • nebula-metad: The metadata management service.
    • nebula-storaged: The storage engine service.
    • nebula-tools: A collection of administrative and maintenance tools.
    docker pull vesoft/nebula-graphd
    docker pull vesoft/nebula-metad
    docker pull vesoft/nebula-storaged
    docker pull vesoft/nebula-tools
  4. Use the Storage Performance Tool to test storage service

    master

    The _build/storage_perf tool is used to benchmark the performance of the NebulaGraph storage service.

    Prerequisites: Before running the performance test, you must manually create a graph space, a tag, and an edge type in your NebulaGraph instance.

    By default, the tool expects the following names:

    • Space Name: test
    • Tag Name: test_tag
    • Edge Name: test_edge
    # Example usage (assuming binary is built)
    ./_build/storage_perf
  5. Find client libraries for other programming languages

    master

    The src/clients/graph directory is not the primary location for language-specific SDKs. If you are looking for official NebulaGraph clients for languages other than the one currently being used, they are maintained in separate dedicated repositories:

    • Go: nebula-go
    • Java: nebula-java
    • Python: nebula-python
    • C++: nebula-cpp
    • Rust: nebula-rust
    • Node.js: nebula-node
  6. Manage NebulaGraph services using nebula.service

    master

    You can manage the lifecycle of all NebulaGraph daemons simultaneously or target specific daemons using the scripts/nebula.service script. This is intended for single-host installations.

    ### Manage all daemons
    ```shell
    $ scripts/nebula.service start all
    $ scripts/nebula.service status all
    $ scripts/nebula.service stop all
    $ scripts/nebula.service restart all

    Manage specific daemons

    You can use scripts/nebula.service <action> <daemon> or the daemon-specific scripts (e.g., scripts/nebula-metad.service).

    # Start metad
    $ scripts/nebula.service start metad
    # OR
    $ scripts/nebula-metad.service start
    
    # Check status of graphd
    $ scripts/nebula.service status graphd
    # OR
    $ scripts/nebula-graphd.service status
    
    # Restart storaged
    $ scripts/nebula.service restart storaged
    # OR
    $ scripts/nebula-storaged.service restart
  7. Apply the NebulaGraph tuned profile

    master

    To optimize your system performance specifically for NebulaGraph services, you can use the tuned profiles provided in this repository. This requires the tuned service to be installed and running on your system.

    Follow these steps to apply the profile:

    1. Install and enable the tuned service: If tuned is not already installed, install it and ensure it is enabled using systemctl.
    2. Install the profile: Copy the __nebula__ directory into /etc/tuned.
    3. Activate the profile: Use tuned-adm to switch the active system profile to nebula.
    # 1. Install and enable tuned (example for Debian/Ubuntu)
    sudo apt-get install tuned
    sudo systemctl enable --now tuned
    
    # 2. Copy the nebula profile directory
    sudo cp -r __nebula__ /etc/tuned/
    
    # 3. Activate the profile
    sudo tuned-adm profile nebula