Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Nginx 3rd party sticky module with backup server

$
0
0
rits Wrote:
-------------------------------------------------------
> say first server is selected from upstream. Since I have specified
> hash $upstream_addr, all subsequent requests go to this server. Even
> new requests. There is no new cookie or parameter to change it to next
> server for new set of stateful requests.

Thats just how it works without using a cookie to route, it would be the same if you would create a token with Lua.
You may have a bigger problem when using another upstream server in front of nginx since all IP's would be coming from this 'frontend' server and not its users. (which is the reason why Sticky came to life)

> I think that is how generic hash works(not cookie based), dependiong
> on either request IP, request parameter, it sticks to a backend
> server.

Without sticky its pure IP based, sticky is an end-2-end solution no matter how many hubs are in between.

> For Lua: https://github.com/openresty/lua-resty-upstream-healthcheck,
>
> Is it available in nginx version 1.9, or it requires adding another
> module?

Search for openresty which also has a development Windows version with the same restrictions as the original nginx Windows has. (what we produce is NOT related to nginx products coming from nginx themselves)

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>