Получи случайную криптовалюту за регистрацию!

This post will be interesting to those, who run Java applicati | CatOps

This post will be interesting to those, who run Java application in Kubernetes. Specifically, if you use OkHttp client for Java.

Kubernetes network load balancing using OkHttp client - the name speaks for itself. Basically, the problem is that OkHttp uses persistent connections to communicate with the peers. Therefore, IPVS - the default K8s load balancer - is unable to properly balance those connections. Thus, you may have all the connections served by a single replica of your downstream service!

This article provides some useful insights on how to trace down this issue and how to fix it in your code, as well as it mentions tradeoffs of such fix.

#kubernetes #java #programming