nginx (or Caddy) rate limits are a coarse shield in front of expensive handlers — still do application-level per-chat limits.
Checklist
- Limit by IP at the edge carefully (NAT!)
- Prefer app limits keyed by chat/user
- Return 429 with Retry-After when possible
- Do not rate-limit your own health checks
When to choose what
Write the decision down with a revisit date. Re-evaluate when latency, cost or ops load changes.
Related
Frequently asked questions
Is this exhaustive?
No. It is a practical starting point; verify details in official docs before production.