Repository navigation
Conversation
… improve compression middleware documentation
# Conflicts: # frameworks/morojs/app.mjs
…ge dependency to v1.8.15
|
👋 Heads up! This PR modifies the following frameworks:
|
|
Summary of what this PR now carries, and what the all-board run showed. 1. morojs adds the H2 family (baseline-h2, static-h2, baseline-h2c, json-h2c) on @morojs/moro 1.8.15: two extra processes from the same image, 2. The change is a 19-line 3. Because validate.sh changed, detect validated every enabled entry, and six were red on their own. Four are fixed in this PR, each verified locally:
Still red and not touched here: vanilla-gateway and vanilla-production. Nothing in them changed since they passed on 2026-10-02, vanilla-epoll (which they build from) passed its own job in this run, and their V toolchain is x86-64-only so I cannot reproduce on this machine. If someone with runner access can share the Happy to split the validator change and the four entry fixes into their own PR if you prefer the morojs change to stand alone. |
…e checks and enhancing failure diagnostics
… gzip level 3, prepared replies
The entry was losing to the other JS entries on four fronts, none of them the
harness. Each is fixed where it lived - the engine, the framework, or here.
- echo-ws-pipeline (6x behind): the engine answered every WebSocket frame with
its own send(). @morojs/engine 1.1.14 corks the connection for the whole
read, so a pipelined batch leaves in one write; nothing changes here beyond
the version.
- static-tls (10x behind): staticFiles() resolved, stat'ed and read the file
and its sidecars on every request, five to eight threadpool round trips
shared by all 64 worker threads of the process. MoroJS 1.8.16 adds
staticFiles({ cache: true }): files and .br/.gz sidecars read once and
served from memory with their validators, the disk stat'ed again at most
once a second and on directory changes (same-length replacements are
noticed, so the staleness probe passes).
- json-comp (3x) and gateway-64 (2x, its load sends Accept-Encoding): gzip at
the default level 6 per request. The route now asks for gzip level 3
through the middleware's new gzip option, with the encoder reused between
bodies (reuseEncoders); brotli quality 3 stays available for a client that
accepts nothing else. Measured on the json-comp bodies: a little over a
third of the CPU of level 6 for 9% more bytes.
- json-tls, 8gbit, baseline POST (10-30%): the static middleware on the TLS
listener and every request body forced the engine server off its
synchronous dispatch. 1.8.16 runs sync middleware chains and body parsing
on the sync path, so the path check stays cheap; /echo and /baseline2 on
the engine no longer set a Content-Type by hand, so they go out through the
framework's prepared replies.
Also: CERTS_DIR, STATIC_ROOT and WORKERS environment overrides for running
the entry outside the container, the Dockerfile's threadpool note brought up
to date, README and meta description updated.
Local A/B on a 4-worker macOS run, published 1.8.15 against this: pipelined
WebSocket echo 257K -> 971K frames/s, static over plaintext 11.5K -> 49.5K
rps (9.7K -> 33.9K over TLS), /json/50 with gzip 11.8K -> 17.6K rps,
baseline POST +12%.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One change in the entry, and a dependency that moved underneath it.
frameworks/morojs/app.mjs: the json-comp compression middleware (gzip preferred, brotli available) now sits on the /json/:count route of the plain listener only. The TLS listener is never asked for an encoding (json-tls sends none), so its route carries no middleware and stays on the router's fast path. Same bytes on every profile; json-tls no longer pays for a negotiation it never uses.
Engine: the entry depends on @morojs/moro ^1.8.13, whose range on @morojs/engine now resolves to 1.1.11 at image build. 1.1.11 changes nothing on the wire; its epoll transport makes one epoll_wait per loop turn, and every request is parsed and routed on its own.