When planning for database scalability, it's crucial to understand and distinguish between vertical scaling and horizontal scaling techniques in Azure SQL Database and Azure Database for PostgreSQL.
Vertical scaling, also known as scaling up/down, involves increasing or decreasing the compute size of an individual database. In Azure, this can be achieved by upgrading service tiers or adjusting vCores.
Service Tiers determine the baseline capabilities of a database. Databases can move between different service tiers depending on workload needs:
vCore Adjustments let you fine-tune compute resources by increasing or decreasing the number of virtual cores, which directly impacts CPU, memory, and IOPS performance. Higher vCores provide more processing power and faster data operations.
Vertical scaling offers two key advantages. First, it provides efficiency through dynamic scaling that matches resource allocation with current demand. Second, it requires minimal changes to the database architecture or application logic, making it a straightforward option for improving performance.
Horizontal scaling, also known as scaling out/in, involves adding or removing database instances to distribute the load across multiple servers. This technique is particularly useful for handling high throughput and scaling read or write operations independently.
Elastic Pools provide a group of databases that share resources, which helps manage varying workloads efficiently while controlling costs. Multiple databases within a pool draw from a shared set of compute resources, allowing the system to balance load dynamically.
Sharding distributes large datasets across multiple databases to improve performance. The application layer handles shard management, including data partitioning and routing queries to the correct database instance. This approach works well when data can be naturally divided, such as by customer ID or geographic region.
Read Scale-Out creates read replicas that handle read-heavy workloads without affecting write performance. Write operations go to the primary database, while read operations can be distributed across replicas, improving overall throughput for applications with high read demands.
Horizontal scaling provides two main advantages. It offers scalability by adding more instances to handle larger workloads, and it improves performance by distributing the load across multiple databases.
Azure supports dynamic scaling, which can be either manual or automatic, allowing databases to respond to changing workload demands without manual intervention.
Manual Scaling lets administrators adjust resources through the Azure portal, PowerShell, or CLI when they anticipate changes in demand or need to optimize costs.
Automatic Scaling, available in the serverless compute tier for Azure SQL Database, automatically adjusts compute resources based on workload demand. The system adds resources during peak periods and scales back during quiet times, optimizing both performance and cost.
To determine the optimal solution for specific workload demands, consider the following: vertical scaling is ideal for applications needing performance boosts without architecture changes, while horizontal scaling suits applications requiring extensive scalability and load distribution. Both scaling techniques can be dynamically managed to optimize performance, cost, and resource allocation, ensuring databases meet the demands of varying workloads.
Venture into the world of Azure Infrastructure, where design meets functionality. Harness your skills and gain mastery over complex cloud structures to ace the AZ-305 Designing Microsoft Azure Infrastructure Solutions exam!
Prepare and test your skills

Prepare and test your skills

Vertical scaling, or scaling up/down, involves increasing or decreasing the compute size of an individual database by adjusting service tiers or vCores. Horizontal scaling, or scaling out/in, involves adding or removing database instances to distribute load across multiple servers using techniques like elastic pools, sharding, or read scale-out.
Vertical scaling is ideal for applications needing a performance boost without changes to the database architecture or application logic. Horizontal scaling suits applications requiring extensive scalability and load distribution, such as those with high throughput or the need to scale read and write operations independently.
The Hyperscale tier is designed for very large databases and allows for extensive storage scaling.
Automatic scaling, available in the serverless compute tier for Azure SQL Database, automatically adjusts compute resources based on workload demand by adding resources during peak periods and scaling back during quiet times.