Scalability and performance targets for Azure Table storage

Azure Table storage is a NoSQL key-attribute store that accepts un-structured data. It's ideal for storing large amounts of manageable data. This document outlines the scalability and performance targets for Azure Table storage.

Understanding Throughput

Throughput in Azure Table storage is measured in Request Units (RUs). A request unit is a normalized measure of throughput. Different types of operations consume different numbers of RUs.

Request Unit Consumption

Understanding RU consumption is crucial for capacity planning and cost management.

Partitioning for Scalability

Azure Table storage organizes data into partitions. A partition is a set of entities with the same partition key. The partition key is a string value that identifies the partition to which an entity belongs. All entities within a partition are stored together and are generally ordered by their row key within that partition.

Partition Key Design

A well-designed partition key is essential for achieving high scalability and performance. Consider the following:

Note: A single partition can scale to handle significant load, but distributing load across many partitions is the key to overall scalability.

Performance Targets

Azure Table storage offers high throughput and low latency. The specific performance targets can vary based on factors like partition design, the number of partitions, and the type of operations being performed.

Table Storage Limits

As of the latest updates, Azure Table storage provides the following general targets:

Tip: For predictable performance, aim for 10,000 RUs per second for writes and 20,000 RUs per second for reads per storage account. These are general guidelines, and actual performance can exceed these.

Best Practices for Scalability

To maximize the scalability and performance of your Azure Table storage solution, follow these best practices:

1. Design Your Partition Key Wisely

This is the most critical aspect of scaling with Table storage. Aim for partition keys that distribute your data and workload evenly.

2. Leverage Batch Operations

Combine multiple insert, update, or delete operations into a single batch transaction. This significantly reduces the number of individual requests and improves efficiency.


// Example of a batch operation (conceptual)
const batch = tableClient.createBatch();
const entity1 = { partitionKey: "user1", rowKey: "profile", name: "Alice" };
const entity2 = { partitionKey: "user1", rowKey: "settings", theme: "dark" };

batch.createEntity(entity1);
batch.updateEntity(entity2, "replace"); // or merge

await tableClient.submitBatch(batch);
            

3. Use Row Keys Effectively

Row keys uniquely identify an entity within a partition. They are also used for sorting within a partition. Choose them to optimize your query patterns.

4. Monitor Your Performance

Use Azure Monitor to track your storage account's performance metrics, including RU consumption, latency, and error rates. Identify and address any bottlenecks.

5. Consider Table Design Patterns

Explore common table design patterns such as the 80/20 pattern or the time-series pattern to suit your specific application needs.

Warning: Avoid creating a single partition that handles a disproportionate amount of traffic. This can lead to throttling and performance degradation.

Scaling Beyond a Single Partition

While individual partitions can handle high loads, the true power of Table storage comes from having many partitions. When your data or workload grows, your strategy should be to add more partitions with new partition keys rather than trying to scale a single, massive partition indefinitely.

By carefully designing your data model and leveraging the features of Azure Table storage, you can build highly scalable and performant applications.