Actually keycloak lacks support for large number of clients (over 10K)
Keycloak Version 3.4.6 keeps all clients in memory and reloads them all
(one by one) each time
a client is added or deleted, this behavior causes performance and
deadlock issues (
https://issues.jboss.org/browse/KEYCLOAK-3210).
In the following use cases :
.Mobile application instances dynamically registering themselves to get
installation-specific credentials
.Clients registering with the OAuth server from a developer portal or
API management system
Support for large number of clients is not an option
If you are interested vote for this feature here
https://issues.jboss.org/browse/KEYCLOAK-8275
Regards
Andrea Pasqualini