Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
APPLIES TO:
Cassandra
Azure Cosmos DB supports many APIs, such as SQL, MongoDB, Cassandra, Gremlin, and Table. Each API has its own set of database operations. These operations range from simple point reads and writes to complex queries. Each database operation consumes system resources based on the complexity of the operation.
The cost of all database operations is normalized by Azure Cosmos DB and is expressed by Request Units (or RUs, for short). Request charge is the request units consumed by all your database operations. You can think of RUs as a performance currency abstracting the system resources such as CPU, IOPS, and memory that are required to perform the database operations supported by Azure Cosmos DB. No matter which API you use to interact with your Azure Cosmos DB container, costs are always measured by RUs. Whether the database operation is a write, point read, or query, costs are always measured in RUs. To learn more, see the request units and it's considerations article.
This article presents the different ways you can find the request unit (RU) consumption for any operation executed against a container in Azure Cosmos DB for Apache Cassandra. If you are using a different API, see API for MongoDB, API for NoSQL, API for Gremlin, and API for Table articles to find the RU/s charge.
When you perform operations against the Azure Cosmos DB for Apache Cassandra, the RU charge is returned in the incoming payload as a field named RequestCharge
. You have multiple options for retrieving the RU charge.
When you use the .NET SDK, you can retrieve the incoming payload under the Info
property of a RowSet
object:
RowSet rowSet = session.Execute("SELECT table_name FROM system_schema.tables;");
double requestCharge = BitConverter.ToDouble(rowSet.Info.IncomingPayload["RequestCharge"].Reverse().ToArray(), 0);
For more information, see Quickstart: Build a Cassandra app by using the .NET SDK and Azure Cosmos DB.
To learn about optimizing your RU consumption, see these articles:
Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Configurer Azure Cosmos DB for NoSQL - Training
Sélectionnez parmi les différentes offres de débit dans Azure Cosmos DB for NoSQL.
Certification
Microsoft Certified : Azure Cosmos DB Developer Specialty - Certifications
Écrivez des requêtes efficaces, créez des stratégies d’indexation, gérez et approvisionnez des ressources dans l’API SQL et le Kit de développement logiciel (SDK) avec Microsoft Azure Cosmos DB.
Documentation
Questions fréquentes sur les vues matérialisées (préversion) - Azure Cosmos DB for Apache Cassandra
Questions fréquentes sur les vues matérialisées dans Azure Cosmos DB for Apache Cassandra (préversion)
Capacité de rafale - Azure Cosmos DB
Utilisez votre base de données ou votre conteneur pour gérer les pics de trafic avec des rafales de capacité dans Azure Cosmos DB.
Syntaxe et propriétés Azure Microsoft.DocumentDB/databaseAccounts à utiliser dans les modèles Azure Resource Manager pour le déploiement de la ressource. API version 2023-03-01-preview
Mise à l’échelle de manière élastique avec l’API pour Cassandra dans Azure Cosmos DB
En savoir plus sur les options disponibles pour mettre à l’échelle un compte Azure Cosmos DB for Apache Cassandra et leurs avantages et inconvénients