Managing your Astra DB database

As a database administrator, you can manage your database. This includes the following tasks:

Create your database

Complete the following steps to create and launch your DataStax Astra DB database.

Procedure

  1. In your Astra DB dashboard, select Create Database.

  2. Select a plan if you do not have an existing plan.

    See Plan options for the benefits of each plan. You can upgrade from a free to pay as you go plan or from a pay as you go plan to an annual commitment plan if your needs change.

    If you need more options, contact DataStax Support.
  3. If you are creating a database with a pay as you go or an annual commitment plan, enter your payment method to continue. If you are creating a free plan, you do not have to enter a credit card. You can get started for free with your $25 credit. You can enter a payment method later to move to a pay as you go plan or annual commitment plan if needed.

  4. Enter your basic details:

    • Database Name: Name your database something meaningful. The database name cannot be altered after the database is created. Use only alphanumeric characters; there is no character limit.

    • Keyspace Name: Name your keyspace to reflect your data model. You cannot name your keyspace “dse” or “system”. Use only alphanumeric characters and no more than 48 total characters.

  5. Select your cloud provider and then the region where you want to launch your database from the region menu, which reflects the available regions based on your selected cloud provider. Regions with the lock symbol require payment.

    locked regions
    You can preview the costs for the database based on read and write requests, storage, and data transfer.
  6. Select Create Database. The Database Created! page appears.

    database created
    1. Click X at the top right of the screen to return to your Astra DB dashboard.

    2. Click Download Token Details to download tokens generated for you.

    3. Click Get Instructions for quick explanations on how to complete certain tasks and links for more information.

    getting started
  7. You will see a screen highlighting your selected plan. Select Continue.

Results

You are redirected to your Organization Dashboard. The new database and status is shown under Databases. You will receive an email when your database creation is complete. Select the database name to manage or connect with your new database.

View your databases

View all databases in your organization, and select a database to view detailed information about the database.

The Dashboard shows all of your databases within your organization, including databases you created and databases created by other team members. From here, you can select an individual database name to manage and connect those databases.

Selecting a database in DataStax Astra DB provides access to detailed information about the database. You can view the keyspaces, size and location of the database, and the estimate cost per hour.

  1. Open a browser, navigate to Astra DB, and log in.

  2. On the Dashboard page, select the database name to access the Overview page for your selected database.

    You can only view connection details and database management operations for databases that you created.

  3. On the Overview tab, you can see several database details:

    • Database Name

    • Status

    • Usage for current billing period

      • Read Requests

      • Write Requests

      • Storage Consumed

      • Data Transfer

    • Compute Size [Only for Classic tier databases]

    • Replication Factor [Only for Classic tier databases]

    • Current Capacity [Only for Classic tier databases]

    • Regions

      • Provider

      • Area

      • Region

      • Datacenter ID

      • Region Availability

    • Keyspaces

Database statuses

Your database can exist in a range of statuses. These statuses vary based on the actions you take within your database.

To see the system status of Astra, see https://status.astra.datastax.com/.

To see the status of a specific database, view your database Dashboard.

All databases

Active

Your database is available and ready to use.

Initializing

You’ve made your database selections. It should be ready for you to use soon.

Terminating/Terminated

You have terminated your database, which means your database and all data on your database will be removed. Your database is no longer available.

Error

Something is wrong with your database. Contact DataStax Support.

Maintenance

When a database is moving into hibernated or restarting from hibernated, your database will display that it is in the Maintenance status.

Hibernated

When an Astra DB database on the Free plan has been unused for more than 23 hours, it will automatically enter the Hibernated status.

It may take a few minutes for your hibernated Astra DB database to resume (return to Active status).

Database hibernation only occurs on the Free plan. Hibernated does not occur on the Astra DB paid plans. To avoid Hibernated, and to take full advantage of additional Astra DB functionality, upgrade from the Free plan to a Pay As You Go plan, or to an Enterprise plan. For details, see Pricing and billing and the Astra DB pricing calculators.

To view the status of any database within your organization,

  1. Open your Astra DB dashboard.

    1. If you have more than one database in a hibernated status, a banner appears at the top of the screen prompting you to click Resume Databases.

    resume banner

  2. To activate a specific database, navigate to the Databases table on your dashboard. Select the database(s) to activate.

    1. Click Resume to activate a hibernated database.

    2. Hover Hibernated for a quick definition of this term.

    3. Click the database name to open it, but remain in the hibernated status.

    hibernate db

Classic databases

Parking

You parked your database. It is in the process of being parked and cannot be used again until you unpark your database.

