-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Description
Due to heavy usage of caches it can be difficult to predict the memory requirements for Keycloak. Additionally, it can be difficult to tune Keycloak to use less or more memory for caches, especially when considering Keycloak uses multiple caches.
Currently Keycloak provides 8 different configuration for setting the maximum size of some caches, while for some caches it's not possible to configure an maximum amount to store in memory.
Having to tune 8 different caches separately as well as tuning in terms of maximum counts rather than memory usage makes it very difficult to increase or decrease the amount of memory Keycloak requires. Additionally, balancing the maximum counts with the allocated memory to Keycloak is almost impossible, which could easily lead to out of memory problems. When an out of memory happens the garbage collection will go up significantly, degrading the throughput until eventually all requests will start failing. Only remedy in these situations is to restart Keycloak, but unless the cache configuration is tuned it will eventually lead to the same problem.
Value Proposition
Making it easier to configure cache memory requirements will make it easier to provision the required nodes for Keycloak, as well as making it easier to tune Keycloak to use less or more memory for caching.
Goals
- Make it easier to understand how much memory Keycloak requires for caches
- Make it easier to tune Keycloak to use more or less memory for caches
- Prevent out of memory problems caused by caches
- Prevent any unbounded caches that can grow in-definitively
Non-Goals
Discussion
No response
Notes
No response