-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side Blazor Production and Reliability #10472
Comments
This issue tracks high level work for:
|
We need to first measure the load on some representative app (Blazing Pizza app) |
You can also find a large server side app at https://github.com/oqtane/oqtane.framework |
Moving this to |
OK, after some further consideration, discussions, and research, here's what I'm proposing should actually be considered or attempted during preview 8, in priority order:
The last two "feature" items there are stretch targets. I'm definitely not promising they both get done and shipped for 3.0. It depends on how much other stuff is going on, since they are not committed for inclusion at this stage. It may be that it's sufficient to be able to describe ways of achieving someone along those lines in user code (as some server-side Blazor developers already have done for "auto-reload if reconnection fails"). |
This overlaps with some of the security stuff. I was compiling the same list to get ready to file issues for them. I guess we can add the individual items to the uber issues and just mark them as complete in both places? (Even if it involves a bit of duplication that way we ensure everything we want for a given aspect is covered). |
@javiercn OK, that's good to know. Let's discuss in the sync this morning. Maybe we can break out that particular deliverable into its own issue, assign to you if you're already working on it, and then yes mark it complete in both places when done. |
Hello Team; Thanks! |
@BenHayat Absolutely, that's the plan. |
@danroth27 ; Please cover the issue that for every user that starts our app, a new instance will start and server becomes limited. I'm sure the client-side version will not have this side effect, as out server will be mainly a REST server to respond to a lot more users. |
OK, all the bits that we committed to do in preview 8 (#10472 (comment)) are now done. Any small remaining bits are tracked in their own issues (I think @javiercn still has a couple of JS interop-related bits underway, and all the parts I'm doing are done). I'm unassigning myself now and assigning @mkArtakMSFT for any further triage that might be needed. We may choose to close this issue since it probably doesn't contain remaining value as its items are all covered elsewhere. |
Closing as everything else is now covered as part of referenced issues. |
This is for server-side Blazor. When can we assume the Client-side version to be considered "production ready"? Thanks |
Hi @DrGriff. We haven't officially announced the roadmap for Blazor WebAssembly yet, but we don't expect it ship it until after we've finished work on .NET Core 3.1, which we previously announced will ship in Nov of this year. After .NET Core 3.1 is done, Blazor WebAssembly will become our main focus and we expect it will be ready for production use in the first half of 2020. |
Edit: @rynowak hijacking top post for great justice
Summary
This issue tracks doing all the needed work to support server-side Blazor in production.
I plan to dig into the following areas and for each area assess the current state, make recommendations and log bugs, and write documentation and guidance.
Working in order:
In the background the team will be fixing any high priority issues that come up.
Error Handling
This includes the possible causes and categories of errors that can occur in a server-side Blazor application, and how application developers should be prepared to deal with them.
We divide unhandled exceptions into two categories:
Exceptions that are thrown as a result of an event handler (observed) are not always bugs. It might be a reasonable behavior for a component to throw an exception in response to invalid data for example. We think that logging is good enough for these cases.
For unobserved exceptions, these are generally thrown during the rendering process and can corrupt state. We should not attempt to recover or reuse the circuit if an exception is thrown while rendering.
Notify the client that the circuit is has crashed (ideally with UI).UPDATE Most of this is done. The part that isn't is "displaying an error UI on the client", which is not planned for 3.0
Logging and Diagnostics (Handled as part of #11792)
This includes logging and diagnostics of communications between server-side .NET code and client-side JS code, as well as any significant events on the server side. This can also include DiagnosticSource, EventSource, and EventCounters. We will likely make a prioritized list in this area and draw a cutline. My assumption is that the priority here is around the network ingress/egress.
We need to dial up the amount of logging we can produce on both the server and client, and make it possible for developers to diagnose and report issues that we can take action upon using logs.
Network Reliability
This covers the reliability to SignalR connection, the ability to resume a circuit, and the ability for the browser the reconnect without data loss.
We have some user-reported issues that we are acting upon here, but we need to identify a strategy for testing reliability, and ideally this would dovetail with our other E2E testing strategy.
[ ] When a message fails to send on the client, the message will be queued and delivered in order.This is going to apply for ACK-s only and we've decided not to do anything for JS Interop.The below three issues will be handled as part of milestone verification work after Preview 8 CC date (as part of #12196).
Resource Consumption
This covers understanding and mitigating the causes of excessive resource consumption on the server. Due to Blazor's stateful and connected nature, keeping an eye on how usage patterns can leave to resource exhaustion is important.
Proactively stop/start rendering when a user isn't looking at the tab.No plans to do thisDeactivate circuits due to inactivity. This could be a sample since it might not fit all use cases.No plans to do thisCan we rate-limit the number of connections open (per user/total)? This could use theNo plans to do thisCircuitHandler
if we added the ability to reject a connection.Can we rate-limit events per-connection?No plans to do thisResiliency to App Recycling
This covers the set of infrastructure and guidance users will need to build applications that function well when the server is shut down or crashes. This is important because server-side Blazor holds the the application state in memory on the server - the default experience is that if the server goes away so does all of your state that hasn't been persisted to a data store.
Provide a sample of how components can be notified for a circuit shutdown/load and use that callback to save/load state.No, we wouldn't recommend persisting only on circuit shutdown, as that would be highly unreliable. What if the server goes down unexpectedly? Instead we recommend and have guidance for persisting state frequently, e.g., whenever the user changes that state.Scale out
This covers the set of steps that are required to deploy server-side Blazor is a scalable way (multiple servers). Since Blazor uses server-side memory to hold state, we expect applications to commonly need multiple servers and a scale-out strategy.
Known Items
[Blazor server-side] Better server-side limits #9117 Better server-side limitsThe text was updated successfully, but these errors were encountered: