How to set up NGINX Plus as the load balancer for a JIRA Data Center cluster


アトラシアン コミュニティをご利用ください。


このページの内容は、Jira アプリケーションでサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。

This configuration only works with NGINX Plus, the paid version of NGINX. The free version does not support cookie-based session-affinity.


JIRA Data Center needs a load balancer to run in front of it to distribute the incoming requests between each node. The load balancer must support cookie-based session-affinity. NGINX Plus can be set up to provide this for JIRA Data Center, using a configuration similar to the one below. You still need to follow the full installation guide available at Installing JIRA Data Center. For more details on the configuration of a load balancer in NGINX Plus, see the page Application Load Balancing with NGINX Plus and the Upstream module documentation, on the NGINX website.

Sample NGINX Configuration

The load balancer configuration below was taken directly from NGINX's documentation Application Load Balancing with NGINX Plus.

pid /var/run/;

events {}

http {
    # Search the cookie named JSESSIONID for data after the final ‘.’, and store that 
    # in a variable named $route_cookie
    map $cookie_jsessionid $route_cookie {
        ~.+\.(?P<route>\w+)$ $route;

    # Search the URL for a trailing jsessionid parameter, and store the value after the final ‘.’ 
    # in a variable named $route_uri
    map $request_uri $route_uri {
        ~jsessionid=.+\.(?P<route>\w+)$ $route;

    upstream jiracluster {
        server route=node1;
        server route=node2;
        sticky route $route_cookie $route_uri;

    server {
        listen 80;
        server_name MyCompanyServer;
        location / {
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_pass http://jiracluster;

        error_log /var/log/nginx/error.log;
        access_log /var/log/nginx/access.log;
最終更新日: 2016 年 2 月 19 日


Powered by Confluence and Scroll Viewport.