Between predictable and practical - on kubernetes limits
Find out how resource consumption behavior of workloads in Kubernetes can help you make informed decisions about limit and request settings
You might think that limits are a Kubernetes admin’s best friend. By restricting the CPU and memory that Pods can consume, you can avoid “noisy neighbor” issues, streamline resource allocation and keep your clusters humming smoothly, right?
Well, not necessarily. Limits have their limitations. Although it’s good and well to set limits for those workloads that are predictable enough to benefit from resource consumption restrictions, limits can do more harm than good in cases where workloads are very “spiky.”
That’s why, on the whole, we think use of limits should be limited. As working with CPU limits requires a deep understanding of the implications, there are approaches that suggest avoiding the use of CPU limits. While it’s critical to get to know your workloads well before making strategic decisions on whether to set limits, and which kinds of limits to apply if so, we would like to shed some light on use-cases where CPU limits can really come in handy.
Let’s dive in…
How Kubernetes limits work
Limits in Kubernetes work in a pretty straightforward way: They restrict how many CPU and/or memory resources Pods or containers can access. For example, if you want to set a CPU limit of 500m for a container inside your Pod, you’d describe it with YAML such as the following:
Explore related posts
Bursting the Microservices Architectures Bubble
What to consider when opting for a microservices architecture, and everything you need to know before implementation.
Kubernetes Monitoring: Embrace metrics for the full picture
Discover everything you need to know about Kubernetes monitoring, how to keep it painless and effective.
Redis Monitoring: Gaining Fresh Perspective on Your Key-Value Store
Monitoring Redis databases in order to troubleshoot performance and other issues isn't always straightforward, but with the help of tools like eBPF, it's possible to gather insights in ways that would simply not have been possible using traditional approaches to Redis monitoring.