Reputation: 147
Please I have an ASP.NET Core Web API project that I need to develop a front-end UI to consume it, taking advantage of the Single Page Application (SPA) and component model of Blazor, I am thinking of using Blazor Server app, but my application is going to be an enterprise app with at least 20,000 concurrent users or more in the future and my concern is obviously the SignalR connection.
Can Blazor server side handle it? Thank you for your kind response.
Upvotes: 1
Views: 2858
Reputation: 1
Blazor server app can definitely be used, but you have to take care of few things.
Reference: https://www.pragimtech.com/blog/blazor/blazor-hosting-models/
Upvotes: 1
Reputation: 3217
Yes, Blazor Server will handle it. You just need additional system resources. Without the deep known of your business and plans nobody can recommend any technology that fits your needs. Once you have Web API, I do not see many advantages of Blazor Server in comparison to Blazor WASM. Blazor WASM is not declared as LTS. Microsoft can stop develop it tommorrow and you will have just about 3 months of support. I recommend to use stable proven technology like Angular/React.
Upvotes: -1
Reputation: 287
If you hand off the signalR part of to a service specific for this purpose, some (a lot?) ofthe performance hit gets taken off from your webapi.
Azure has got services for this - afair, if you new up a new blazor server side in VS and publish it to a Azure subscrition, VS is gonna prompt you about a separate SignalR service along way (and set it up for you).
Not a clear-cut answer to your question, but one of the ways you can tweak your setup to be more performant - if you take the SignalR out of the equation, then it becomes a matter of how heavy your sessions are per user.
Few links if ya wanna dig into this: https://learn.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1
Why is Azure SignalR Service recommended when deploying a Blazor Server Side app?
https://www.youtube.com/watch?v=qe9qANk8Ecw&feature=youtu.be
Upvotes: 0
Reputation: 69968
I would look into Blazor WebAssembly instead.
If you would still like to continue with Blazor Server you can read more below.
Each circuit uses approximately 250 KB of memory for a minimal Hello World-style app. The size of a circuit depends on the app's code and the state maintenance requirements associated with each component. We recommend that you measure resource demands during development for your app and infrastructure, but the following baseline can be a starting point in planning your deployment target: If you expect your app to support 5,000 concurrent users, consider budgeting at least 1.3 GB of server memory to the app (or ~273 KB per user).
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/blazor/server?view=aspnetcore-3.1
Here is a good comparison and also a test done on a Standard D3 v2 instance on Azure (4vCPU & 14GB memory)
with over 20,000 concurrent active users
Note specifically:
The major findings which came out of these experiments were that memory and latency are the main bottlenecks of Blazor Server applications. If latency got above 200ms then performance took a hit and scale was limited by the available memory on the box.
https://stackoverflow.blog/2020/02/26/whats-behind-the-hype-about-blazor/
Upvotes: 1