Send all requests to two separate upstream servers?

Eric Feldhusen efeldhusen.lists at gmail.com
Tue Jun 17 22:09:05 UTC 2014


I'm looking for a way to mirror my production site traffic to a development
environment, so that I have nearly identical traffic going to both to work
through some optimization issues that are hard to do without the load,
which is just incoming data.

Eric



On Tue, Jun 17, 2014 at 10:35 AM, Reinis Rozitis <r at roze.lv> wrote:

> Option A and that's what I figured as well.
>>
>
> Depends on what you actually want to achieve by doing those 2 requests –
> eg is it to prewarm 2 backend cache servers or something?
>
> But one way to do this would be for example to use nginx Lua module
> https://github.com/openresty/lua-nginx-module#ngxlocationcapture_multi /
> ngx.location.capture_multi , content_by_lua etc  and then from one response
> discard the body ( ngx.req.discard_body ) or just print the first.
>
> .. theoretically maybe also the Echo module https://github.com/openresty/
> echo-nginx-module#echo_subrequest  but I'm not exactly sure how the
> "combined" response would look like and if the duplicate body could be
> avoided just by sending HEAD request to the second backend.
>
> You can test it yourself or try to ask agentzh.
>
>
> rr
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140617/9b7cf927/attachment.html>


More information about the nginx mailing list