2017-05-16 13:28:18 +00:00
# Clustering / High Availability (beta)
2016-09-29 11:49:12 +00:00
2018-10-17 14:24:04 +00:00
This guide explains how to use Traefik in high availability mode.
2017-09-11 17:10:04 +00:00
2018-10-17 14:24:04 +00:00
In order to deploy and configure multiple Traefik instances, without copying the same configuration file on each instance, we will use a distributed Key-Value store.
2016-09-29 11:49:12 +00:00
## Prerequisites
You will need a working KV store cluster.
2017-09-11 17:10:04 +00:00
_(Currently, we recommend [Consul ](https://consul.io ) .)_
2016-09-29 11:49:12 +00:00
## File configuration to KV store migration
2018-10-17 14:24:04 +00:00
We created a special Traefik command to help configuring your Key Value store from a Traefik TOML configuration file.
2017-09-11 17:10:04 +00:00
2016-09-29 11:49:12 +00:00
Please refer to [this section ](/user-guide/kv-config/#store-configuration-in-key-value-store ) to get more details.
2018-10-17 14:24:04 +00:00
## Deploy a Traefik cluster
2016-09-29 11:49:12 +00:00
2018-10-17 14:24:04 +00:00
Once your Traefik configuration is uploaded on your KV store, you can start each Traefik instance.
2017-09-11 17:10:04 +00:00
2018-10-17 14:24:04 +00:00
A Traefik cluster is based on a manager/worker model.
2017-09-11 17:10:04 +00:00
2018-10-17 14:24:04 +00:00
When starting, Traefik will elect a manager.
2017-08-26 10:12:44 +00:00
If this instance fails, another manager will be automatically elected.
2018-02-09 09:38:03 +00:00
2018-10-17 14:24:04 +00:00
## Traefik cluster and Let's Encrypt
2018-02-09 09:38:03 +00:00
2018-07-12 16:26:03 +00:00
**In cluster mode, ACME certificates have to be stored in [a KV Store entry ](/configuration/acme/#as-a-key-value-store-entry ).**
2018-02-09 09:38:03 +00:00
2018-10-17 14:24:04 +00:00
Thanks to the Traefik cluster mode algorithm (based on [the Raft Consensus Algorithm ](https://raft.github.io/ )), only one instance will contact Let's encrypt to solve the challenges.
2018-02-09 09:38:03 +00:00
2018-07-12 16:26:03 +00:00
The others instances will get ACME certificate from the KV Store entry.