·8 min read
Back-to-back fetch() calls open two connections, not one
A loop of awaited fetch() calls to one host keeps exactly two sockets open. I measured why, and the one-line change that drops it to one.
2 posts
A loop of awaited fetch() calls to one host keeps exactly two sockets open. I measured why, and the one-line change that drops it to one.
A cached 404 must still fail the call. In one of my cache read paths it did not — the stale 404 resolved as a success. The test that proves it, and the fix.