question

ryanbuening avatar image
0 Votes"
ryanbuening asked FeiXue-MSFT answered

Configuring Sticky Sessions vs Forwarded Headers - Blazor Server

I'm running a Blazor Server app behind a load balancer. I am aware that sticky sessions can be used with ASP.NET Core when SignalR is running behind a load balancer.

I have also read documentation that talks about using forwarded headers.

My question is, if forwarded headers are used, are sticky sessions still required? Or are these two strategies meant to be used together?

Without sticky sessions enabled, I receive the following error:

86988-image.png


This error is resolved when using sticky sessions. I'm wondering if configuring forwarded headers would fix this as well without the need of sticky sessions.


dotnet-aspnet-core-blazordotnet-aspnetcore-realtime
image.png (19.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

FeiXue-MSFT avatar image
1 Vote"
FeiXue-MSFT answered

Configuring forwarded headers won't fix this issue as it only resolve the problems list below:

  • When HTTPS requests are proxied over HTTP, the original scheme (HTTPS) is lost and must be forwarded in a header.

  • Because an app receives a request from the proxy and not its true source on the Internet or corporate network, the originating client IP address must also be forwarded in a header.*

The sticky session resolve the different problem that make sure a specific connection be handled by the same server process.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.