资 源 简 介
nginx_upstream_jvm_route
This module achieves session stickiness with the session cookie. If the session is not in the cookie or URL, the module will be a normal Round-Robin upstream module.
INSTALLATION
cd nginx-0.7.59 # or whatever patch -p0 < /path/to/this/directory/jvm_route.patch
compile nginx with the following addition option:
--add-module=/path/to/this/directory
## EXAMPLE ##
1.For 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;
}
```
detail
2.For 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_