Nginx Load Balancer Extension
Nginx is a web server with a strong focus on high concurrency, performance and low memory usage.The WSO2 Private PaaS Nginx extension is used to integrate the Nginx load balancer with Private PaaS.
Follow the steps given below to proceed with the installation:
- Navigate to the Nginx binary distribution, which is in the
<PRIVATE_PAAS_SOURCE_HOME>/
extensions/load-balancer/nginx-extension/target
directory. - Extract theÂ
apache-stratos-nginx-extension-4.1.0.zip
 file to a desired location. Open the
nginx-extention.sh
file, which is in the<apache-stratos-nginx-extension-4.1.0>/bin
directory and update the following system properties:# Define nginx host private ip address: -Dnginx.private.ip=127.0.0.1 # Define the nginx executable file path: -Dexecutable.file.path=<nginx-home>/nginx # Update the nginx.conf file patch -Dconf.file.path=/etc/nginx/nginx.conf #update the certificate for SSL configuration -Dnginx.cert.path=/etc/nginx/ssl/server.cert #update the server key for SSL configuration -Dnginx.key.path=/etc/nginx/ssl/server.key # Update the hostname length, if needed -Dnginx.server.names.hash.bucket.size=128 # Enable/disable cep statistics publisher: -Dcep.stats.publisher.enabled=false # If cep statistics publisher is enabled define the following properties: -Dthrift.receiver.ip=127.0.0.1 -Dthrift.receiver.port=7615 -Dnetwork.partition.id=network-partition-1
The Nginx executable file path, which is given as
<nginx-home>/nginx
must be the Nginx home path.Provide the SSL configurations in order to access the secured transport over Nginx.
For more information on creating SSL Certificates, see below:
Open the
jndi.properties
file, which is in the<apache-stratos-nginx-extension-4.1.0>/conf
directory and update the message broker information as shown below:java.naming.provider.url=tcp://localhost:61616
Navigate to the
<apache-stratos-nginx-extension-4.1.0>/bin
directory and run the following command:./nginx-extension.sh
Once you have successfully installed the Nginx extension, it will communicate with Private PaaS and receive the required information to automatically configure Private PaaS load balancing.