[keycloak-user] When realm count reaches around 470, Keycloak basically becomes unstable

Kamal Mettananda lkamal at gmail.com
Thu Jan 31 08:29:54 EST 2019


Hi all

We are having a Keycloak 4.8.1.Final deployed on a k8 cluster with two
nodes with default settings. Backend database is PostgreSQL.

We are increasing the number of realms in Keycloak to figure out if
Keycloak can support a larger number of realms; these creations are done
sequentially.

However, when the quantity of realms reach around 470, it makes keycloak
basically unusable with admin GUI not loading at all and requests taking
too long to execute.

Below is a summary of the time taken. We have not added any users into the
realms.

+--------------+----------+------------+------------+------------+
|  Operation   | 0 realms | 100 realms | 250 realms | 350 realms |
+--------------+----------+------------+------------+------------+
| Create realm |     1104 |       3739 |       8659 |      11535 |
| Get realm    |      128 |        961 |       3067 |       3853 |
| Get token    |      636 |       1159 |       2714 |       3197 |
| Get roles    |      127 |       1037 |       3034 |       3649 |
+--------------+----------+------------+------------+------------+

Are there any known limitations or an optimal number of realms for a
Keycloak deployment?

Thanks


More information about the keycloak-user mailing list