What happens if your endpoint temporarily fails?
The Leafy Energy demo helps explain how a webhook dispatcher deals with timeouts and errors, and why you need a robust endpoint.
Typical retry strategy
- Leafy Energy waits for a response for up to about 5 seconds.
- On timeout or 5xx response, the event is added to a retry queue.
- The system retries several times using exponential backoff.
Best practices for your endpoint
- Process events asynchronously: store them and handle them in the background.
- Return a
2xxstatus as soon as possible. - Log errors and monitor the health of your webhook service.
This article is perfect for discussing integration weak spots and introducing monitoring and alerting concepts.
Comments
0 comments
Please sign in to leave a comment.