Parked

You parked your database. It is unavailable and cannot be used again until you unpark your database.

Unparking

You unparked your database. It is unavailable until it is fully unparked and Active again.

Resizing

You resized your database to change your capacity. Your database has limited functionality while it is resized.

Monitor your databases

View connection details, performance metrics, and health details for databases in your organization.

The Databases page provides an overview of all databases in your organization, including the databases you created and databases created by other team members. However, only a database creator can make changes to a database and view its connection details, which can be shared manually with other team members.

View your databases

View all databases in your organization, and select a database to view detailed information about the database.

The Dashboard shows all of your databases within your organization, including databases you created and databases created by other team members. From here, you can select an individual database name to manage and connect those databases.

Selecting a database in DataStax Astra DB provides access to detailed information about the database. You can view the keyspaces, size and location of the database, and the estimate cost per hour.

  1. Open a browser, navigate to Astra DB, and log in.

  2. On the Dashboard page, select the database name to access the Overview page for your selected database.

    You can only view connection details and database management operations for databases that you created.

  3. On the Overview tab, you can see several database details:

    • Database Name

    • Status

    • Usage for current billing period

      • Read Requests

      • Write Requests

      • Storage Consumed

      • Data Transfer

    • Compute Size [Only for Classic tier databases]

    • Replication Factor [Only for Classic tier databases]

    • Current Capacity [Only for Classic tier databases]

    • Regions

      • Provider

      • Area

      • Region

      • Datacenter ID

      • Region Availability

    • Keyspaces

View health and metrics

Select a database to view health metrics and performance information. When selecting a database, you can view health metrics that include information regarding latency and throughput to the database. These metrics provide insights into the performance of the database and how workloads are distributed.

When viewing information about a database on the Health page, choose the region from the dropdown available at the right to view the health metrics of the database particular to that region. This is only applicable for multi-region databases.

Procedure

  1. Open a browser, navigate to DataStax Astra DB, and log in.

  2. On the Databases page, select the database name to view details for. Details for the database display on the Overview tab.

  3. To view health metrics for the database, select the Health tab.

  4. Select the time period to display in the health metrics for.

Results

Metrics for the database display in the Grafana dashboard embedded in the Astra DB console. To view more granular metrics, hover over a specific time in the graph. Read and write latencies display in nanoseconds.

Health

View health dashboard in a full browser window

  1. Select Cycle View Mode in the upper right corner. This selection displays the cycle view.

  2. Press Esc.

  3. Select the share icon in the upper left corner.

  4. Copy the URL.

  5. Paste the URL in a new browser tab or window to see the dashboard.

Export Astra DB metrics to an external system

Enterprises depend on the ability to view database health metrics in centralized systems along with their other software metrics. The Astra DB Metrics feature lets you forward Astra DB database health metrics to an external third-party metrics system. We refer to the recipient of the exported metrics as the destination system.

Introduction

The functionality provided by the Astra DB Metrics feature is often referred to as:

  • Observability

  • External monitoring

  • Third-party metrics

  • Prometheus monitoring integration

At this time, Astra DB Metrics supports exporting health metrics from Astra DB serverless databases to:

You can also use Grafana or Grafana Cloud to visualize the exported metrics.

Metrics API and UI options

You can configure the export of Astra DB metrics via the Astra DB console, or via the DevOps API and its /v2/databases/{databaseId}/telemetry/metrics call. For details, see:

Manage access list for public endpoints

Use access lists to limit what public endpoints are able to access your database. You can choose to restrict access in one of two ways:

When Access List is configured and active, access to these endpoints is restricted:

  • CQL, GraphQL, and REST

  • GraphQL Playground

  • Swagger

  • CQLsh

This information applies to only serverless databases.

You can also manage your access list using the DevOps API.

If you are using the access list and restricting public access, these restrictions exclude the Astra internal site reliability controls.

Only Organization and Database Administrators for the database have permissions to manage the access list.

Restrict public access

By default, public access to your database is not restricted. Access to your database is possible via public internet.

  1. In your database Settings, select the toggle to restrict public access.

  2. Confirm your selection to Restrict Public Access.

Until you add an address to your access list, public access is still available.

