Search
K

Add high availability

In this guide, you'll learn how to add a load balancer for high availability support. You can use the load balancers included below to complete this task.
Note: Maverics Docs are current with the newest Maverics release. Please contact [email protected] to ensure you are on the latest release. Additionally, if you are new to Maverics, please visit our product capabilities and installation docs first.

AWS Application Load Balancer

Prerequisites

  • An AWS subscription. If you don't have a subscription, you can sign up for one here.
  • A VPC network. For this guide, we'll use the default one created.
  • At least two EC2 instances with the Maverics Orchestrator installed.

Steps

  1. 1.
    Set up your load balancer on AWS, for more details see Getting started with Application Load Balancers in the AWS documentation.
  2. 2.
    Enable sticky sessions on the load balancer.
    • By default, Strata recommends using the AWS cookie as a persistence mechanism. However, in some deployments, it may make sense to use the Maverics maverics_session cookie instead.
  3. 3.
    The final step is to update your DNS records to point to the load balancer instead of the Maverics Orchestrator.
When this is done you should see all traffic for your user going to one Orchestrator instance because you've enabled the session stickiness. In the event that your Maverics Orchestrator goes down, the AWS load balancer will reroute traffic to the other Maverics Orchestrators that are attached to the load balancer.

Nginx

Prerequisites

  • Three server machines, two for the Maveric Orchestrator and one for the Nginx server.
    • 192.168.0.1 is the IP address of the Nginx server.
    • 192.168.0.2 and 192.168.0.3 are the IP addresses for the Maveric Orchestrator servers.

Steps

  1. 1.
    Install Nginx using a package manager.
    sudo yum install -y epel-release && sudo yum install -y nginx
  2. 2.
    Enable and start Nginx.
    sudo systemctl enable nginx && sudo systemctl start nginx
  3. 3.
    Add a upstream block with the. In this example, our upstream server block would look like this.
    upstream myapp1 {
    ip_hash; # Load balancer provided sticky session. http://nginx.org/en/docs/http/ngx_http_upstream_module.html#ip_hash
    server 192.168.0.2;
    server 192.168.0.3;
    }
    If you want to use the Maveric Orchestrator cookie to achieve sticky sessions, then your upstream server block will look like this.
    upstream myapp1 {
    server 192.168.0.2;
    server 192.168.0.3;
    sticky cookie maverics_session; # Application provided sticky session. http://nginx.org/en/docs/http/ngx_http_upstream_module.html#sticky
    }
  4. 4.
    Restart Nginx to load the new configuration.
    sudo systemctl restart nginx
  5. 5.
    Update your DNS record to point to the Nginx server.
After updating the DNS you will see the traffic load balancing between the machines you added in the upstream server block. You will also see that each client "sticks" to specific upstream server.