Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Feb 10, 2024

Backport of #53929 to release/8.0

/cc @halter73

Disable buffering of Blazor streaming responses

Description

This change disables response buffering and compression (edit: if compression would cause buffering) for streaming Blazor responses in the same way SignalR does for streaming SSE responses. It checks the state of the QuiescenceTask before writing the initial render to the response body to avoid unnecessarily disabling buffering for non-streaming responses.

Fixes #52323

Customer Impact

Instead of seeing UI update immediately as new content becomes available which is the point of streaming rendering, the streaming component is only rendered after all the content arrives completely. This may be never depending on the design of the application.

This affects customers hosting Blazor apps on servers that buffer responses. This includes App Service and IIS Express in their default configurations. You can work around this by configuring the server to disable compression and buffering as described in the customer reported issue at #52323, but it's not discoverable. Nonetheless at least 5 customers have found this issue already.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

This change only affects streaming rendering which is new in .NET 8, and it uses a pattern already used by SignalR for SSE responses to disable buffering.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@github-actions github-actions bot requested a review from a team as a code owner February 10, 2024 00:20
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Feb 10, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 8.0.x milestone Feb 10, 2024
@halter73 halter73 added the Servicing-consider Shiproom approval is required for the issue label Feb 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 20, 2024
@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Feb 22, 2024
@wtgodbe wtgodbe merged commit de3830c into release/8.0 Mar 6, 2024
@wtgodbe wtgodbe deleted the backport/pr-53929-to-release/8.0 branch March 6, 2024 21:00
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.4 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun Servicing-approved Shiproom has approved the issue

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants