3 ms·
> if nginx or haproxy could natively talk to Consul for upstream data, I’m not sure how much of this other stuff would have ever been necessary Airbnb's Smarts
by philsnow 7y ago
> if nginx or haproxy could natively talk to Consul for upstream data, I’m not sure how much of this other stuff would have ever been necessary
Airbnb's Smartstack works well for this. It's not built in to nginx as a module, but I think it's more composeable this way.
Blog post: https://medium.com/airbnb-engineering/smartstack-service-discovery-in-the-cloud-4b8a080de619 https://medium.com/airbnb-engineering/smartstack-service-dis...
The two main components are nerve (health checking of services + writing a "I'm here and healthy" znode into zookeeper, https://github.com/airbnb/nerve https://github.com/airbnb/nerve) and synapse (subscribes to subtrees in zookeeper, updates nginx/haproxy/whatever configs with backend changes, and gracefully restarts the proxy, https://github.com/airbnb/synapse https://github.com/airbnb/synapse).
It's fairly pluggable too if you don't want to use haproxy/nginx.
- aprdm 7y agoThen you have a dependency on zookeeper when you already have consul... it seems like consul template + nginx or haproxy is the solution hashicorp went with.