Skip to content

Commit 23e3d3a

Browse files
authored
Merge pull request #99 from flashcatcloud/tmp-1
webhook retry
2 parents bec0714 + 49ea06d commit 23e3d3a

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.1 Alert webhook.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,14 @@ curl -X POST 'https://example.com/alert/webhook?a=a' \
152152

153153
1. **Is there a response timeout for the service?**
154154

155-
- The service must respond within 1 second, after which the response is considered failed
155+
- Services must respond within 2 second, responses after 2 second are considered failed
156156

157157
2. **Will failed pushes continue to be pushed?**
158158

159-
- Currently, Flashduty pushes only once, though retry mechanisms may be introduced in the future. Retries may also occur due to middleware timeouts, so implement idempotent processing
159+
For specific network errors, retries will be attempted up to a maximum of 2 times:
160+
- context deadline exceeded (excluding cases involving "awaiting headers")
161+
- i/o timeout
162+
- eof
160163

161164
3. **How is push order guaranteed?**
162165

flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.2 Incident webhook.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,14 @@ curl -X POST 'https://example.com/incident/webhook?a=a' \
192192

193193
1. **Is there a response timeout for the service?**
194194

195-
- Services must respond within 1 second, responses after 1 second are considered failed
195+
- Services must respond within 2 second, responses after 2 second are considered failed
196196

197197
2. **Will failed pushes continue to be pushed?**
198198

199-
- Currently, Flashduty pushes only once, though retry mechanisms may be introduced in the future. Retries may also occur due to middleware timeouts, so implement idempotent processing
199+
For specific network errors, retries will be attempted up to a maximum of 2 times:
200+
- context deadline exceeded (excluding cases involving "awaiting headers")
201+
- i/o timeout
202+
- eof
200203

201204
3. **How is push order guaranteed?**
202205

flashduty/zh/1. On-call/5. 集成引导/8.5 Webhooks/8.5.1 告警 webhook.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,14 @@ curl -X POST 'https://example.com/alert/webhook?a=a' \
152152

153153
1. **服务是否有响应超时时间?**
154154

155-
- 服务需要在 1 秒内返回响应,超过 1 秒则认为响应失败
155+
- 服务需要在 2 秒内返回响应,超过 2 秒则认为响应失败
156156

157157
2. **推送失败后是否会持续推送?**
158158

159-
- 目前 Flashduty 最多推送一次,未来可能会引入重试机制,也可能因为中间链路超时导致重试,您需要做好幂等处理
159+
针对特定的网络错误,会进行重试,最多重试2次:
160+
- context deadline exceeded (排除 awaiting headers)
161+
- i/o timeout
162+
- eof
160163

161164
3. **如何保证推送顺序?**
162165

flashduty/zh/1. On-call/5. 集成引导/8.5 Webhooks/8.5.2 故障 webhook.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,14 @@ curl -X POST 'https://example.com/incident/webhook?a=a' \
193193

194194
1. **服务是否有响应超时时间?**
195195

196-
- 服务需要在 1 秒内返回响应,超过 1 秒则认为响应失败
196+
- 服务需要在 2 秒内返回响应,超过 2 秒则认为响应失败
197197

198198
2. **推送失败后是否会持续推送?**
199199

200-
- 目前 Flashduty 最多推送一次,未来可能会引入重试机制,也可能因为中间链路超时导致重试,您需要做好幂等处理
200+
针对特定的网络错误,会进行重试,最多重试2次:
201+
- context deadline exceeded (排除 awaiting headers)
202+
- i/o timeout
203+
- eof
201204

202205
3. **如何保证推送顺序?**
203206

0 commit comments

Comments
 (0)