Configuring Throughput in Portal
Complete the full lesson to earn 25 points — 50 with Pro
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro
Configuring Throughput in Portal: A Comprehensive Guide to Data Model Scaling
Introduction: The Foundation of Performance
In modern distributed data systems, the performance of your application is inextricably linked to how you manage throughput. When we talk about "configuring throughput," we are referring to the process of defining the capacity of your data store to handle read and write operations. Whether you are using a managed NoSQL database like Azure Cosmos DB, a relational database service, or a distributed cache, the throughput configuration acts as the dial that balances cost against performance.
Understanding how to size and scale this throughput via a management portal is a critical skill for any data engineer or architect. If you configure your throughput too low, your application will encounter throttling errors, latency spikes, and frustrated users. If you configure it too high, you are essentially burning money on resources that your application will never actually utilize. This lesson serves as a deep dive into the practical mechanics of configuring throughput, the nuances of scaling, and the strategies required to maintain a healthy data environment.
Understanding Throughput: The Core Concepts
Before we jump into the portal interface, we must establish a clear mental model of what throughput represents. In most cloud-native databases, throughput is measured in abstract units (often called Request Units or RUs). These units represent the compute, memory, and IOPS (Input/Output Operations Per Second) required to perform database operations.
A simple read of a small document might cost 1 unit, while a complex analytical query or a large write operation might cost 50 or 100 units. When you configure throughput in the portal, you are essentially setting a "budget" of these units that your database can consume per second. If your workload exceeds this budget within a one-second window, the system will reject the excess requests, returning a status code indicating that you have exceeded your capacity.
Callout: Throughput vs. Latency It is common for beginners to confuse throughput with latency. Throughput is the volume of work your system can handle simultaneously within a set period. Latency is the time it takes for a single request to complete. You can have high throughput (handling 10,000 requests per second) but poor latency (each request takes 500ms). Configuring throughput is about capacity management, not necessarily about making individual operations run faster.
The Two Pillars of Throughput Configuration
When interacting with the management portal, you will typically encounter two primary modes for scaling: Provisioned Throughput and Serverless/Autoscaling. Understanding the distinction between these is vital for cost control and system stability.
1. Provisioned Throughput (Manual)
Manual provisioned throughput requires you to specify the exact number of units you want available at any given time. This is ideal for predictable workloads where you know exactly how many requests your application will receive.
- Pros: Predictable costs, consistent performance, no surprise bills.
- Cons: Requires manual intervention to scale up/down, leads to wasted capacity during off-peak hours.
2. Autoscale Throughput
Autoscale is the industry standard for most modern applications. In this mode, you define a maximum limit for your throughput, and the system automatically scales between 10% of that maximum and the full maximum based on incoming traffic.
- Pros: Handles traffic spikes automatically, minimizes cost during idle times, requires less operational maintenance.
- Cons: Can be more expensive if the "minimum" 10% is still higher than what you actually need, requires careful setting of the maximum ceiling.
Step-by-Step: Configuring Throughput in the Portal
Configuring throughput is usually handled during the resource creation phase, but it can be adjusted at any time. The following steps outline the general workflow for updating throughput in a standard cloud database portal.
Step 1: Navigate to the Resource
Log into your cloud provider's console and navigate to the specific database or container/table you intend to modify. Look for the "Scale & Settings" or "Throughput" tab in the left-hand navigation menu.
Step 2: Select the Scaling Mode
Once inside the throughput configuration screen, you will see a toggle or a set of radio buttons to choose between "Manual" and "Autoscale."
- If you choose Manual, you will be presented with a box to enter a specific numeric value.
- If you choose Autoscale, you will be asked to define the "Autoscale max RU/s."
Step 3: Define the Value
For Manual mode, input the number of units based on your load testing. For Autoscale, input the absolute peak capacity you expect your application to reach. The portal will automatically calculate the minimums and estimated monthly costs based on these figures.
Step 4: Apply and Monitor
Click "Save" or "Apply." Note that scaling operations can sometimes take a few minutes to propagate across the distributed system. Once applied, navigate to the "Metrics" or "Monitoring" tab to observe the "Total Requests" vs. "Throttled Requests" chart.
Tip: The 10% Rule When using Autoscale, remember that the system will scale down to 10% of your maximum setting. If you set your max to 10,000 RU/s, your database will always be provisioned for at least 1,000 RU/s. Ensure this minimum is appropriate for your baseline traffic to avoid paying for idle capacity.
Practical Examples of Throughput Scaling
To make this concrete, let's look at three common scenarios.
Scenario A: The Predictable Steady-State Application
You have an internal tool that employees use to view payroll records. The usage is strictly between 9 AM and 5 PM, Monday through Friday.
- Approach: Manual Throughput.
- Reasoning: Since the traffic is predictable and consistent during business hours, you can set a fixed throughput level. You could theoretically write a script to scale this up at 8:30 AM and down at 5:30 PM to save costs, but if the usage is steady, manual scaling is the most straightforward and stable path.
Scenario B: The Marketing Campaign Launch
You are launching a new product, and you expect a massive surge of traffic for the first 48 hours, followed by a long tail of lower, inconsistent traffic.
- Approach: Autoscale.
- Reasoning: You cannot predict the exact peak of a marketing launch. Autoscale allows the system to absorb the initial "thundering herd" of users without manual intervention, and then automatically shrink back down once the excitement fades.
Scenario C: The Data Ingestion Pipeline
You have a background job that processes millions of sensor logs every night at 2 AM.
- Approach: Programmatic scaling (or Manual).
- Reasoning: Since this is a batch job, you want the highest possible performance during the window of execution. You can use the Portal to set a high throughput right before the job starts and scale it back down once the job completes.
Code-Based Throughput Management
While the portal is great for initial configuration, you should eventually move toward managing this via Infrastructure as Code (IaC) or SDKs. Relying on the portal for production changes is risky because it lacks an audit trail and reproducibility.
If you are using a C#/.NET environment, you can adjust throughput programmatically using the SDK. Here is an example of how you might update the throughput of a container:
// Example: Updating throughput programmatically using the Cosmos DB SDK
public async Task UpdateThroughputAsync(Container container, int newThroughput)
{
// Retrieve the current throughput settings
int? currentThroughput = await container.ReadThroughputAsync();
// Update the throughput to the new value
await container.ReplaceThroughputAsync(newThroughput);
Console.WriteLine($"Throughput updated from {currentThroughput} to {newThroughput}");
}
This code snippet illustrates the simplicity of managing scaling as part of your deployment pipeline. By treating your database capacity as code, you ensure that your production environment always matches your staging environment, reducing the risk of "it worked in dev but crashed in prod" scenarios.
Best Practices for Sizing and Scaling
Scaling is not just about moving a slider in a portal; it is about architectural discipline. Follow these best practices to ensure your data models remain performant.
1. Perform Rigorous Load Testing
Never guess your throughput requirements. Use tools like JMeter, k6, or custom scripts to simulate real-world traffic patterns against a staging environment. Measure the RU/s consumption of your most critical queries and calculate the required throughput based on peak expected concurrent users.
2. Implement Retry Logic
Even with perfect configuration, transient throttling can occur. Your application code must be resilient. Implement exponential backoff retry logic. This means that if a request is throttled, the application waits for a short period before trying again, increasing the wait time with each subsequent failure.
3. Monitor for Throttling (429 Errors)
In the portal, always keep an eye on the "429" error count (Too Many Requests). If you see these errors, it is a clear signal that your current throughput configuration is insufficient for the incoming load.
4. Partitioning Strategy
Throughput is often tied to your partitioning strategy. If you have a "hot partition"—where one specific shard is receiving 90% of the traffic—your overall throughput configuration will be bottlenecked by that single partition. Distribute your data evenly to ensure that throughput is utilized efficiently across the entire database.
Warning: The Hot Partition Trap Even if you configure 100,000 RU/s, if your data is poorly partitioned, you will still experience throttling. If all requests hit one partition, you are limited by the throughput capacity of that single partition, regardless of your total container settings. Always choose a partition key with high cardinality.
Common Pitfalls to Avoid
Many teams encounter the same issues when managing throughput in the portal. Being aware of these will save you significant troubleshooting time.
- Setting Max Throughput Too Low: Beginners often set the autoscale maximum based on average traffic rather than peak traffic. This leads to immediate throttling when a small spike occurs. Always set the maximum based on your projected peak.
- Neglecting the Minimums: When using Autoscale, people often forget that the database scales down. If your application has a very low baseline, the "10% minimum" might be more than you need, resulting in unnecessary costs.
- Manual Scaling Fatigue: If you find yourself manually changing your throughput settings more than twice a week, you should switch to Autoscale or automate the scaling using a function-based approach (e.g., a scheduled task that adjusts throughput).
- Ignoring Storage Growth: In some systems, throughput and storage are linked. As your data grows, you may need more throughput just to maintain the same performance levels. Periodically review your storage metrics alongside your throughput metrics.
Quick Reference: Throughput Comparison Table
| Feature | Manual Provisioned | Autoscale |
|---|---|---|
| Traffic Pattern | Steady, predictable | Variable, unpredictable |
| Cost Efficiency | High if utilized 100% | High if traffic fluctuates |
| Operational Effort | High (requires manual tuning) | Low (system handles scaling) |
| Performance | Constant, deterministic | Responsive to demand |
| Best For | Stable background workloads | User-facing applications |
Advanced Scaling: The "Split-Brain" Strategy
For very high-scale applications, you might consider a multi-region deployment. When you configure throughput in a multi-region setup, you are essentially configuring it per region. This allows you to scale throughput in specific geographic areas. If your European users are active, you can scale up the European region while keeping the US region at a lower throughput level to save costs. This level of granularity is only accessible through the portal's advanced configuration settings or via API-based automation.
Integrating Monitoring and Alerts
The portal provides a powerful alerting system. Do not rely on manually checking the dashboard. Set up alerts for "Throughput Exceeded" or "429 Errors." When these alerts trigger, they should send a notification to your team's communication channel (e.g., Slack, Microsoft Teams, or Email).
To set up an alert:
- Navigate to the "Alerts" section in the portal.
- Create a new alert rule.
- Select the metric "Total Requests" or "Throttled Requests."
- Define the threshold (e.g., more than 50 throttled requests in 5 minutes).
- Configure the action group to notify your on-call engineer.
This proactive approach ensures that you are aware of scaling issues before they lead to a full-blown system outage.
The Future of Throughput: Serverless Models
It is worth noting that the industry is moving toward "Serverless" database models where you don't configure throughput units at all. In these models, you are billed strictly per request. While this is excellent for small or highly sporadic workloads, it can become significantly more expensive than provisioned throughput for high-volume, steady-state applications. Always perform a cost-benefit analysis before deciding between provisioned/autoscale and fully serverless models.
Key Takeaways for Data Modelers
As we conclude this lesson, keep these fundamental principles in mind regarding throughput configuration:
- Understand Your Workload: Throughput is a reflection of your application's demand. If you don't know your peak traffic, you cannot configure your database correctly.
- Autoscale is Your Friend: For most modern applications, Autoscale provides the best balance between performance and cost efficiency. It handles the "spikiness" of real-world traffic without requiring constant manual intervention.
- Partitioning Matters: Throughput is only effective if your data is evenly spread. A poor partition key will ruin the performance of even the most expensive throughput configuration.
- Monitor Proactively: Do not wait for users to report slow performance. Set up automated alerts for throttled requests to catch capacity issues early.
- Use Infrastructure as Code: Move away from manual portal clicks. Use scripts or deployment templates to manage your throughput settings to ensure consistency and auditability.
- Resilience is Mandatory: No matter how well you configure your throughput, transient errors will happen. Build your application with retry logic to handle these cases gracefully.
- Review Regularly: Your traffic patterns will change. Conduct a monthly review of your throughput consumption to identify if you are over-provisioned or under-provisioned, and adjust your settings accordingly.
By mastering the configuration of throughput in the portal, you are moving from being a passive user of cloud resources to an active architect of your system's performance. This skill is the difference between a system that crumbles under pressure and one that scales with your business success. Treat your throughput configuration with the same care and rigor you apply to your database schema design, and you will build systems that are both reliable and cost-effective.
Reach the last section to complete this lesson and earn points — you're on section 1 of 11.
- Introduction to Cosmos DB Data Modeling
- Introduction to Cosmos DB Data Modeling Quiz5q
- Multiple Entity Types in Same Container
- Multiple Entity Types in Same Container Quiz5q
- Storing Related Entities in Same Document
- Storing Related Entities in Same Document Quiz5q
- Denormalizing Data Across Documents
- Denormalizing Data Across Documents Quiz5q
- Referencing Between Documents
- Referencing Between Documents Quiz5q
- Partition Keys and Document IDs
- Partition Keys and Document IDs Quiz5q
- Time to Live (TTL) Configuration
- Time to Live (TTL) Configuration Quiz5q
- Document Versioning Strategies
- Document Versioning Strategies Quiz5q
- Schema Versioning Patterns
- Schema Versioning Patterns Quiz5q
- Choosing Partition Strategies
- Choosing Partition Strategies Quiz5q
- Partition Key Selection Best Practices
- Partition Key Selection Best Practices Quiz5q
- Transactions and Partition Keys
- Transactions and Partition Keys Quiz5q
- Cross-Partition Query Costs
- Cross-Partition Query Costs Quiz5q
- Data Distribution Analysis
- Data Distribution Analysis Quiz5q
- Throughput Distribution Planning
- Throughput Distribution Planning Quiz5q
- Synthetic Partition Keys
- Synthetic Partition Keys Quiz5q
- Hierarchical Partition Keys
- Hierarchical Partition Keys Quiz5q
- Throughput and Storage Requirements
- Throughput and Storage Requirements Quiz5q
- Serverless vs Provisioned Throughput
- Serverless vs Provisioned Throughput Quiz5q
- Database-Level Provisioned Throughput
- Database-Level Provisioned Throughput Quiz5q
- Granular Scale Units
- Granular Scale Units Quiz5q
- Global Distribution Costs
- Global Distribution Costs Quiz5q
- Configuring Throughput in Portal
- Configuring Throughput in Portal Quiz5q
- Gateway vs Direct Connectivity Mode
- Gateway vs Direct Connectivity Mode Quiz5q
- Creating Database Connections
- Creating Database Connections Quiz5q
- Azure Cosmos DB Emulator
- Azure Cosmos DB Emulator Quiz5q
- Connection Error Handling
- Connection Error Handling Quiz5q
- Singleton Pattern for Clients
- Singleton Pattern for Clients Quiz5q
- Global Distribution Regions
- Global Distribution Regions Quiz5q
- Threading and Parallelism
- Threading and Parallelism Quiz5q
- Arrays and Nested Objects Queries
- Arrays and Nested Objects Queries Quiz5q
- Correlated Subqueries
- Correlated Subqueries Quiz5q
- Array and Type-Checking Functions
- Array and Type-Checking Functions Quiz5q
- Mathematical and String Functions
- Mathematical and String Functions Quiz5q
- Date Functions in Queries
- Date Functions in Queries Quiz5q
- Point Operations vs Query Operations
- Point Operations vs Query Operations Quiz5q
- CRUD Point Operations
- CRUD Point Operations Quiz5q
- Patch Operations for Updates
- Patch Operations for Updates Quiz5q
- Transactional Batch Operations
- Transactional Batch Operations Quiz5q
- Bulk Operations with SDK
- Bulk Operations with SDK Quiz5q
- Optimistic Concurrency with ETags
- Optimistic Concurrency with ETags Quiz5q
- Query Pagination and Continuation
- Query Pagination and Continuation Quiz5q
- Cosmos DB Mirroring for Fabric
- Cosmos DB Mirroring for Fabric Quiz5q
- Mirroring vs Spark Connector
- Mirroring vs Spark Connector Quiz5q
- Enabling Analytical Store
- Enabling Analytical Store Quiz5q
- Synapse Spark and SQL Queries
- Synapse Spark and SQL Queries Quiz5q
- Change Data Capture in Analytical Store
- Change Data Capture in Analytical Store Quiz5q
- Azure Functions and Event Hubs Integration
- Azure Functions and Event Hubs Integration Quiz5q
- Denormalization with Change Feed
- Denormalization with Change Feed Quiz5q
- Referential Integrity with Change Feed
- Referential Integrity with Change Feed Quiz5q
- Azure AI Search Integration
- Azure AI Search Integration Quiz5q
- Azure Functions Change Feed Trigger
- Azure Functions Change Feed Trigger Quiz5q
- Consuming Change Feed with SDK
- Consuming Change Feed with SDK Quiz5q
- Change Feed Estimator
- Change Feed Estimator Quiz5q
- Denormalization via Change Feed
- Denormalization via Change Feed Quiz5q
- Aggregation Persistence with Change Feed
- Aggregation Persistence with Change Feed Quiz5q
- Read-Heavy vs Write-Heavy Indexing
- Read-Heavy vs Write-Heavy Indexing Quiz5q
- Index Type Selection
- Index Type Selection Quiz5q
- Custom Indexing Policies
- Custom Indexing Policies Quiz5q
- Composite Index Implementation
- Composite Index Implementation Quiz5q
- Index Performance Optimization
- Index Performance Optimization Quiz5q
- Response Status Codes and Metrics
- Response Status Codes and Metrics Quiz5q
- Normalized RU Consumption Monitoring
- Normalized RU Consumption Monitoring Quiz5q
- Server-Side Latency Metrics
- Server-Side Latency Metrics Quiz5q
- Data Replication Monitoring
- Data Replication Monitoring Quiz5q
- Azure Monitor Alerts Configuration
- Azure Monitor Alerts Configuration Quiz5q
- Resource Logs Implementation
- Resource Logs Implementation Quiz5q
- Partition Throughput Monitoring
- Partition Throughput Monitoring Quiz5q
- Encryption Key Management
- Encryption Key Management Quiz5q
- Network-Level Access Control
- Network-Level Access Control Quiz5q
- Data Encryption Configuration
- Data Encryption Configuration Quiz5q
- Azure RBAC for Control Plane
- Azure RBAC for Control Plane Quiz5q
- Microsoft Entra ID for Data Plane
- Microsoft Entra ID for Data Plane Quiz5q
- CORS Settings Configuration
- CORS Settings Configuration Quiz5q
- Customer-Managed Keys
- Customer-Managed Keys Quiz5q
- Always Encrypted Implementation
- Always Encrypted Implementation Quiz5q
- Data Movement Strategy Selection
- Data Movement Strategy Selection Quiz5q
- SDK Bulk Operations for Data Movement
- SDK Bulk Operations for Data Movement Quiz5q
- Azure Data Factory Pipelines
- Azure Data Factory Pipelines Quiz5q
- Kafka Connector Integration
- Kafka Connector Integration Quiz5q
- Azure Stream Analytics Integration
- Azure Stream Analytics Integration Quiz5q
- Cosmos DB Spark Connector
- Cosmos DB Spark Connector Quiz5q
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles the points you earn on every lesson and quiz so you progress twice as fast, unlocks half of every practice exam — plus full case studies — with the Learn & Exam study modes, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× points per lesson & quiz
- ✓ 50% of every exam unlocked
- ✓ Learn & Exam modes
- ✓ Distraction-free lessons