HA (high availability) for drone is in Beta and may not be suitable for production workloads.
Drone is a now capable of being a highly available service that is resilient to failures.
Overview
There are two new components that are required to make drone highly available.
- The load balancer HAProxy. Used to load balance the drone server UI requests, and balance requests from the drone runners to the drone servers. Any standard Load Balancer or reverse proxy should work. We use HAProxy in our developer setup.
- The Redis for queues and pub/sub. Used for runner events, log streaming, build cancelation events and finally the build queue itself.
Configuration
Here we will take a look at a basic configuration for HA and how to configure the load balancer and redis.
Drone server configuration
For our first server {DRONE_SERVER_1_HOSTNAME_OR_IP}
|
|
For our second server 2 {DRONE_SERVER_2_HOSTNAME_OR_IP}
|
|
Now, the Drone frontend app can be opened at https://{PUBLIC_HOSTNAME_OR_IP}
.
Development setup using Docker compose
Note: This is for development purposes, and not for production.
Local Development