Add IP address or CIDR to access list

  1. Ensure public access is restricted.

  2. Select Add Access.

  3. Select Add new endpoint.

  4. Select IP Address or CIDR from the Type menu.

    A CIDR indicates a range of IP addresses. For example, the CIDR range '192.168.0.0/16' represents the first IP address of '192.168.0.0' through the last IP address of '192.168.255.255'. The '/16' mask indicates that the first 16 bits of the IP address are static. The addresses in the CIDR range are represented by all the permutations of the last 16 bits.

  5. Enter the IP address or CIDR into the Address field.

    If you want to add you current IP address, copy it from the display and paste it into the Address field.

    All IP address must be entered in the IPv4 format, which is four decimal numbers, each ranging from 0 to 255. For example, 179.46.234.11.

  6. Optional: Add a description for the address you are adding. For example, office or home.

  7. Select Add to add the address to the access list.

It takes approximately five minutes for each address to sync and have access.

Upload list of endpoints

  1. Ensure public access is restricted.

  2. Select Add Access.

  3. Select Upload from file.

    [
      {
        "address": "10.0.0.1",
        "description": "Reader"
      },
      {
        "address": "10.0.0.1/32",
        "description": "Librarians"
      }
    ]
  4. Use the Select File button to find the JSON file with your access list to upload.

    You will see the list of addresses to be added to the access list.

  5. Select Import to add the addresses to your access list.

Import endpoints from database

You can import an access list from another Astra database. If you do not have another active Astra database, this option will not be available.

  1. Ensure public access is restricted.

  2. Select Add Access.

  3. Select Import from database.

  4. Select the active Astra database from which you want to import the addresses.

    You will see the list of addresses to be added to the access list.

  5. Select Import to add the addresses to your access list.

Enable or disable an endpoint

  1. Select the overflow menu for the address you want to enable or disable.

  2. Select Enable or Disable.

    The overflow menu will show the Disable option only when the address is enabled and the Enable option only when the address is disabled.

  3. Confirm your selection to Enable or Disable the endpoint.

Your access list remains active, even if all endpoints are disabled. If you want to allow public access, you must select the toggle to stop restricting public access.

Delete an endpoint

If you remove all of the addresses on your access list, your database will be accessible from the public internet, even if Restrict public access is selected.

  1. Select the overflow menu for the address you want to remove.

  2. Select Delete.

  3. Confirm your selection to Delete the endpoint.

It takes approximately five minutes for each address to sync and be removed from the access list.

Allow public access

If you stop restricting public access, access to your database is possible via public internet.

  1. Select the toggle to stop restricting public access.

  2. Confirm your selection to Enable public access.

Manage multiple keyspaces

Creating a database with multiple keyspaces allows you to create different data models for each keyspace or store unique data in unique keyspaces. Multiple keyspaces within a single region allows for an application built on a per-keyspace data model.

Adding a new keyspace

  1. Open a browser, navigate to Astra DB, and log in.

  1. On the Dashboard page, select the database name to access the Overview page for your selected database.

  1. Select Add Keyspace.

  1. Enter the name of the new keyspace.

  1. Select Save.

Your list of keyspaces displays on the Overview page for your database.

Removing a keyspace

If you delete a keyspace, all data in that keyspace is removed and cannot be recovered.

  1. Open a browser, navigate to DataStax Astra DB, and log in.

  1. On the Dashboard page, select the database name to access the Overview page for your selected database.

  1. Select the overflow menu for the keyspace you want to delete.

  1. Select Delete.

  1. In the Delete keyspace menu, type in the name of the keyspace to delete.

  1. Select Delete Keyspace.

Your list of keyspaces will be updated on the Overview page to show only the remaining keyspaces for your database.

Using multiple regions

You can replicate data to multiple regions for high availability scenarios to ensure active-active applications failover models. Multiple regions also ensure application data availability for locality purposes with the added value of cost savings.

Because multiple regions will increase your billing, see Pricing and billing for more details.

Video introduction

See this short video introduction to the Astra DB multi-region implementation:

Eventual consistency model and multi-region updates

Apache Cassandra® and DataStax Astra DB follow the eventual consistency model. As a result, data written to one datacenter/region may not be immediately accessible in other datacenters/regions in the same database cluster. The time span is normally within a few minutes to fully replicate the data. However, it could take longer, and possibly span one or more days. There are several contributing factors to the latter scenario, such as the workload volume, the number of regions, the process that runs data repair operations, and network resources.

For more, see the Astra DB Serverless multi-region FAQ in this topic.

Serverless databases

Multiple regions is available on only pay as you go and annual plans.

If you are adding multiple regions to your database, you can use each region only once. You cannot add the same region to the same database more than one time.

Lightweight Transactions (LWTs) are not supported in multi-region Astra DB Serverless databases. Serverless only supports serial consistency on the local datacenter, in a single region.

