Vertical Scaling
Expanding resources that existing server uses to increase capacity:
- Upgrading memory, storage, or processing power
- Complex and time-consuming process
- Usually requires database downtime
When selecting a database as an architect, you need to consider several key factors that will inform your decision-making process.
Structure: Tabular form of columns and rows
Schema: Strict schema rules
Benefits:
Use Cases:
Optimization: Optimized for structured data stored in tables; supports complex one-time queries through joins
ACID Compliance: Transactions are atomic, consistent, isolated, and durable
Structure: Variety of structure models (key-value pairs, document, or graph-based)
Schema: Flexible schemas
Benefits:
Use Cases:
Optimization: Optimized for fast access to structured, semi-structured, or unstructured data with high read and write throughput
Non-relational databases (NoSQL) are purpose-built databases for specific data models including key-value, graph, document, in-memory, and search. They can store structured, semi-structured, and unstructured data with flexible schemas where each object can have a different structure.
Database capacity planning involves considering current and future capacity when selecting and updating database resources. The goal is to adjust and optimize database resources based on usage patterns and forecasts.
Vertical Scaling
Expanding resources that existing server uses to increase capacity:
Horizontal Scaling
Increasing the number of servers that the database runs on:
With AWS managed database services, your responsibility decreases significantly compared to hosting databases on-premises or on EC2 instances.
Task | On-Premises | Amazon EC2 | Managed AWS Database Service |
---|---|---|---|
Power, HVAC, Network | ✓ | ||
Rack and Stack | ✓ | ||
Server Maintenance | ✓ | ||
OS Installation | ✓ | ||
OS Patches | ✓ | ||
Database Installation | ✓ | ✓ | |
Database Patches | ✓ | ✓ | |
Database Backups | ✓ | ✓ | |
High Availability | ✓ | ✓ | |
Scaling | ✓ | ✓ | |
Application Optimization | ✓ | ✓ | ✓ |
With managed AWS database services, you are responsible only for optimizing your queries and ensuring the database layer works efficiently for your application. These solutions provide high availability, scalability, and database backups as built-in configurable options.
Database capacity planning is a continuous process where you monitor to determine whether existing infrastructure can sustain anticipated workload, and evaluate cost dynamics of scaling up infrastructure when needed.