0
votes

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.

5
"At least 20,0000 concurrent users." (1) Azure can handle it; (2) Are you YouTube?Bennyboy1973

5 Answers

1
votes

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.

1
votes

I would look into Blazor WebAssembly instead.

https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1#blazor-webassembly

If you would still like to continue with Blazor Server you can read more below.

https://docs.microsoft.com/en-us/aspnet/core/blazor/hosting-models?view=aspnetcore-3.1#blazor-server

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://docs.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/

0
votes

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://docs.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

0
votes

I would say it is right to point out that there are old technologies that got many recourses and new ones that got many potential. So, you can have one that is reliable and got huge user and that is open source that is to stay. React, Vue, flutter, Tensorflow.

0
votes

Blazor server app can definitely be used, but you have to take care of few things.

  • A full-blown ASP.NET Core server is required to host the application. Serverless deployment scenarios such as serving the app from a CDN aren't possible.
  • An active connection to the server is always required. This means there is a need to keep the server up and running 24X7. If the server is down, the application stops working.
  • As every user interaction involves a round trip to the server a higher latency usually exists when compared with Blazor WebAssembly hosting.
  • Scalability can be challenging especially for the apps that have many users as the server must manage multiple client connections and handle client state. However, we can overcome this scalability issue, by using Azure SignalR Service with a Blazor Server app. This service allows a Blazor Server app to scale really well by supporting a large number of concurrent SignalR connections.

Reference: https://www.pragimtech.com/blog/blazor/blazor-hosting-models/