Interview Prep/Python for DevOps/Testing, services & metrics

Why should webhook handlers respond fast and process asynchronously?

AdvancedConceptTesting, services & metrics
Answer

Senders have short timeouts (GitHub waits 10 seconds) and may retry or mark the delivery failed. If the handler runs a deployment inline, the request times out, the sender redelivers, and you deploy twice. Pattern: validate the signature, persist or enqueue the event (SQS, Redis, a DB table), return 2xx immediately, and process in a worker that is idempotent keyed on the delivery ID.

All Python for DevOps questions Roadmap: Python for automation

More on Testing, services & metrics