I Use This!
Activity Not Available
Analyzed about 1 year ago. based on code collected about 1 year ago.

Project Summary

nginx_upstream_jvm_routeThis 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.patchcompile nginx with the following addition option:

--add-module=/path/to/this/directoryEXAMPLE1.For resin

upstream backend {
server srun_id=a;
server srun_id=b;
server srun_id=c;
server srun_id=d;

jvm_route $cookie_JSESSIONID;

2.For tomcat

upstream backend {
server srun_id=a;
server srun_id=b;
server srun_id=c;
server srun_id=d;

jvm_route $cookie_JSESSIONID reverse;

3. A simple jave test page


syntax: jvm_route $cookie_COOKIE[|session_url] [reverse]
default: none
context: upstream
'$cookie_SESSION_COOKIE' specifies the session cookie name(0.7.24+). 'session_url' specifies a different session name in the URL when the client does not accept a cookie. The session name is case-insensitive. In this module, if it does not find the session_url, it will use the session cookie name instead. So if the session name in cookie is the name with its in URL, you don't need give the session_url name.
With scanning this cookie, the module will send the request to right backend server. As far as I know, the resin's srun_id name is in the head of cookie. For example, requests with cookie value 'a***' are always sent to the server with the srun_id of 'a'. But tomcat's JSESSIONID is opposite, which is like '***.a'. The parameter of 'reverse' specifies the cookie scanned from tail to head.
If the request fails to be sent to the chosen backend server, It will try another server with the Round-Robin mode until all the upstream servers tried. The directive proxy_next_upstream can specify in what cases the request will be transmitted to the next server. If you want to force the session sticky, you can set 'proxy_next_upstream off'.
Every syntax is the same with the official directive except the parameter of 'srun_id' which identified the backend JVM's name by cookie. The default srun_id's value is 'a';

NOTEThis is a third-party module. And you need careful test before using this module in your production environment.

Questions/patches may be directed to Weibin Yao, yaoweibin@gmail.com.


module nginx session sitcky stick stickiness upstream

In a Nutshell, nginx-upstream-jvm-route...

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    search using multiple tags to find exactly what you need
  • ...
    nearly 1 in 3 companies have no process for identifying, tracking, or remediating known open source vulnerabilities
  • ...
    by exploring contributors within projects, you can view details on every commit they have made to that project



30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016


Be the first to rate this project
Click to add your rating
Review this Project!