Add a new region to your database

  1. From your database’s Dashboard, select Add Region.

    db multiregion1
  2. Select your desired region from the dropdown menu of available choices.

    You can review your selected region and its cost below the dropdown menu.

    You can add only a single region at one time.

    db multiregion2
  3. Select Add Region to add the region to your database.

After you add the new region, your new region will show up in the list of regions on your database Dashboard. Your existing region status will change to Maintenance, but will still be available for operations.

db multiregion3

The information displayed on the Connect page for your database is region specific.

Delete a region from your database

The information displayed on the Connect page for your database is region specific.

Removing a region is not reversible. Proceed with caution.

  1. From you database Dashboard, select the overflow menu for the database you want to delete.

  2. Select Delete.

    db multiregion5
  3. Type "delete" in the text bar.

    db multiregion6
  4. Select Delete to delete your region.

    db multiregion7

Limitations

Lightweight transactions work for only a single-region datacenter.

If you original region is disconnected, schema changes are suspended and repairs do not run. If any regions are disconnected, the writes to those regions will not be forwarded.

While adding a new region, you cannot drop a table or keyspace and you cannot truncate a table.

If any region is not online, you cannot truncate a table.

Data sovereignty

Astra DB serverless replicates all data in the database to all of a database’s regions. By contrast, multiple keyspaces in Apache Cassandra® and DataStax Enterprise (DSE) allow a database to replicate some tables to a subset of regions. To achieve the same behavior as Cassandra or DSE, create a separate Astra DB instance that adheres to the necessary region restrictions. The database client will need to add a separate connection for the additional database and send queries to the appropriate connection depending on the table being queried.

Classic databases

If you are adding multiple regions to your database, you can use each region only once. You cannot add the same region to the same database more than one time.

Adding a region to your classic database

  1. Open a browser, navigate to DataStax Astra, and log in.

  1. On the Dashboard page, select the database name to access the Overview page for your selected database.

  1. Select Add Region.

  1. Select the region you want to add from the Add Region menu.

  1. Select Add.

  1. Confirm you want to add the region by selecting Confirm.

You’ll see a screen confirming the new datacenter region is being added. Once you add a region, a maintenance period starts that might take up to 30 minutes. Your database will have limited availability during this window. Some actions, such as viewing database connection details, might be unavailable until maintenance is finished.

Removing a region from your database

  1. Open a browser, navigate to DataStax Astra, and log in.

  1. On the Dashboard page, select the database name to access the Overview page for your selected database.

  1. Select Remove Region from the overflow menu for the region you want to remove.

  1. Enter your datacenter id, which is provided in the prompt.

  1. Select Remove region.

Removing a region is not reversible. Proceed with caution.

You’ll see a screen confirming the datacenter location will be removed. Once you remove a location, a maintenance period starts that might take up to 30 minutes. Your database will have limited availability during this window. Some actions, such as viewing database connection details, might be unavailable until maintenance is finished.

Astra DB Serverless multi-region FAQ

While creating an Astra DB database, can I select multiple regions?

No. The workflow is to create a database with a selected region; then once the launched database reaches an Active status, you may add a region.

How many regions can I add?

The only limitation is the number of regions that are available in Astra DB. See Database Regions for the list of supported regions.

How many datacenters/regions can I add or remove at a time?

The current implementation allows one addition or removal at a time.

How quickly are updates applied to all datacenters/regions in the same database cluster?

It depends on several factors. As noted above, Apache Cassandra® and DataStax Astra DB follow the eventual consistency model. As a result, data written to one datacenter/region may not be immediately accessible in other datacenters/regions in the same database cluster. The time span is normally within a few minutes to fully replicate the data. However, it could take longer, and possibly span one or more days. There are several contributing factors to the latter scenario, such as the workload volume, the number of regions, the process that runs data repair operations, and network resources.

Can I remove a datacenter/region that I no longer need?

Yes, this action is supported with Astra DB Serverless. Exception: you cannot remove the original region selected when you created the Astra DB database. The original region can be deleted after all other regions are deleted by using the Terminate database operation.

Will I lose data when I remove a datacenter/region?

No. All data in the datacenter is replicated prior to being decommissioned.

Can I park a datacenter/region?

No. The best option, in this case, is to remove the datacenter/region.

Can I specify replication rules by keyspace?

By default, replication is applied at the database level. With Astra DB Serverless, there is no upfront database setup costs. The replication goal may be addressed by separating workloads by database without an impact on costs.

Is the Access List configuration by datacenter/region?

The Access List configuration applies at the database level.

