Skip to content

Health Checks

EndpointPurposeExpected response
GET /api/v1/healthLiveness check for backend service200 with {"status":"OK"}
GET /Base API availability check200 with API metadata JSON
  • Health endpoint availability (/api/v1/health success rate).
  • API error rates (especially 5xx, 429, 401 spikes).
  • Latency trends for core endpoints (/urls/public, /auth/login, /urls/my-links).
  • Backend process uptime and restart frequency (Koyeb instance events).
  • Database connectivity and query failures (Prisma/PostgreSQL errors in logs).
MetricWarningCritical
Health endpoint failure rate> 1% over 5 min> 5% over 5 min
5xx error rate> 1% over 5 min> 3% over 5 min
P95 latency (/urls/public)> 700ms> 1500ms
Koyeb instance restarts>= 2 in 15 min>= 5 in 15 min
DB connection failures>= 1 recurring eventsustained failures > 2 min

These thresholds are starting points for portfolio-scale traffic and can be tuned with real usage.

  1. Confirm backend is reachable:
    • GET https://api.korta.click/api/v1/health
  2. Check recent deploy and service status in Koyeb:
    • Running / Healthy
    • no route/path misconfiguration (/ public route, /api/v1/health health path)
  3. Inspect backend logs:
    • Prisma connection errors
    • CORS/OAuth failures
    • surge in 429 or 5xx
  4. Validate environment variables:
    • DB, JWT, CORS, OAuth, SMTP
  5. If incident persists:
    • rollback to last known good deploy
    • rotate compromised secrets if relevant
    • redeploy and verify /api/v1/health + critical flows (shorten, login, OAuth).