nginx sticky module for window
Asked Answered
F

3

7

I want to use nginx for load balance. And i want to use the sticky model instead of ip_hash. The configuration may be like below.

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

But i encounter below error.

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

Per my check, it is because of lack of nginx-sticky-module.

For my server is windows and i can't find nginx-sticky-module for window.

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

Many thanks.

Fortuitous answered 25/3, 2015 at 2:11 Comment(0)
E
2

According to Nginx documentation Sticky session support is only available for their expensive Plus version. I've been researching alternatives and the closer I've been is this old fork that is not compatible with Nginx 1.5+ https://github.com/lusis/nginx-sticky-module

Nginx Plus Load Balancing

I've found another great module, see https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/src

Eat answered 19/2, 2021 at 9:51 Comment(0)
P
1

The nginx-stick-module(-ng) in GitHub or other open source code repositories has not been updated for many years,They are not compatible with the new version of Nginx. find https://github.com/Refinitiv/nginx-sticky-module-ng, It is the most solution, with slight modifications to be compatible with Nginx 1.25

Peroxidize answered 3/11, 2023 at 5:59 Comment(0)
D
0

Maybe you could try this. https://github.com/michaelneale/nginx-sticky-module. However you need get the source of nginx firstly. https://github.com/nginx/nginx

Digraph answered 7/6, 2016 at 7:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.