resource limit

A cap on how much memory, processor time or number of processes a container may use.

A container with no memory limit can exhaust the host and get unrelated processes killed.

In more detail

Without limits a container can use everything the host has, so one misbehaving service can starve all the others. With limits, the same fault only hurts the container that caused it, which then restarts. Docker sets limits with run flags; Compose and Kubernetes set the same control group values from configuration. Set them from the start rather than after the first outage.

Related terms

Taught in

References

Certification courses