Posts

Showing posts from April, 2021

Blazor File Upload (Updated)

Image
  With the release of .Net 5.0, a new Blazor file upload component was released.  I wanted to replace my old file upload component that I published way back in Oct of 2019, post  with the new 5.0 one. This post is working with the Blazor Server side, but this will work with Web Assembly except you will need a server API to do the actual file upload. Changes I started by updating my Blazor project to /net 5.0.  That part was easy.  My next step was to replace the component.  As it turned out, my old component was named the same as the new one:           <InputFile OnChange="@HandleSelection" /> For the selection handler, I had to make a couple of changes.  The changes were 1. Switched the agreement from IFileListEntry to InputfileChangeEventArg 2. The collection of files that were selected changed from FileListEntry to IBrowserFile.   Working with IBrowser file object does change the information that we have access to like the ContentType.   3. Remove the GetFileType met

Yes, Blazor Server can scale!

Image
From the very beginning of the release of Blazor Server naysayers have incorrectly stated that Blazor Server can not scale.  They usually state that the limit is 5,000 concurrent users. There are several misconceptions and wrong assumptions about their statement.  Let's break it down and get a better understanding of Blazor server-side scaling. What is the "limit" for users When Microsoft talks about the need to scale an application, what they are saying is that when a normal response for any concurrent user is taking longer than 200 ms, the system is not performant and needs to scale. We will accept that definition: If any normal user response is taking longer than 200 ms, the system needs to scale for concurrent users. By a normal response, we are referring to a page get, a post, etc.  Large database access requests would not be included in this measurement. What is scaling There are 2 common ways to scale, scale, out horizontally, and scale-up, up vertically. In our di