2

I realize this is kind of a strange situation, but bear with me. Suppose I have a request being sent from some client-side Javascript which I want to forward to multiple upstream servers. There's no need for any sort of response, just an immediate 200 OK.

Is there any way to achieve this with Nginx's load balancer? There are multiple disciplines for load balancing based on round-robin, least-connections, weights, etc, but all of them enforce a one-to-one mapping between requests and upstream servers. I'm guessing this is due to the fact that it's not generally possible to "combine" multiple responses to send back to the client (and it's very rare that you'd even want to), but that's not a concern in this case.

Any creative solutions for this in Nginx? Whether it's through the load-balancing module or the HttpProxyModule.

Adrian Petrescu
  • 16,629
  • 6
  • 56
  • 82
  • 1
    IMHO it's not possible with nginx, normally you want response from exactly one server. You might achieve similar behaviour with haproxy, or maybe Parallel Proxy (http://www.parallelproxy.com). What if all your backend servers are down? you still want to `200 OK` reponse? – Tombart Mar 28 '14 at 15:52
  • @Tombart: In reality, yes. These requests can be thought of as logging statements. I want all the backend servers to take note of them, but if they happen to be down, the client's not really going to do anything about it except move on with its life. – Adrian Petrescu Mar 28 '14 at 15:53

0 Answers0