5 minutes
Devoxx BE 2025: It Only Starts with a Container & How Abstraction Becomes Reality
At Devoxx Belgium 2025, I was able to talk about what happens after you build your container. In theory, […]
The sticky session directive is included in the commercial release of nginx only, for this reason we are using the nginx-sticky-module-ng (not officially supported) module:
https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng
There are some minimal syntax differences between this and the commercial module, the latter gives more flexibility and more configuration options.

nginx.conf
http {
upstream backend {
sticky domain=.mydomain.com path=/ expires=1h httponly;
server 192.168.0.3:28080;
server 192.168.0.4:28080;
}
server {
location / {
proxy_pass http://backend;
}
}
}
In the http block we add the list of our servers, and the sticky directive used to configure the cookie creation options. It’s possible to define the name of the cookie (by default is ‘route’), but if you use the JSESSIONID name it will conflict with the cookie created by the JAVA application servers behind.
In the server block we define which location (in our case the root /) should be proxied to the backed servers previously defined.
In case we have more nginx frontend servers, and a load balancer in front of, we can apply the same configuration to nginx, and configure the load balancer stickiness using the cookie name defined.
5 minutes
At Devoxx Belgium 2025, I was able to talk about what happens after you build your container. In theory, […]
6 minutes
Managing Payara Server Just Got Smarter Imagine managing your Jakarta EE applications not just with Maven goals, but by […]
1 minute
As enterprise Java continues to evolve, developers are constantly looking for ways to build faster, cleaner, and more efficient […]
Payara blog is awesome!