# Elastic Scale

> Automatically scale applications based on demand using HPA and VPA

- **Category**: Cloud
- **Subcategory**: Advanced
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_elastic_scale/

---

## Description
The Elastic Scale pattern uses Horizontal Pod Autoscaler (HPA) and Vertical Pod Autoscaler (VPA) to automatically scale applications based on demand. HPA adjusts the number of pod replicas based on CPU/memory usage, while VPA adjusts resource requests and limits. This enables applications to handle varying loads efficiently.


## Use Cases
Use when you need applications to scale based on demand or when you want to optimize resource utilization automatically.





## Trade-offs


### Advantages

- Automatic scaling based on demand

- Optimizes resource utilization

- Handles load variations

- Reduces manual intervention




### Considerations & Drawbacks

- Requires metrics and configuration

- Can have scaling delays

- May cause resource contention







---
**Reference**: [Original Source](https://github.com/k8spatterns/examples/tree/master/advanced/ElasticScale)

