You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MadLittleMods opened this issue
Dec 1, 2022
· 0 comments
· Fixed by #204
Labels
A-backendRelated to the backend Node.js server piecesT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Fix#148Fix#40
- Apply timeout middleware to all room directory and room routes
- Stop messing with the response after we timeout. Fix#148
- This also involves cancelling any `async/await` things like requests in the routes so we throw an abort error instead of continuing on. Fix#40
- Also abort the route if we see that the user closed the request before we could respond to them
- Bumps minimum supported Node.js version to v18 because we're now using the built-in native `fetch` in Node.js vs `node-fetch`. This gives us the custom `signal.reason` that we aborted with instead of a generic `AbortError`.
- This also means we had to add some instrumentation for `fetch` which uses `undici` under the hood. Settled on some unofficial instrumentation: [`opentelemetry-instrumentation-fetch-node`](https://www.npmjs.com/package/opentelemetry-instrumentation-fetch-node)
A-backendRelated to the backend Node.js server piecesT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Move the
timeout-middleware
to apply to all routes.It would also be good to send a metric whenever we see a request timeout, related to #45
Adjacent: Here is an example middleware from the Gitter webapp that logs and metrics when a request is pending for more than 60 seconds, https://gitlab.com/gitterHQ/webapp/-/blob/676fadc3693260c8c51f448a0ca4c3e180d1b4a2/server/web/middlewares/pending-request.js#L50-84
The text was updated successfully, but these errors were encountered: