As our need for more computing resources accelerates, so do the ways in which computing evolves. The arrival of the cloud has enabled us to easily scale to suit our needs. But if we want to keep pace, we need an even more automated way to scale our infrastructure. In this session, we review auto-scaling with Kubernetes, how to set it up, and, most importantly, what to monitor in order to drive auto-scaling in your organization. This presentation is brought to you by AWS partner Datadog.
2. “I think there is a
world market for
maybe 5 computers.”
—Thomas Watson, IBM
3. – Wildly misquoted!
“I think there is a
world market for
maybe 5 computers.”
—Thomas Watson, IBM
4. – Wildly misquoted!
– Sent prospectus to 20
clients, expected 5 orders
“I think there is a
world market for
maybe 5 computers.”
—Thomas Watson, IBM
5. – Wildly misquoted!
– Sent prospectus to 20
clients, expected 5 orders
– Received 18 orders!
“I think there is a
world market for
maybe 5 computers.”
—Thomas Watson, IBM
6. Who am I?
Sean O’Connor,
Director of Engineering
sean.oconnor@datadoghq.com
@theSeanOC
7. What is Datadog?
Observability platform
● Metrics
● Distributed traces (APM)
● Log analytics
● Synthetics
http://datadoghq.com
39. Calculating pods
Target metric value = 500 req/sec/pod
Current metric value = 1,000 req/sec/pod
Current number of pods = 2
40. Calculating pods
Target metric value = 500 req/sec/pod
Current metric value = 1,000 req/sec/pod
Current number of pods = 2
ceiling((1,000/500) * 2) = 4 pods
41. Calculating pods
Target metric value = 500 req/sec/pod
Current metric value = 250 req/sec/pod
Current number of pods = 4
42. Calculating pods
Target metric value = 500 req/sec/pod
Current metric value = 250 req/sec/pod
Current number of pods = 4
ceiling((250/500) * 4) = 2 pods
55. kubectl describe hpa my-hpa
Type Status Reason Message
---- ------ ------ -------
AbleToScale True SucceededGetScale the HPA controller was able
to get the target's current
scale
ScalingActive False FailedGetExternalMetric the HPA was unable to compute
the replica count: unable to
get external metric
nginx.net.request_per_s: no
metrics returned from external
metrics API
56. kubectl describe hpa my-hpa
Type Status Reason Message
---- ------ ------ -------
AbleToScale True SucceededGetScale the HPA controller was able
to get the target's current
scale
ScalingActive True ValidMetricFound the HPA was able to
successfully calculate a
replica count from external
metric nginx.net.request_per_s
ScalingLimited False DesiredWithinRange the desired count is within the
acceptable range
57. kubectl describe hpa my-hpa
Reference: Deployment/my-app
Metrics: ( current / target )
"nginx.net.request_per_s" (target average value): 500 / 500
Min replicas: 1
Max replicas: 3
Deployment pods: 2 current / 2 desired
60. Kubernetes is the
natural evolution
HPA is a great tool
Use the right metrics
Think of work vs.
resource metrics
Consider the 4 golden signals
Recap