liveBook · Manning

Replica capacity

As explained in Kubernetes for Developers

Replica capacity is the number of requests per second that one workload replica can serve.

Replica capacity is the number of requests per second one workload replica can serve. Measure it under a known load, then use it to estimate how many replicas current traffic requires. section 6.2.1

Use replica capacity to:

  • Estimate replicas with replica_count = RPS ÷ replica_capacity. section 6.2.1
  • Plan manually by measuring tested capacity, projecting traffic, and increasing replicas accordingly. section 6.2.1
  • Drive automatic scaling with a Kubernetes Horizontal Pod Autoscaler using an external RPS metric. section 6.2.1

Scaling an HTTP workload

Expose the workload through a NodePort Service and Ingress, generate traffic with ab, and observe the HPA add replicas as request load rises.

How Kubernetes for Developers covers it

How deep it goes
Defines the metric, gives its replica-count formula, and stops short of detailing the capacity test methodology.
Examples
Uses an Ingress-backed workload, ApacheBench traffic, and HPA output showing four replicas under load.
What it assumes
Assumes familiarity with workload replicas and HTTP traffic, while introducing external metrics and Ingress requirements.
What you can do after
Apply it via measured capacity estimates or configure an HPA with an external RPS metric.
How it connects
Connects RPS, Horizontal Pod Autoscaler, external metrics, Services, and Ingress.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.