No Results
Failover

Configuring Failover

Shared User/Session Database

MySql 5.6+ required

  • Configured in [INSTALL_HOME]/conf/custom.properties:
    • Edit:
db.auth.url=jdbc:mariadb://<host>:<port>/<dbName>
db.auth.username=<user>
db.auth.password=<pass>
    • Uncomment:
db.auth.driver=org.mariadb.jdbc.Driver
db.auth.dialect=org.hibernate.dialect.MySQL57Dialect
    • Optional, add:
h2.server.tcpPort=8043
h2.console.tcpPort=8082
  • The specified user must have table creation permissions on the specified database.

The edgeAuth database (or whatever you name your auth database in the config) must be created in MySQL prior to starting the server.

For additional details and instructions on installing a clustered edgeCore system, see Cluster Installation.

HAProxy config

  • Get latest stable version: http://www.haproxy.org/
  • Example haproxy.cfg is provided on the link below. Locally running 2 instances of edgeCore, one on port 8081, one on port 8082
  • This configuration is for full round-robin distribution of sessions, although failover vs load-balancing is up to the configuration of the load-balancer. There are no differences in edgeCore configuration.

UBUNTU HAProxy Config

sudo add-apt-repository ppa:vbernat/haproxy-1.7
sudo apt-get update
sudo apt-get install haproxy
sudo cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.orig

Place the following at the END of the default config at /etc/haproxy/haproxy.cfg:

frontend http_front
bind *:8080
stats uri /haproxy?stats
default_backend edgesuite

backend edgesuite
balance roundrobin
cookie SERVERID insert indirect httponly nocache
server srv1 localhost:8081 check cookie s1
server srv2 localhost:8082 check cookie s2

Start and check the status of the HAProxy service:

service haproxy restart
service haproxy status

Point your browser to http://localhost:8080/haproxy?stats to see if it is working.


Terms | Privacy