Connect drivers to Astra DB databases
The DataStax-compatible drivers can connect to Astra DB databases, DataStax Enterprise (DSE) clusters, Hyper-Converged Database (HCD) clusters, and open-source Apache Cassandra® clusters.
Driver configuration
All DataStax-compatible drivers have configuration file attributes, builder methods, or constructor parameters for pointing to the secure connect bundle. The database username and password are specified through the normal driver APIs for configuring a plain text authentication provider, or through using one of the convenience methods for username and password.
When using the secure connect bundle, the drivers automatically establish mutually authenticated TLS connections to the service. You do not have to unzip the secure connect bundle or supply contact points.
After establishing a connection the resulting session is optimally configured for interacting with your Astra DB database. It is possible (but not required) to use other advanced features, such as Speculative query execution and Execution profiles.
See your driver’s documentation for examples to help you get stated with your driver and the driver’s APIs.
Select a compatible driver
Driver compatibility depends on which database product and version you use.
For information about driver compatibility, see Cassandra drivers supported by DataStax.
Migrate applications between Cassandra, DSE, and Astra DB
If you have tooling that currently works with self-managed deployments (Cassandra or DSE clusters), connecting it to Astra DB is simple:
-
Upgrade to the version of the driver that supports the Astra DB Secure Connect Bundle (SCB).
-
Set a configuration value to point to the SCB.
The following table shows the configuration settings required to connect to a self-managed deployment or an Astra DB database.
Parameter | Self-managed | Astra DB |
---|---|---|
Contact points |
required |
unset |
Secure connect bundle |
unset |
required |
SSL context |
optional, configured manually |
automatically configured |
Local datacenter |
required |
automatically configured |
Database username |
optional, configured manually |
required |
Database password |
optional, configured manually |
required |