Database limits
Astra DB Serverless is a fully managed serverless database-as-a-service (DBaaS), powered by Apache Cassandra®, an open-source NoSQL distributed database. To ensure high availability and optimum performance, Astra DB Serverless databases have guardrails on underlying Cassandra functionality.
Replicas
Astra DB Serverless replicates data across three availability zones within the launched region to promote uptime and ensure data integrity.
Astra DB Serverless restricts how replicas are used. The following consistency levels are allowed:
-
Reads: Any supported consistency level is permitted.
-
Single-region writes:
LOCAL_QUORUM
andLOCAL_SERIAL
. -
Multi-region writes:
EACH_QUORUM
andSERIAL
.
Collections
The Astra DB and Data API collections aren’t the same as Apache Cassandra® and CQL column type collections (sets, maps, and lists). |
The following limits apply to collections, including read and write operations against data in collections:
-
Serverless (Vector) databases created after June 24, 2024 can have up to 10 collections. Databases created before this date can have up to 5 collections. The collection limit is based on the number of indexes.
-
For multi-region databases, you must use the Data API to create collections or load data into regions other than the primary region. In the Astra Portal, you can create collections and load data into the primary region only, which is the region you selected when you created the database. However, because multi-region databases follow an eventual consistent model, data loaded into any region is eventually replicated to the database’s other regions.
-
Only the
UnifiedCompactionStrategy
compaction strategy is allowed. This strategy combines ideas fromSizeTieredCompactionStrategy
,LeveledCompactionStrategy
, andTimeWindowCompactionStrategy
, along with token range sharding. This all-inclusive compaction strategy works well for Astra DB Serverless use cases. -
A warning is issued when reading or compacting a partition that exceeds 100MB.
-
You cannot
UPDATE
orDELETE
a list value by index because Astra DB Serverless does not allow list operations that perform a read-before-write. Operations that are not by index work normally.
Fields
These Data API fields differ from fields in Cassandra and CQL. For more information, see Manage keyspaces. |
There is a limit to the number of fields you can have and the amount of data you can store in a single field.
-
A collection can’t have more than 64 fields.
-
A document can’t put more than 10MB of data in a single field.
Indexes
There is a limit to the number of indexes you can have.
A database created before June 24, 2024 can have up to 50 indexes. A database created after June 24, 2024 can have up to 100 indexes.
A collection in a database can have up to 10 indexes.
For more information, see The indexing option.
Rate limits
The default Astra DB Serverless rate limit is approximately 12,000 operations per second (ops/sec). Batches count as a single operation, regardless of the number of operations in a batch.
Astra DB Serverless workloads can be limited to 4,096 ops/sec. This additional rate limiting can occur for newly created or idle database when the load increases suddenly. If you encounter rate limiting exceptions or errors, retry those requests with a back-off strategy until the database has scaled and is able to receive a higher request rate. If you expect a sudden increase in traffic for an idle database, warm up your database or contact your account representative to upgrade your database with provisioned capacity.
Cassandra configuration properties
The cassandra.yaml
file is not configurable for Astra DB Serverless databases.
This file is defined as follows:
# Read requests
in_select_cartesian_product_failure_threshold: 25
partition_keys_in_select_failure_threshold: 20
tombstone_warn_threshold: 1000
tombstone_failure_threshold: 100000
# Write requests
batch_size_warn_threshold_in_kb: 64
batch_size_fail_threshold_in_kb: 640
unlogged_batch_across_partitions_warn_threshold: 10
user_timestamps_enabled: true
column_value_size_failure_threshold_in_kb: 5 * 2048L
read_before_write_list_operations_enabled: false
max_mutation_size_in_kb: 16384
write_consistency_levels_disallowed: ANY, ONE, LOCAL_ONE
# Schema
fields_per_udt_failure_threshold: 60
collection_size_warn_threshold_in_kb: 5 * 1024L
items_per_collection_warn_threshold: 20
columns_per_table_failure_threshold: 75
tables_warn_threshold: 100
tables_failure_threshold: 200
# SAI indexes failure threshold
sai_indexes_per_table_failure_threshold: 10
sai_indexes_total_failure_threshold: 100 # 50 for databases created before June 24, 2024
The limits defined in cassandra.yaml
inform the limits described elsewhere on this page.
CQL limits
For information about guardrails and limits for CQL commands, see Astra DB CQL limits.
Free plans
In addition to the limits described elsewhere on this page, organizations on the Free plan have the following additional limits:
-
No more than five databases.
-
Can’t export metrics.
-
Can’t use premium features, such as custom domains and multi-region databases.
To increase or remove these limits, upgrade your plan.