← PracticeIntermediateAsync
Every Endpoint Got Slower At Once
Pull up the evidence one item at a time, commit to a diagnosis, and only then see the schedule that actually ran.
What was reported
At 09:00 every weekday our Node API's p99 goes from 40ms to 1.4s and stays there for about ten minutes. It is not one endpoint — it is all of them, including /healthz, which returns a hard-coded object and touches nothing. The box has eight cores and overall CPU is 12%. The database is bored. We have doubled the replica count twice and the spike is identical.
1// added three weeks ago2app.get('/reports/daily', async (req, res) => {3 const rows = await db.query(dailyReportSql) // ~40MB of objects4 const csv = rows.map(toCsvLine).join('\n') // synchronous5 const body = JSON.stringify({ csv, meta: buildMeta(rows) }) // synchronous6 res.type('application/json').send(body)7})Evidence
Nothing here is labelled as relevant. Some of it is not.