Webhook 投递系统的技术规范
工程师真正会用的规范模板——目标、非目标、SLO、故障模式
查看输入和输出预览
输入
- Feature
- outbound webhooks with retries and signed payloads
- Constraints
- at-least-once delivery, p95 < 5s, 100 RPS sustained
输出(节选)
## Webhook Delivery v1 -- Tech Spec **Goal:** at-least-once outbound delivery of domain events to customer endpoints with HMAC-signed payloads and exponential-backoff retries. **Non-goals:** exactly-once, ordering across event types. **Architecture:** event bus (NATS) -> delivery worker pool (Go) -> customer HTTPS endpoints. **Retry policy:** 8 attempts over 24h with exponential backoff (1s, 5s, 30s, 5m, 30m, 2h, 6h, 12h). **Signing:** HMAC-SHA256 over body, secret rotated per endpoint. **SLOs:** p95 delivery < 5s, success rate > 99.5%. **Failure modes:** detailed table covering DNS, TLS, 5xx, 4xx, timeout, partial response, body-size overflow.