In essence there is a wrapper that:
- reads service information and current backend instances out of service catalog (either Marathon or Consul)
- writes nginx configuration
- runs nginx configtest
- tells nginx to reload its configuration
Nixy referenced above takes service information directly from Marathon event stream but I usually have Consul so I use homebaked consul-template + nginx solution.
That's a red flag. Don't make architectures where you depend on crazy requirements like that.
This is a PaaS supporting many micro-services. There is a hold-off to not reload more than once a second just as an insurance against runaway processes but beyond that nginx handles this without any sweat.
Frequent reloads are currently in the non-prod cluster only but I don't see any reason why it would be an issue in prod as well.
P.S. I am in finance, assume my requirements are severely more extreme than yours. Just like my errors.