Chris Ross

Results 447 comments of Chris Ross

Try: ``` "SessionAffinity": { "Enabled": true, "AffinityKeyName": "Yarp.Session" } ```

@Lukejkw what issues are you hitting? Have you tried the session affinity setting shown above?

There's not a lot of detail to give, enabling session affinity is the main requirement. WebSockets, Long Polling, and SSE should just work.

The affinity cookie is encrypted so you'll have to have shared data protection keys across instances. See https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/web-farm?view=aspnetcore-6.0#data-protection Otherwise, as long as the gateways all have the same config it...

> Is the destination ID manually defined or determined dynamically based on the downstream service instance responding to the request? That depends on your config provider. For the Json config...

https://docs.microsoft.com/en-us/aspnet/core/security/ip-safelist?view=aspnetcore-6.0

@bbelius, thanks for sharing, it looks pretty good. - Note RemoteIpAddress is only null if the transport doesn't support it, like TestServer, it's not a thing clients can choose to...

Was that config laid out any differently than the standard config? Could you use the normal IConfiguration merging instead?

Notes: - SessionAffinityCookieConfig is too low level for this, we want those record types to be fully serializable. - ClusterModel is a more likely candidate. - This might require a...

When exploring how a service could do this, I realized it might be easier to just derive from the current implementation. This requires making a few types public that we...