Why it matters
Horizontal scaling for webhook bots means sticky-less handlers, shared idempotency keys and a queue for slow work — not just more replicas.
Practical steps
- Make handlers idempotent using update/event ids in a shared store.
- ACK fast on every replica; push slow work to a queue.
- Centralize rate-limit state (Redis) rather than per-process counters.
- Use readiness probes so half-dead replicas stop getting traffic.
- Load-test with realistic signature-valid payloads.
Watch out for
- In-memory dedupe that fails across replicas.
- Long LLM calls inside the request before ACK.