nginx_mod_cluster_module - Implementation of features mod_cluster to nginx, based on the original mod_cluster. Can be used to dynamic config routes/paths on nginx. A replacer for hipache.
This module adds support for Nginx receive and process Mod-Cluster Management Protocol (MCMP). Main goal is dynamic configuration of nginx upstreams. Porting the node side of mod_cluster to other technologies beyond java.
Lastest Nginx working version: nginx-release-1.6.3
Production ready, being used in production environments
Todo:
- Add support to AJP using https://github.com/yaoweibin/nginx_ajp_module. (probably never will do it)
- Sticky session based on URL param
Features working:
- Websocket proxying support, allows use of websockets endpoints
- Node/upstream dynamic configuration
- Published context routing thru nodes
- Sticky session based on cookie param
- Handle upstream weight based on MCMP Load param
- Node remove when connection fails
- Enable/Disable/Stop Contexts using ModManagerInfo interface
Installation:
- Apply nginx patch to allow MCMP methods
patch < nginx-1.5.3_parse.patch
./configure --add-module=/path/to/nginx_mod_cluster_module/advertise/ --add-module=/path/to/nginx_mod_cluster_module/manager/
Configuration:
server {
listen 80;
server_name localhost;
ManagerBalancerName balancer-name;
ServerAdvertise On;
AdvertiseFrequency 5;
AdvertiseSecurityKey seckey;
EnableMCPMReceive;
location /info {
ModManagerInfo;
}
}
Based on Nginx code copyrighted by Igor Sysoev, https://github.com/nginx/nginx .
Based on Mod_cluster by jfclere, https://github.com/modcluster/mod_cluster .
Based on ngx-sticky-module by Jerome Loyet, https://code.google.com/p/nginx-sticky-module .
Based on nginx-upstream-fair by Grzegorz Nosek, https://github.com/gnosek/nginx-upstream-fair .
This software is distributed under the terms of the FSF Lesser Gnu Public License (see lgpl.txt).