Conversation
Link HTTP request cancellation to PowerShell execution so client disconnects stop the pipeline promptly. Return a 499-style result for aborted requests, skip cache/response writes for partial output, and still invalidate write caches because a non-GET operation may have already applied.
Store oversized table entities across multiple properties and rows, then reassemble them on read so task parameters and other payloads no longer fail Azure Table size limits. This includes stale part cleanup, conditional-write safety, and regression tests covering large payloads, batch writes, deletes, and orchestrator task rehydration.
String bodies (Response.WriteAsync) and CraftResult.Stream writers reach the encoder through the response pipe, one ~4 KiB segment per write. Brotli's fast qualities compress each write as an isolated fragment, and every encoder pays per-call overhead. Both providers now sit behind a 64 KiB BufferedStream: output still streams every 64 KiB and flushes pass straight through. Real 300 KB ListLogs body: br Fastest 85 KB -> 36 KB and 2.5x faster; br Optimal (the default) ~10-20% less CPU with identical bytes; gzip unchanged. Providers are now constructed with their level instead of via IOptions. Tests: per-encoding negotiation and round-trip, br winning a browser-style Accept-Encoding, and a real-Kestrel check that a varied string body is not fed to the encoder as fragments (fails without the coalescing). Harness: PerfFile serves a captured real response verbatim from PAYLOAD_DIR; run-compression-levels.ps1 gains -Url/-PayloadDir, p50, and a discarded warm-up pass so the first-measured encoding no longer absorbs JIT and pool growth.
.NET 8 on Linux does gzip through the system libz.so.1. Stage zlib-ng 2.3.3 (zlib-compat build, pinned + sha256-verified, runtime CPU dispatch) and copy it onto the runtime's libz.so.1, the same way mimalloc is staged. Azure Linux runtime, 2 vCPU, default level (Optimal = zlib 6): - 10 MB ListLogs body: 165 -> 84 ms per encode, 3.8% smaller on the wire - under load (3 rps of 10 MB): gzip CPU over identity ~60 -> ~37 points - 32 KB: 296 -> 187 us; <= 2 KB unchanged Every case round-trips byte-identical. Brotli is unaffected.
JohnDuprey
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces two main improvements: (1) enhanced handling of HTTP client disconnects and request cancellation in the PowerShell dispatch pipeline, and (2) robust support for large entity splitting and reassembly in the Azure Table storage layer. These changes improve reliability, correctness, and efficiency for both HTTP endpoint execution and storage of large logical entities.
HTTP Request Cancellation and Reliability Improvements:
Azure Table Storage: Large Entity Splitting, Reassembly, and Cleanup: