How to Manage Keycloak Session on AWS ECS?
Asked by
CuriousCoder92
Hey everyone! I'm looking for some advice on hosting Keycloak on AWS ECS. I'm a bit confused about how to handle session management across multiple tasks since I've heard that Keycloak doesn't support using Redis as a cache. What are the best practices to ensure that Keycloak retains sessions and shares them across all containers? Any tips would be greatly appreciated!
Answers
We run Keycloak on ECS alongside an Infinispan cache also on ECS, but honestly, it's a real hassle. Whenever AWS needs to patch, we face issues with manual management, which undermines the benefits of using ECS. The service doesn't rebalance correctly, and it has led to a lot of frustration from our users.
Reply to this answer
Iโm not fully familiar with Keycloak's specific requirements, but in general, if you want to make your ECS setup stateful, you might want to consider using EFS (Elastic File System). Otherwise, if session management is critical, switching to EC2 could allow you to tighten your security settings better. Just a thought!
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions