I'm not sure I understand how the url_param option for balance is
supposed to work.  From reading the description, it sounded like it
might work for both GET and POST methods when either method includes a
query string section in the URI.  However, that doesn't seem to be
working as I expected with 1.4.10.

listen foo
   bind: *.80
   balance url_param id
   server one a.b.c.d ...
   server two a.b.c.e ...


GET /foo/bar?id=1    --> works fine and always sends traffic to the same server
POST /foo/bar?id=1  --> uses round robin


The docs say:

  url_param   The URL parameter specified in argument will be looked up in
                  the query string of each HTTP GET request.

                  If the modifier "check_post" is used, then an HTTP POST
                  request entity will be searched for the parameter argument,
                  when the question mark indicating a query string ('?') is not
                  present in the URL.  ...


which confuses me on whether or not POST query string params are
searched or not.  The first statement says it only works with GET
methods.  The second section says it can work with POST entity content
only when a query string is not present.

I would like to use url_param balancing for POST query string
parameters.  How can I do that?

-Bryan

Reply via email to