Description
Our current /status endpoint just hardcodes a "connected" message.
To be truly production-ready, this endpoint needs to dynamically ping the PostgreSQL database and the Stellar Horizon RPC.
If the database takes longer than 2 seconds to respond, the status should downgrade from "Operational" to "Degraded".
This allows the frontend to automatically display a yellow warning banner to users if the infrastructure is struggling under Wave 3 traffic.
Requirements
Description
Our current
/statusendpoint just hardcodes a "connected" message.To be truly production-ready, this endpoint needs to dynamically ping the PostgreSQL database and the Stellar Horizon RPC.
If the database takes longer than 2 seconds to respond, the status should downgrade from "Operational" to "Degraded".
This allows the frontend to automatically display a yellow warning banner to users if the infrastructure is struggling under Wave 3 traffic.
Requirements
/api/v1/statusendpoint controller.Promise.race()that pings the Prisma database with a 2-second timeout.{ status: "degraded", databaseLatency: "2500ms", rpcLatency: "120ms" }.