Nomad Auto-Proxy with Consul-Template and NGINX
summary
Nomad services register with Consul and Consul-Template renders NGINX upstreams so hundreds of tiny APIs (about 300 jobs across ~40 Nomad agents) automatically get vhost routing; requires wild-card DNS and cert and service health checks. Templates skip services with port > 0 false, insert a static fallback (e.g. localhost:9000 placeholder) to avoid broken reloads, and support multi-datacenter primary/backup upstreams; main failure modes are zero ports or no healthy upstreams, fixed by default server and guarded template logic.
AI-written summary · about
chapters (12)
- 0:00Introduction to Nomad Auto-Proxy
- 1:03Nomad in production at Jet.com
- 2:30Static NGINX vs dynamic needs
- 4:15Consul-Template integration setup
- 7:27Consul-Template NGINX config
- 9:12Simplifying the implementation
- 9:32Handling configuration failures
- 10:58Fail-safe NGINX configuration
- 12:03Multi-data center backup
- 13:30Protecting against service loss
- 14:55Default server for edge cases
- 16:00Conclusion and Q&A
