Last post Aug 14, 2019 07:02 AM by Rena Ni
Aug 13, 2019 05:53 PM|cmacivor|LINK
My team is evaluating Blazor as an alternative to Angular for some upcoming front end work, and have been thoroughly impressed with it. At this stage of its development we think it will serve our needs nicely, but we still are in need of some guidance.
Our remaining questions have to do with how the server side version of Blazor would behave in a load balanced environment. The State Management section of the Blazor docs (https://docs.microsoft.com/en-us/aspnet/core/blazor/state-management?view=aspnetcore-3.0)
does a great job of answering most of the questions we’ve had, and we plan on following that article’s recommendations. Here is what we are still wondering:
Thank you in advance to anyone who can weigh in on this.
Aug 13, 2019 08:27 PM|maherjendoubi|LINK
Blazor server-side is a stateful app framework. Most of the time, the app maintains an ongoing connection to the server. The user's state is held in the server's memory in a
In multiserver, load-balanced deployment environments, any server processing requests may become unavailable at any given time. Individual servers may fail or be automatically removed when no longer required to handle the overall volume of requests. The
original server may not be available when the user attempts to reconnect.
Aug 14, 2019 07:02 AM|Rena Ni|LINK
Are there any changes necessary to the load balancer itself for this to work?
You need to configure the middleware with ForwardedHeadersOptions like below:
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
are there any configuration changes necessary on the servers for Blazor to work in a load balanced environment?
No,you don't need to configure any changes.
Are there any other pitfalls we should be aware of?
You could refer to what maherjendoubi said and the official document could refer to: