We are setting up an API that will need to be "sleeping" during certain hours. Sometimes we would like to override that with a control signal like "start" and "stop". We have the API set up as 4 docker containers with Nodejs Hapi and nginx to do load balancing.
We'd want any control signals (curl -X POST http://myapi.company.com/stop
) to go to all the upstream servers. Normal requests (e.g. curl http://myapi.company.com/meta/tables
) should be load-balanced normally and sent to only one server.
Is this possible with nginx?
The possible duplicate question doesn't explain how to route some requests to all upstreams.