how to design reliable and scalable webhooks with rabbitmq
TRANSCRIPT
![Page 1: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/1.jpg)
How to Design Reliable and Scalable Webhooks with RabbitMQ
![Page 2: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/2.jpg)
What are Webhooks?
● What: User-defined HTTP callbacks● When: Triggered by an event● How: Events on one site to invoke behavior on another site● Why: Loosely coupled architecture
![Page 3: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/3.jpg)
Typical Webhook Workflow
![Page 4: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/4.jpg)
What if Site B is unreachable or request times out?
![Page 5: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/5.jpg)
What if Site B has internal server error?
![Page 6: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/6.jpg)
Site A is always responsible for message reliability
“Don’t drop any messages”
![Page 7: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/7.jpg)
Reliable Webhook with RabbitMQ
![Page 8: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/8.jpg)
What if Site B is unreachableOr request times out?
![Page 9: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/9.jpg)
What if Site B has internal server error?
![Page 10: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/10.jpg)
Making it Scalable!
Delivering to multiple sites
![Page 11: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/11.jpg)
Handling Multiple Sites
![Page 12: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/12.jpg)
Summary
● Webhooks great for integrating with external systems● Challenges:
○ Handle scenario when external system is offline○ Handle scenario when external system fails○ Delivery to multiple external systems concurrently
![Page 13: How to Design Reliable and Scalable Webhooks with RabbitMQ](https://reader035.vdocuments.mx/reader035/viewer/2022081721/58ecdab01a28abdc698b45ef/html5/thumbnails/13.jpg)
Summary
● RabbitMQ & Message Queues are building blocks for webhooks
● RabbitMQ offers:○ Reliability with message queues○ Scalability by running multiple instance of processes
● RabbitMQ provide reliability and scalability out of the box