Closed punitganshani closed 3 months ago
This sounds like you probably have a call to AddOidcStateDataFormatterCache without adding an IDistributedCache that all nodes can share. Either remove the call to AddOidcStateDataFormatterCache or add a distributed cache (e.g., redis).
The state data cache moves some state out of the query parameters and stores it server side. This is necessary in some federation scenarios where the url can otherwise get longer than is allowed by some networking infrastructure. We store the server side data in an IDistributedCache and by default register the in memory distributed cache. That is appropriate for local development, demos, and non-load balanced environments, but in your load balanced environment you will need a different distributed cache. You may not need the state data cache at all though, so consider that before you rush to add distributed cache to your architecture.
To make that decision, take a look at our documentation here where we discuss the state cache in detail.
@punitganshani Did this help you? If so I'd like to close.
Closing for now but feel free to reopen if the need is there.
We are trying to integrate
Duende IdentityServer 7
inAzure Kubernetes Service
and are using Data Protection as per below inASP.NET
At the backend, we have Azure SQL and we have verified storage of key in the database. For the purpose of scale, number of replica's are kept to
3
inAzure Kubernetes Service
with 'hpa' to allow auto-scale to '10'.For Ingress, we have added following annotations,
Upon login process, we get the error
Unable to unprotect the message.State
When we reduce the number of replicas to
1
, the application runs correctly. This means theDuende IdentityServer
can't load balance. We have verified the documentation hereWhat are we missing?