title: Large scale multi-tenanting scenarios with Keycloak
body: <p>I'm trying to understand how Keycloak can be used in a large scale multi-tenanted scenario.</p>
  
  <p>The standard approach seems to be to use a realm for each tenant. This isolates each tenant's users and settings and makes a lot of sense. </p>
  
  <p>In the <a href="https://github.com/keycloak/keycloak/tree/master/examples/multi-tenant" rel="noreferrer">Keycloak example for multi-tenanting</a> it says it "demonstrates the <strong>simplest possible scenario</strong> for Keycloak Multi Tenancy support" (emphasis mine). I might be reading too much into this, but to me that implies there are other standard approaches. I haven't been able to find much discussion about these options though.</p>
  
  <p>I've also read that there are potentially <a href="https://issues.redhat.com/browse/KEYCLOAK-4593" rel="noreferrer">performance issues with more than 100 realms</a>. It might be that these performance issues have been fixed, but this also suggests to me that Keycloak wouldn't handle a large scale multi-tenanting scenario with 1,000+ tenants.</p>
  
  <p>So my questions are:</p>
  
  <ul>
  <li>Are there any other recommended approaches for multi-tenanting, other than "one realm per tenant"?</li>
  <li>Are there any large scale multi-tenanting deployments of Keycloak in the wild that demonstrate its ability to cope with lots of realms?</li>
  <li>Are there any recommendations for sources of information that I should be looking at?</li>
  </ul>