How to Optimize Kubernetes Pod & JVM’s CPU/Memory size for a Large Number of Concurrent Users

ibsleah
ibscts
Published in
5 min readDec 5, 2023

--

There are many use cases where we developers need to provision (optimize) the size of CPU & Memory resources not only in the Kubernetes’s Pod but also in the JVM inside the container.

In this article, we overview the process of updating the above mentioned configuration, in an imaginary application, for both UI and API side.

Photo by Stephen Dawson on Unsplash

Step 1 - Find the maximum CPU & Memory size to support your SLA (service-level agreement)

Verify the SLA

The SLA of your application describes the least amount of expectation of your service, proposed to your end-users.

For example, it may say “when up to 1000 concurrent users individually submit a file (where the maximum size is 500MB) to the application, the application should concurrently process all requested data and return a valid result to the customers individually, no longer than 2 minutes since the request start time”.

In this case, your app should be able to handle 1000 different threads processing 500MB-file’s worth data individually, and return a valid result to the requestor as fast as possible no longer than 2 minutes.

--

--

Responses (1)