Repository navigation
Keycloak 26 performance when running multiple replicas #39727
|
Hi, community We are preparing a Keycloak 26 installation for production use. During the load testing, we observed a significant performance discrepancy when comparing single-replica and three-replica setups, as shown in the screenshot below: In these tests, each node requests 1 CPU and is limited to 6 CPUs, with memory requests and limits set to 3072Mi and 12288Mi, respectively. Such large resources are set up to ensure Keycloak is resource-limited. During the tests, Keycloak does not come close to reaching its resource limits. We also ruled out that this issue is database-related. This is because we don’t observe any Keycloak threads waiting for database connections; the Keycloak connection pool is not exhausted, and CPU/memory usage in RDS remains reasonable for load testing. The above leads us to believe that the issue lies with Infinispan, as a single-node setup does not require Infinispan to share data across nodes. We dug deeper into this and enabled tracing to figure out what is happening. From tracing, we found that sometimes an Infinispan transaction took about 5 seconds: Under higher loads, things get progressively worse, with some requests taking up to 25 seconds on average: We are hoping that someone can help us understand this behavior. The setup
|
Replies: 1 comment 1 reply
|
Can you see if #39023 addressed this with 26.2.4? |
Can you see if #39023 addressed this with 26.2.4?