Scaling in/down RRS feed

  • Question

  • User815233759 posted

    I don't really see how to use Blazor ,or SignalR for that matter, in a load balanced scenario where the servers can be scaled down when the load (whatever you metric is) drops?

    I looked and hoped that SignalR server would deal with this, but because you have to have AFF enabled (do you?) then how can this ever be handled with a user in mind?

    Even if you said no scaling, how can you do live updates, as in pushes of code, not messages/ui components. I mean a CI/CD scenario?

    Saturday, March 13, 2021 2:30 PM

All replies

  • User-474980206 posted

    Blazor server counts on a consistent persistent connection, as the user context is in memory. If the connection drops and the the client does not connect to the same server, all context is lost. To the user it’s like a fresh start. This is like losing session in a standard web site.

    on CI/CD you would typically shut the site down update and restart the site. This of course would also trigger a rescale. 

    Saturday, March 13, 2021 3:49 PM
  • User815233759 posted

    Hi Bruce,

    Yeah, totally get that, but don't want that. We want an app that we can update while users are  using it.

    I following blog post:  Blazor State Management | Developer for Life (jeremylikness.com) and can see how that would work, so now thinking that if we overrode the SignalR reconnection code so that it tried for say 1s, and then just created a new connection with the users session details this would then just connect to a new server, and use the saved session details.

    This seems like a lot of work and was I hoping that there might already be something built to cover this. I'm going to look at BlazorState then attempt my own version of the overide above. 

    As this is being tested as a replacement for a web.forms app, I was really hoping to be done with tracking state!

    Just to be clear, its totally the user experience of the live app update that I want to deal with, so no whole screen blanked while trying to reconnect.

    Saturday, March 13, 2021 4:09 PM