quay-registry Documentation

High Availability for Quay Enterprise

Quay Enterprise is designed to be run as a single global high availability service with minimal setup. This guide
explains the best practices for running Quay Enterprise in an HA setup.

Required Dependencies

The following services are required in order to run Quay Enterprise as HA:

A decent sized Postgres or MySQL database with automatic backup and failover. Amazon RDS is an example of a service that has automatic backup and failover.

A high availability distributed storage engine such as Amazon S3, Google Cloud Storage, Ceph RADOS or Swift. Using local storage with NFS is not recommended for HA setups.

A Redis server running on a medium sized machine. Redis is not considered critical and therefore does not require failover or backup.

A load balancer capable of TCP passthrough.

At least three medium-sized machines for the cluster.

Basic setup

Perform the basic Quay Enterprise Setup process, using the above database, storage, redis and using the load balancer hostname as the server hostnane. Once complete, save the contents of the conf/stack directory.

High Availability Setup

The ensure high availability, it is recommended that machines running in the cluster be self-initializing.

Health checking the cluster

To ensure the cluster as a whole is healthy, Quay Enterprise also exports a cluster-wide services status endpoint at https://{yourloadbalancerhostname}/health/endtoend that will return a 200 HTTP status code only if all services (database, redis, etc) are healthy.

Autoscaling

The final step in ensuring high availability for a Quay Enterprise cluster is ensuring it can scale to meet incoming demand. Scaling is typically accomplished by monitoring metrics such as CPU and memory, and adding (or removing) machines based on thresholds. On Amazon, CloudWatch alarms and Autoscaling Groups can be used to accomplish this task.