How are backups managed?

  • Backups are taken on the region in which the database was first created.

  • The restore process follows this workflow: restore to the original datacenter, and then add the other regions.

  • For help with restore, please contact DataStax Support.

What’s next?

See additional database management topics.

Terminating your database

When you no longer need a database, terminate it to reduce costs and streamline operations. When you terminate a database, all data is permanently deleted and cannot be recovered.

If you have administrator privileges in the DataStax Astra DB console for your team, you can contact DataStax to terminate databases that are owned by other team members. For example, if a team member leaves your organization and you want to delete their databases, contact DataStax with the names of the databases owned by that team member.

Procedure

See instructions on how to terminate a multi-region database here.

  1. Open a browser, navigate to Astra DB, and log in.

  2. From the Dashboard page, select the overflow menu for the database you want to terminate and select Terminate.

    All data in the database will be permanently deleted. You cannot restart the database. Proceed with caution.

  3. To terminate the database, type in the database name you want to terminate and select Terminate.

Results

Your database is removed from the list of available databases. You will receive an email when your database is successfully terminated.

Resizing your classic database

Scale databases up or down based on your needs. You may need to increase or decrease the capacity of your DataStax Astra DB database. If a database is growing quickly or exceeding capacity, add another capacity unit (CU) to expand the storage and capabilities of the database.

This information applies to only classic databases.

You can increase your database by a maximum of three CUs. Multiple resize operations are required to add more CUs beyond the maximum number.

Consider the following conditions when resizing databases:

  • You must be the owner of a database to resize it.

  • Databases can only be increased in size to add more CUs.

  • Databases running on the Developer tier cannot be resized.

  • You cannot modify the compute size of existing databases.

Procedure

  1. Open a browser, navigate to Astra DB, and log in.

  2. From the Dashboard page, select the overflow menu for the database you want to resize and select Expand CUs.

  3. In the Expand CUs window, modify the number of CUs for your database.

    The total amount of storage and estimated cost changes dynamically based on the number of CUs entered.

    You cannot increase your cluster by more than 3 CUs at a time. If you need to increase your cluster by more than 3 CUs, increase them in intervals of 3 CUs at a time until you reach the total CUs you need for your database. The maximum is 20 CUs for your database.

    You cannot decrease your cluster. If you need to decrease your cluster, contact DataStax Support.

  4. Select Expand to begin resizing the database.

  5. Confirm you want to expand your database to your specified size by selecting Yes.

Results

You will receive a confirmation that you database is scheduled for expansion. Your database remains active while resizing, but you will have limited administrative functions. Your database status changes to Resizing until the resizing is complete.

You will receive an email when your database is successfully resized, along with a link to the database.

Park databases

Park a database to reduce costs and manage resources efficiently. Parking a database suspends the database but does not destroy it. Parked databases are available to unpark when the database needs to be active again. The cost of parking a database is only the storage cost from the infrastructure as a service (IaaS) provider.

This information applies only to existing Classic customers.

Effective May 6th, 2022, this feature was deprecated for all new customers. Please contact DataStax support if you have any questions.

Parking provides an effective means for managing costs and ensuring that databases are running only when needed. When parking a database, the DataStax Cloud console calculates the estimated cost of parking the database versus the cost of keeping the database running.

You can resume your parked databases at any time. If database operations are issued for a parked database, those operations will not be implemented until the database is unparked.

When viewing details for a database, click the ellipsis (...) next to the database name to access the Park option.

Procedure

  1. Open a browser, navigate to DataStax Astra DB, and log in.

  2. From the Dashboard page, select Park for the database you want to park.

  3. To park the database, select Park Database.

Results

The status of the database changes to Parking until the database is parked; the status then changes to Parked.

You cannot make changes to your database while the status is Parking.

The database is parked and remains in that state until you unpark it. The only cost incurred while the database is parked is storage cost from your selected cloud provider.

You will receive an email when your database is successfully parked, along with a link to the database.

Unpark databases

Unpark a database to place it into an active state and use the database again.

This information applies only to existing Classic customers.

Effective May 6th, 2022, this feature was deprecated for all new customers. Please contact DataStax support if you have any questions.

Procedure

  1. Open a browser, navigate to DataStax Astra DB, and log in.

  2. From the Dashboard page, select Unpark for the database you want to unpark.

  3. To unpark the database, select Unpark Database.

Results

The status of the database changes to Unparking until the database is parked; the status then changes to Active.

You cannot make changes to your database while the status is Unparking.

You will receive an email when your database is successfully unparked, along with a link to the database.

The database remains Active until you park it again. The only cost incurred while the database is parked is storage cost from your selected cloud provider.