Skip to content



JanusGraph is designed to support the processing of graphs so large that they require storage and computational capacities beyond those that a single machine can provide. Scaling graph data processing for real time traversals and analytical queries is JanusGraph’s foundational benefit. This section will discuss the various specific benefits of JanusGraph and its underlying, supported persistence solutions.

JanusGraph uses the Java driver to connect to Cassandra as the storage backend. The Java driver itself supports connections to Astra DB natively. For example:

CqlSession session = CqlSession.builder()
  .withAuthCredentials("CLIENT_ID", "CLIENT_SECRET")


This article assumes you have a running installation of JanusGraph server. This was written and tested on JanusGraph v0.6.2. If JanusGraph v0.6.0 is used instead, refer to this article. It has not been tested on older versions of JanusGraph.

You will need to choose which keyspace to use to store your graph. If it doesn't exist, you will need to create the keyspace on the Astra UI. For simplicity, the keyspace is created as janusgraph.


If you want to connect JanusGraph server to ZDM, it is recommended to use the Internal Configuration File to avoid any credentials issues. Just comment out the secure bundle path part from the external file.

Installation and Setup

Note: For simplicity, the secure connect bundle has been placed in /path/to/scb

✅ Step 1: DB Information

On the JanusGraph server, move your secure bundle using secure copy or other techniques. For example:

$ cd /path/to/scb
$ ls -l

We will use this information to configure Astra DB as the storage backend for JanusGraph.

✅ Step 2: Graph Storage

While connecting to Astra DB from JanusGraph, it is preferred to make use of the secure connect bundle file as-is without extracting it. There are multiple ways in which a secure connect bundle file can be passed on to the JanusGraph configuration to connect to Astra DB using the DataStax driver.

On the JanusGraph server, modify the CQL storage configuration file:

$ cd janusgraph-0.6.2
$ vi conf/
Make the necessary changes using one of the two templates:

✅ Step 2a: Internal String Configuration

Set the property storage.cql.internal.string-configuration to datastax-java-driver { } and set the username, password and keyspace details.

For example:

storage.cql.keyspace=<keyspace name which was created in AstraDB>
storage.cql.internal.string-configuration=datastax-java-driver { }

Also, you can set a JVM argument to pass the secure connect bundle file as shown below and remove that property (storage.cql.internal.string-configuration) from the list above.

✅ Step 2b: Internal File Configuration

Set the property storage.cql.internal.file-configuration to an external configuration file if you would like to externalize the astra connection related properties to a separate file and specify the secure bundle and credentials information on that file.

For example:

# Link to the external file that DataStax driver understands

astra.conf (external file) to contain:

datastax-java-driver { {
    secure-connect-bundle = "/path/to/scb/"
  basic.request {
    timeout = "10 seconds"
  advanced.auth-provider {
    class = PlainTextAuthProvider
    username = "<ClientID>"
    password = "<ClientSecret>"


The ClientID and ClientSecret are from the token you generated in the Prerequisites section above.

✅ Step 3: Final Test

Start a Gremlin console:

$ bin/

         (o o)

Load a graph using Astra as the storage backend with:

gremlin> graph ='conf/')


It is normal to see some warnings on the Gremlin console. I have attached a text file with a sample output so you know what to expect.

In the Astra CQL Console, I can see JanusGraph created the following tables in the janusgraph keyspace:

token@cqlsh> USE janusgraph;
token@cqlsh:janusgraph> DESCRIBE TABLES;

edgestore_lock_  graphindex_lock_         janusgraph_ids   
txlog            systemlog                graphindex       
edgestore        system_properties_lock_  system_properties

Last update: 2024-05-31