安装方法(进入Nginx源码目录):
#patch -p0 < /path/to/this/directory/jvm_route.patch
# ./configure --prefix=/usr/nginx-0.8.1 --with-http_stub_status_module --add-module=/path/to/this/directory/
#make
#make install
例如以下配置:
1. Resin:
upstream backend {
server 192.168.0.100 srun_id=a;
server 192.168.0.101 srun_id=b;
server 192.168.0.102 srun_id=c;
server 192.168.0.103 srun_id=d;
jvm_route $cookie_JSESSIONID;
}
2. Tomcat:
upstream backend {
server 192.168.0.100 srun_id=a;
server 192.168.0.101 srun_id=b;
server 192.168.0.102 srun_id=c;
server 192.168.0.103 srun_id=d;
jvm_route $cookie_JSESSIONID reverse;
}
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。