Dropping Webhooks
blog.runnable.com
blog.runnable.com
Scaling out an api server is not resilient enough, and there needs to be a queue-based system fronting your web hooks so they aren't dropped
The parent's use case could be handled by connecting the Wishbone modules in the following way:
Accept webhook data over http(s) (https://github.com/smetj/wishbone-input-httpserver), parse the JSON data (http://wishbone.readthedocs.org/en/latest/modules/builtin%20...), validate the event data against JSONschema (https://github.com/smetj/wishbone-flow-jsonvalidate) and eventually submit the event data to to RabbitMQ (https://github.com/smetj/wishbone-output-amqp).
Super easy to start a server:
$ wishbone start --config bootstrap.yaml
Depending on the modules you hook together you can build the event processing pipeline suiting your needs.For example: http://smetj.net/processing_webhooks_using_wishbone_part_1.h...
Some sort of pubsub queue would be awesome - pull (or have them pushed), and process them on demand. If something breaks, retry when you want.
FWIW, that's the underlying protocol used in BlueButtonPlus[0], the proposed method for exchanging healthcare information.
It would be something I would pay for to not have to host myself, but iff there's a clear migration path, i.e. it's open-source.
Some example articles:
- http://smetj.net/processing_webhooks_using_wishbone_part_1.h...
- http://smetj.net/processing_webhooks_using_wishbone_part_2.h...
For the record, we use beanstalkd[1] with both php and node workers. Getting millions of external notifications every day without any major issue. Internally, we use the same design, this time to completely decouple our workers from the persistence layer. Our major benefit in this case was the ability to perform database maintenance without taking the service down.
Anyway, I good read and a simple, yet effective solution.
It's the obvious right solution for this kind of scenario.