Nginx sticky module for window

I want to use nginx for load balancing. And I want to use a sticky model instead of ip_hash. The configuration may look as follows.

upstream loadbalance { sticky; server 192.168.120.195:8080; server 192.168.120.194:8080; } 

But I ran into the error below.

nginx: [appears] unknown directive is sticky in D: \ ProgramFiles \ nginx-1.5.7 \ webapp \ conf \ nginx.conf: 39

In my check, this is due to the lack of a nginx-sticky module.

There are windows for my server, and I cannot find the nginx-sticky module for the window.

Can any guy provide a nginx-sticky module for the window and share the installation guide with me?

Many thanks.

+5
source share
1 answer

Perhaps you could try this. https://github.com/michaelneale/nginx-sticky-module . However, you need to get the nginx source first. https://github.com/nginx/nginx

0
source

Source: https://habr.com/ru/post/1216045/


All Articles