Datacenter High Availability

Coopr can be configured to be resilient to machine or component failures. This document describes the recommended configuration for setting up Coopr for HA within a single datacenter. Please refer to multi-datacenter HA documentation for configuring HA across multiple datacenters.

In order to support resiliency against machine or component failures within a datacenter, Coopr components can be configured to run with redundancies on multiple machines. Each machine running Coopr can have a maximum of -

  • One coopr-ui process
  • One coopr-server process
  • Multiple coopr-provisioner processes (See config COOPR_NUM_WORKERS in installation guide)
  • One ZooKeeper process
  • One database process

The diagram below shows the logical deployment diagram of Coopr for HA in a datacenter-

Within Datacenter Architecture Diagram

Coopr UI

Coopr UI (coopr-ui) is stateless, and communicates with Coopr Server using REST endpoints. Hence Coopr UI can be easily run on multiple machines. User traffic is routed to multiple instances of Coopr UI using load balancers (such as HAproxy or Varnish or VIP).

Coopr Provisioner

Coopr Provisioner (coopr-provisioner) is also stateless, and communicates with Coopr Server using REST endpoints. Hence Coopr Provisioner can be easily run on multiple machines.

Coopr Server

Coopr Server (coopr-server) can be run on multiple machines too. When run in this mode, there will be a load balancer fronting the Coopr Servers. Coopr UI and Coopr Provisioners will be configured to communicate via a load balancer with the Coopr Server. Also, all Coopr Servers in a datacenter should connect to the same ZooKeeper quorum.

ZooKeeper

A ZooKeeper quorum of at least 3 machines is required for redundancy. Note that ZooKeeper needs to run with an odd number of total machines for redundancy.

Database

Database needs to be replicated with automatic failover in case the master database goes down. Database is also fronted by a proxy that directs all operations to master database, and Coopr Server connects to database using the proxy.