How to get the latency of an application deployed in Kubernetes?

11/29/2019

I have a simple java based application deployed in Kubernetes. I want to get the average latency of requests sent to the application(GET and POST).

Stackdriver Monitoring API has the latency details of loadbalancer. But that can only be collected after 210 seconds which is not sufficient in my case. How can I configure in Kubernetes to get the latency details every 30 seconds (or 1 minute) immediately.

I wish the solution to be independent of Java so that I can use it for any application I deploy.

-- anushiya-thevapalan
google-kubernetes-engine
kubernetes

2 Answers

11/29/2019

Use a Service Mesh

A Service Mesh will let you observe things like latency between your services without extra code for this in each applications. Istio is such an implementation that is available on Google Kubernetes Engine.

Get uniform metrics and traces from any running applications without requiring developers to manually instrument their applications.

Istio’s monitoring capabilities let you understand how service performance impacts things upstream and downstream

See Istio on GCP

use a service mesh: software that helps you orchestrate, secure, and collect telemetry across distributed applications. A service mesh transparently oversees and monitors all traffic for your application, typically through a set of network proxies that sit alongside each microservice.

Welcome to the service mesh era

-- Jonas
Source: StackOverflow

11/29/2019

On GKE, you can use Stackdriver Trace, which is GCP specific. I am currently fighting with python client library. Hopefully Java is more mature.

Or you can use Jaeger, which is CNCF project.

-- suren
Source: StackOverflow