I wondered whether the issue was related to cold starts in Workers: “I wonder if it's related to cold starts in Workers?”
I found the significant jump hard to explain: “Hard to explain such a significant jump.”
I said debugging was naturally difficult because Workers do not really run Node.js: “Naturally hard to debug given they don't really run Node.js :/”.
The cause of the jump and whether cold starts were involved remained open questions in my reply.
I said the middleware was conceived to be more nginx.js than express-style-middleware.js.
I described its responsibilities as routing, header-setting, rewriting, redirecting, much like nginx.conf.
I said the handler should push data to it rather than do I/O or pull data, especially if running globally.
I described the handler as extremely extremely fast and made the reply on 2025-10-13 18:32 UTC.
I wouldn’t enforce auth in nginx; security must ultimately be enforced at the usage site.
I said early returns based on a cookie to deliver a better experience are appropriate, and gave an example of an early redirect to /login?next= when absence of cookie indicates not logged in.
I made the security and performance reply on 2025-10-13 20:36 UTC.
I said we briefly used workers for middleware and edge functions, hit too many limitations, and found the experience worse in DX and performance.
I said developers want full, open runtimes, and that a cloud runtime promising efficiencies is not worthwhile if it brings DX and ecosystem tradeoffs.
I said we brought the compute efficiencies and cold start improvements to the existing ecosystem instead, and that's Fluid.
I distinguish Edge workloads—routing, static assets, and prerenders—from apps, APIs, and databases.
I describe Fluid as multi-region, optimizing for running your app next to your Postgres.