Application Performance Management For Microservice Applications On Kubernetes The Ultimate
Application Performance Management For Microservice Applications On Kubernetes The Ultimate
Performance
Management for
Microservice Applications
on Kubernetes
The Ultimate Guide to Managing
Performance of Business Applications
on Kubernetes
Application Performance Management for Microservice Applications on Kubernetes
Table of
Contents
P. 4 P. 6
Kubernetes Basics Kubernetes Application
(or the A-B-C’s of K-8-S) Monitoring Challenges
P. 12 P. 16
Seeing Through Should You Use
the Complexity Prometheus?
P. 17 P. 22
Kubernetes Monitoring Conclusion
Tools and Strategies
There’s a reason everyone is talking about Kubernetes these days. It has become the go-to
container orchestration solution for organizations of all sizes as they migrate to microservice
application stacks running in managed container environments.
Kubernetes is certainly worthy of the recent excitement it has garnered, but it doesn’t solve every management
problem, especially around performance. It’s important to understand what Kubernetes does, and what it doesn’t do;
and what specific capabilities DevOps teams require from their tooling to fully manage orchestrated microservice
applications and achieve operational excellence.
This eBook examines Kuberenetes, the operational issues it addresses, and those that it does not. Additional
examination of modern DevOps process is included, with a discussion on management tooling needed to achieve
continuous delivery of business services leading to excellent operational performance. The eBook concludes with a
detailed analysis of the capabilities needed from your tooling to successfully operate and manage the performance of
microservice applications running on Kubernetes.
Application Performance Management for Microservice Applications on Kubernetes
Kubernetes Basics
(or the A-B-C’s of K-8-S)
Kubernetes (sometimes abbreviated K8s) is a container
orchestration tool for microservice application deployment.
It originated as an infrastructure orchestration tool built by
Google to help manage container deployment in their
hyper-scale environment. Google ultimately released K8s
as an open source solution through CNCF (the Cloud-Native
Computing Foundation).
Notice there is a critical Orchestration is just a fancy word that summarizes the basic Kubernetes features:
aspect of operational
management • Container deployment automation, relieving admins of the need to manually start them
missing - application
• Instance management - balancing the number of instances of a given container running
performance management.
concurrently to meet application demand
The whole discipline
of application performance • DNS management regarding microservice / container load balancing and clustering to
visibility and management help manage scaling due to increased request load
is not part of the
Kubernetes platform. • Container distribution management across host servers to spread application load
evenly across the host infrastructure (which can help maximize application availability)
4
Application Performance Management for Microservice Applications on Kubernetes
Remember, the goal of DevOps Many cloud providers have their For most enterprise use cases,
is speed!! Orchestration is all own versions of Kubernetes it‘s much faster and easier to
about enabling fast and easy (called a “Distribution”) that use a cloud provider’s
changes to production have unique enterprise Kubernetes distribution than to
environments so that business capabilities added to the open set up the open source version.
applications can rapidly evolve. source Kubernetes version, A wide variety of Kubernetes
which provide a few distinct distributions are available,
The message is clear: advantages: designed to run either on local
speeding up your infrastructure or as a hosted
• Organizations concerned service in the cloud.
application delivery
about enterprise readiness
cycles adds huge value
get a fully tested and
to your business. You can get an
supported version of k8s
updated list of
Automating container • Additional enterprise distribution providers
orchestration is a great functionality is included in Kubernetes
complement to agile - for example, Red Hat’s online docs.
development methods and the OpenShift K8s distribution
microservice architecture. adds security features and
Modern CI/CD is automating build automation to the mix
the testing and delivery stages
of development - containers
and Kubernetes make it much
easier to get your code into
production and manage
resources.
5
Kubernetes Application
Monitoring Challenges
Container Management is NOT
Application Performance Management
Root-Cause Ambiguity
Application Performance Management for Microservice Applications on Kubernetes
Container Management
is NOT Application
Performance
Management
Now that we’ve discussed what and how service requests are
Kubernetes does, let’s explain flowing across the microservices
what it does not do. Remember, is not easily available via
Kubernetes orchestrates Kubernetes, nor is performance
containers that are part of an data (request rate, errors and
application. It does not manage duration or latency) of services a
application performance or the native part of Kubernetes.
availability of highly distributed
Operational
applications. Similar to
applications, Kubernetes doesn’t production monitoring
consider performance when of application
managing infrastructure. performance and
health is absolutely
Kubernetes effectively adds a not available via
layer of abstraction between the Kubernetes.
running application (containers)
and the actual compute Let’s look at other aspects of
infrastructure. On its own, orchestrated containerized
Kubernetes makes decisions application environments that
about where containers run, and further complicate monitoring.
can move them around abruptly.
Visibility of exactly how your
technical stack is deployed,
7
Application Performance Management for Microservice Applications on Kubernetes
8
Application Performance Management for Microservice Applications on Kubernetes
Decoupling of
Microservices from
Physical Infrastructure
9
Application Performance Management for Microservice Applications on Kubernetes
10
Application Performance Management for Microservice Applications on Kubernetes
Root-Cause Ambiguity
11
Application Performance Management for Microservice Applications on Kubernetes
Let’s look at key types of visibility that your monitoring should support for applications running in a Kubernetes environment.
As discussed earlier, Kubernetes injects a new level of application Kubernetes services are NOT the same as application services.
abstraction, making it difficult to know how well individual services The K8s documentation states:
are running, or the interdependencies between all the deployed
services. Your APM tool must be able to see past Kuberenetes and
“A Kubernetes Service is an abstraction
the container system to identify the application services - and how
they are related to each other. which defines a logical set of Pods and
a policy by which to access them”
$ kubectl get svc
There can be multiple application services within a Pod.
Lists out Kubernetes service definitions but not
their relationships.
12
Application Performance Management for Microservice Applications on Kubernetes
13
Application Performance Management for Microservice Applications on Kubernetes
Deployment Failures
If Kubernetes fails to deploy a pod as expected, you want to know why and how The event stream will show where the deployment
it happened. However, it’s more important to understand if your application failed.
functionality has been negatively impacted by this deployment failure. Is your
application slower and handling less workload or is it throwing errors because a Since you cannot see the performance
critical service is unavailable? of your application using kubectl
commands, the only way to answer the
$ kubectl get events --field-selector involvedObject.name=my-deployment question above is with an APM tool that
understands Kubernetes.
Performance Regressions
If your application is responding slowly, it’s important to identify the issue and Infrastructure metrics like CPU, memory, disk I/O,
trace it to its root cause quickly. Since Kubernetes was not designed to help network I/O, etc are good KPIs to reference while
with this use case, there are no kubectl commands you can run to understand troubleshooting performance issues but they are only
microservice or application performance. a part of the information required to fully ascertain
root cause. There might also be issues with the
Troubleshooting microservice applications running on application code or Kubernetes configuration issues
Kubernetes requires your APM tool to have the ability to that are causing resource contention. It’s quite
common to over-allocate CPU and memory resources
correlate metrics up and down the full application stack:
on Kubernetes nodes with improper configuration.
infrastructure, application code, kubernetes system
information, and the trace data between the services.
14
Application Performance Management for Microservice Applications on Kubernetes
Performance Optimization
Opportunities
15
Application Performance Management for Microservice Applications on Kubernetes
Time series metrics | Flexible API | High cardinality | Monitoring and Alerting
Prometheus is a good stand-alone tool Prometheus is an open-source time series metrics monitoring and alerting tool.
for collecting time series metrics but it is It is typically used to monitor KPIs, such as rates, counters, and gauges from
not capable of meeting the majority of use infrastructure and application services. You can use Prometheus to monitor request
cases presented in this document. Here response times but this often requires that you modify your source code to add the
are the drawbacks of using Prometheus as Prometheus API calls. This can be useful to understand overall response times and
your monitoring tool: request rates but this approach lacks the detail required to troubleshoot or optimize
application performance.
•• No distributed tracing capability
•• No correlation between service infrastructure and The Kubernetes distribution natively supports Prometheus, and when the
host
Prometheus Helm package is installed, you’ll find several dashboards pre-configured
•• No correlation between Kubernetes resources, request
for the purpose of basic health checks. You’ll also find a few predefined alerts
response times, and infrastructure metrics
•• No analytics interface, roll-ups, or aggregates configured on your cluster.
•• No automatic root cause analysis
•• No automated alerting Ultimately, Prometheus is a good stand-alone metrics tool that
•• Management and Administrative costs
cannot meet the challenges associated with running business
critical microservice workloads on Kubernetes.
16
Kubernetes Monitoring
Tools and Strategies
Achieving the elements described above in a
Kubernetes application requires an APM tool
that includes special features absent within
traditional monitoring tools.
For Kubernetes, you can not just collect monitoring data and detect
anomalies that could signal problems. Let’s look at key capabilities you
need in an APM tool to help you with microservice applications running
on Kubernetes.
Application Performance Management for Microservice Applications on Kubernetes
Root-Cause Analysis
Within the Application,
Containers and
Orchestration
18
Application Performance Management for Microservice Applications on Kubernetes
Integrated Service /
Infrastructure Mapping
19
Application Performance Management for Microservice Applications on Kubernetes
20
Application Performance Management for Microservice Applications on Kubernetes
Dynamic Baselining
Remediation guidance
21
Application Performance Management for Microservice Applications on Kubernetes
Conclusion
Kubernetes is rapidly becoming the standard orchestration
platform in enterprises to augment and even complete the
transition to DevOps, but does not include application
performance visibility or management. Furthermore, Kubernetes
introduces a new layer of abstraction into the datacenter creating
observability challenges making it more difficult to manage
application availability and deliver the needed performance SLAs
demanded by your business.
22
Application Performance Management for Microservice Applications on Kubernetes
Stan
Your Intelligent
DevOps Assistant