Repository navigation
fix: reliable and accurate uploads (HTTP/3 first, HTTP/2 fallback), static /ping - #105
Merged
Merged
Conversation
…equests About 35 of a test's 150 requests are pings. Static assets are free and unlimited on the Workers free plan, and an A/B test against production showed the same ping times. Downloads stay on the Worker: served as static assets they added about 180 ms to each request's first byte. STATE records the request budget, the next step (bigger upload chunks) and the backends that were researched and rejected.
Bodies aim at about 1 s per request instead of 0.25 s, so a test makes about 24 upload requests instead of about 96. Each step grows at most 4x, so a slow uplink behind a fast downlink still completes bodies (#60).
The first upload body was sized from the download speed. On a line with 124 Mbps down and about 4 Mbps up it could not finish inside the 8 s window, so upload read about 1.3 Mbps or failed with 'No data reached the server'. Every stream now starts at 256 KB and grows from its own last request. Node A/B of runTest on that line: main failed 2 of 3 runs, the branch read 3.1 to 3.6 Mbps (curl: 3.6 to 4.2).
…t HTTP/3 Chrome uploads over HTTP/3 (QUIC) to workers.dev stalled on Jio until the test gave up. workers.dev always advertises HTTP/3 and a Worker cannot clear Alt-Svc, so the worker now also answers on a custom domain in the ajithakdev.com zone, which has HTTP/3 off. In Chromium on that line with QUIC disabled, uploads read 3.0 to 3.8 Mbps (curl 3.6 to 4.2). workers.dev stays on for older versions.
Owner
Author
Pre-merge checklistAddressed
Tested
CI and release
Docs
After mergeSunday release 2027.0.3: tag, |
… a request stalls (#104)
…allback, and test it A single slow request later in the phase (a Wi-Fi dip on a fast line) used to throw away the HTTP/3 run and restart on HTTP/2, the path that under-reads. runner.test.ts covers stall, error, slow-later-request and cancel with a fake clock and fetch; the slow-later-request case fails on the old rule.
Owner
Author
Pre-merge checklistAddressed
Tested
CI and release
Docs
After merge: rebase #101 on main, rerun tests, then release 2027.1.0 on Sunday. |
# Conflicts: # CHANGELOG.md # RESOURCES-AND-GUIDE.md
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.
Uploads on Jio failed or read far too low, and pings were spending Worker requests from the free quota. This branch fixes both, moves the default test server to
meterx-api.ajithakdev.com, and keeps HTTP/3 for uploads where it works.Changes
/pingis a static asset on the worker (services/worker/public/). Cloudflare does not bill static assets against the 100,000 requests a day, and ping times stayed the same in a production A/B.nextUploadChunkinmeasure.ts). The old first body was sized from the download speed, so on a 124 down / 4 up line it never finished and the test said "No data reached the server".https://meterx-api.ajithakdev.com. HTTP/3 is off for theajithakdev.comzone, because Chrome uploads over QUIC stalled on Jio and a Worker cannot remove thealt-svcheader itself.WORKER_URL, the manifest'shost_permissionsand the site CSP changed together. The oldworkers.devURL keeps working for installed versions.workers.devaddress first, over HTTP/3. Chrome sends uploads over HTTP/2 slowly: on BSNL FTTH 60/60 they read 14 to 29 Mbps against curl's 55 to 66, while HTTP/3 read 53 to 66. If an upload request there fails or stays open over 3 s, as on Jio, the upload phase starts again onmeterx-api. Fixes Upload reads about half of the real speed on fast lines #104 for the default server.Testing
runTest:mainfailed 2 of 3 runs, the branch read 3.1 to 3.6 Mbps against curl's 3.6 to 4.2.workers.devupload forced to hang: 3 of 3 tests fell back tometerx-apiafter 3 s and finished.meterx-api(HTTP/2) median 20.4 Mbps,workers.dev(HTTP/3) median 53.7.Nothing deploys on merge. The worker, site and store packages go out with the Sunday release.