shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

documentation of proxy.realm-id from containerproxy for redis namespace separation with multiple shinyproxy instances

Open damianslee opened this issue 5 months ago • 1 comments

while realm-id is a proxy config read in by the containerproxy project. raising this doco issue here as more people will find this.

i am using the aws ECS backend with mutiple instances of shinyproxy ECS clusters.

Using Redis/aws valkey for session and app persistence. I didn't want to have to deploy multiple redis instances for a small number of keys each shinyproxy creates. i want 1 redis instance and namespaces.

initially i went down the springboot redis namespace, but that only worked for sessions and not app persistenace.

i then found in containerproxy the identity service loads a proxy.realm-id config if it exists. if it exists all redis keys use the realm-id in the key namespace. allowing a single redis instance to be used with multiple shinyproxy instances.

so far it looks okay. if this is a supported configuration, can it be documented?

https://github.com/openanalytics/containerproxy/blob/master/src/main/java/eu/openanalytics/containerproxy/service/IdentifierService.java#L84

damianslee avatar Jul 21 '25 12:07 damianslee

Hi

Thanks for opening this issue! You can indeed use proxy.realm-id for this. The reasons it's not yet documented, is that it's mostly useful when using the operator (either on Docker or Kubernetes). Especially in Kubernetes, the realm-id is automatically configured based on the name of the resource. For Docker, users have to set up the realm-id themselves, so I think it makes sense to document it now. I'll soon update the docs.

LEDfan avatar Jul 31 '25 09:07 LEDfan