API Gateway Monitoring: Seeing What Happens Before Your Code Runs
The API gateway sits between the internet and your application. It handles SSL termination, authentication, rate limiting, request routing, and caching. When it behaves unexpectedly, your service looks broken even when it is perfectly healthy.
Your API gateway processes every request before it reaches your service. Rate limits, auth failures, and routing errors all happen there — and most teams have zero visibility into them.
What the gateway sees that your service does not
Your service only sees requests that the gateway forwards. It does not see: - Requests rejected by rate limiting - Requests blocked by authentication failure - Requests dropped due to gateway timeouts - Requests that never arrived due to routing misconfiguration
To understand total user-facing error rate, you need gateway metrics in addition to service metrics.
Key gateway metrics
- Request rate — total requests per second hitting the gateway - 4xx rate — client errors, split by status code (401 = auth, 429 = rate limit, 404 = routing) - 5xx rate — errors the gateway is generating (502 = upstream timeout, 503 = upstream unavailable) - Latency at the gateway — time the gateway itself adds before forwarding - Cache hit rate (if the gateway caches) — lower hit rate = more load on upstream services
External monitoring for your API
Set up an AlertsDock monitor on your public API endpoint: ``` GET https://api.yourapp.com/health Expected: 200 within 2s Check interval: 1 minute Regions: 3+ ```
This tests the entire stack — DNS, CDN, gateway, service — from outside your network.
Alerting on gateway anomalies
Alert on: - 429 rate > 5% of requests (users are being rate limited) - 502 rate > 0.1% (upstream service is timing out at the gateway) - Gateway latency p99 > 500ms (gateway itself is slow, not upstream)
API versioning and routing health
If you serve multiple API versions, monitor each version endpoint independently. A misconfigured route can silently serve the wrong version — or return 404s — to an entire segment of your user base.
Feature Guide
Uptime Monitoring
AlertsDock gives teams uptime monitoring for websites, APIs, TCP checks, DNS checks, SSL expiry, and fast alert routing without enterprise overhead.
Read guideAlternative Page
UptimeRobot Alternative
Compare AlertsDock with UptimeRobot for teams that want uptime monitoring plus heartbeat monitoring, status pages, webhook inspection, and per-resource alert routing.
See comparisonMore articles
Frontend Monitoring: Real User Monitoring vs Synthetic Testing
Backend uptime checks miss the browser. Real user monitoring shows you what actual users experience — slow renders, JavaScript errors, and failed resource loads that your API monitors never see.
Monitoring AI Workloads: LLM APIs, Inference Costs, and Timeout Handling
LLM API calls can take 30 seconds and cost $0.10 each. When they fail, they fail silently in ways traditional monitoring was never designed to catch.
WebSocket Monitoring: Keeping Long-Lived Connections Healthy
HTTP checks assume request-response. WebSockets are persistent connections that can silently break while reporting healthy. Here is how to monitor connections that never close.