by brakmic on 4/10/23, 6:48 PM with 77 comments
by photonios on 4/10/23, 8:26 PM
At work, I ran 9 Keycloak clusters in production, handling tens of millions of sessions where the cost of losing sessions was high. The amount of time we wasted on getting it to work reliably with its default configuration of storing the sessions in its distributed, in-memory cache (Infinispan) is insane. It just isn't designed to handle such a work load reliably. Unless you're willing to spent months tuning it for every possible scenario, you WILL lose sessions.
If you are in this situation, shoot me an email. I have been through this pain and it took a lot of painstaking work to get to a highly reliable set up at scale.
by vsviridov on 4/10/23, 8:31 PM
by ahachete on 4/10/23, 9:19 PM
There is an important improvement, though: the Postgres deployed here is not production ready (high availability, backups, monitoring, etc).
We run Keycloak on StackGres [1] which gives us production-ready Postgres setup (disclaimer: it's dogfooding). Happy to share the YAML manifests used to deploy Keycloak with StackGres. Maybe we will write a blog post as a follow-up to this one, for completeness.
[1]: https://stackgres.io
by vbezhenar on 4/11/23, 2:50 AM
by hotpotamus on 4/10/23, 8:20 PM
by rubentanlz on 4/11/23, 1:18 AM
by Too on 4/11/23, 4:51 AM
You will not be able to scale anything up anyway since it’s a single instance mounting the same data.
by xupybd on 4/10/23, 8:20 PM
Wow the learning curve was steep on that one. Not having ever touched OpenID or anything other than forms based authentication and not knowing ASP.Net very well.
But it's neat to get it all up and running. Still a few issues with getting Keycloak to redirect to HTTPS but we will get there.
by boris-ning-usds on 4/11/23, 1:47 AM
How do people in the field handle configuration updates with code? For example, if I want to set it up as an identity broker to an idp, I would want that configuration backed by code, reviewed by my team. Is anybody using the keycloak terraform provider https://registry.terraform.io/providers/mrparkers/keycloak/l... in production?
Do people diff the realm json configuration as code and use that instead?
by vxxzy on 4/10/23, 7:50 PM
by hsn915 on 4/10/23, 11:31 PM
I am kinda curious though about the kind of personality type that enjoys this kind of stuff.
Of course, I have never heard of "Keycloak" before, so I checked their homepage:
"No need to deal with storing users or authenticating users."
Wait a second, is dealing with storing users and authenticaing them _so much pain_ that you rather inflict yourself with the pain of setting up and managing a k8s cluster?
I seriously don't get it.
by vbezhenar on 4/11/23, 2:48 AM