# Predictable Demands

> Define resource requirements and limits for predictable application behavior

- **Category**: Cloud
- **Subcategory**: Foundational
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_predictable_demands/

---

## Description
The Predictable Demands pattern involves setting explicit resource requests and limits for containers to ensure predictable performance and prevent resource starvation. This includes CPU and memory requests to guarantee minimum resources, as well as limits to prevent excessive consumption. The pattern also applies to storage resources through PersistentVolumeClaims with specific access modes and capacity requirements.


## Use Cases
Use when you need to ensure applications have guaranteed resources or when you want to prevent runaway resource consumption in a multi-tenant cluster.





## Trade-offs


### Advantages

- Predictable performance for applications

- Prevents resource starvation

- Enables efficient cluster utilization

- Supports cluster autoscaling decisions




### Considerations & Drawbacks

- Requires resource capacity planning

- Over-provisioning can waste resources

- Under-provisioning can cause performance issues







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

