Deploying NEX in a HA scenario


HA is the High Availability scenario which means that a IT system, component, or application can able to operate at a high level, continuously, without intervention for an anticipated time. The sole purpose of the High-availability infrastructure is to deliver quality performance, handle various kinds of loads and failure with minimal or zero downtime.


To deploy NEX in Peerplays with High-availability, minimum 4 servers are required,

  • 2 Backend Servers for NEX

  • 1 Main HA proxy server

  • 1 Backup HA proxy server

Steps to setup HA scenario

It is recommended to use HA proxy to setup a highly available scenario. Click the link below to learn about the step-by-step procedure to configure HA


The below code uses the SSL passthrough for end to end encryption. The SSL certificates are passed onto both backend servers (server1, server 2).

	log /dev/log	local0
	log /dev/log	local1 notice
	chroot /var/lib/haproxy
	stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
	stats timeout 30s
	user haproxy
	group haproxy

	# Default SSL material locations
	ca-base /etc/ssl/certs
	crt-base /etc/ssl/private

	# See:
        ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
        ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets

	log	global
	mode	http
	option	dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
	errorfile 400 /etc/haproxy/errors/400.http
	errorfile 403 /etc/haproxy/errors/403.http
	errorfile 408 /etc/haproxy/errors/408.http
	errorfile 500 /etc/haproxy/errors/500.http
	errorfile 502 /etc/haproxy/errors/502.http
	errorfile 503 /etc/haproxy/errors/503.http
	errorfile 504 /etc/haproxy/errors/504.http

listen stats
    bind *:8080 # Defines the IP and port for the stats page
    mode http
    stats enable
    stats hide-version
    stats realm Haproxy\ Statistics
    stats uri /stats # The URL for the stats page
    stats auth <your-username>:<your-password> # Use the respective username and password of the node in use

frontend https_front
    bind *:443
    mode tcp
    default_backend https_back

backend https_back
    mode tcp
    option tcp-check
    tcp-check connect port 3000
    server server1 x.x.x.x:443 check fall 1
    server server2 x.x.x.x:443 check backup fall 1

There are several methods to deploy high availability node application with HA proxy. Below are the links to check the various configurations,

Last updated