Post-mortem: Our API gateway misrouted 0.5% of requests for 45 minutes due to a bad regex
Last Tuesday, between 14:03 and 14:48 UTC, 0.5% of API requests were routed to the wrong backend service. Root cause: a regex in our routing config that was supposed to match /v1/users/(.*) but due to a missing escape, it also matched /v1/users-settings and sent those requests to the users service instead of settings. The error rate spiked to 12% for affected endpoints. We detected it via a customer support ticket, not monitoring. Here's what we're changing: 1) Added a canary deployment for routing configs with 1% traffic for 10 minutes. 2) Added a synthetic test that hits all endpoint patterns. 3) Improved alerting on 5xx rates per endpoint. What else would you add?