.. _ha:

=======================
High Availability Guide
=======================

Designate supports running all of its components services in "active-active"
HA modes.

Some services require some extra setup to ensure that they can work in
active-active, and the services are listed below.

designate-api
=============

Needs Access to:
----------------

* AMQP

Notes
-----

To run multiple `designate-api` services, you should run the services behind
a load balancer.

When behind the load balancer, you may need to set the following:

.. code-block:: ini

   [service:api]
   api_base_uri = http://<load balancer URI>/
   enable_host_header = True

Or the following:

.. code-block:: ini

   [oslo_middleware]
   enable_proxy_headers_parsing = true

And then the load balancer to set appropriate headers (e.g. enable `mod_proxy`
in apache.)

designate-central
=================

Needs Access to:
----------------

* AMQP
* Database

Notes
-----

You can run as many `designate-central` services as needed, as long as they all
have access to the AMQP server(s), work will be distributed across all of them.

designate-mdns
==============

Needs Access to:
----------------

* AMQP
* Database
* DNS Servers

Notes
-----

You can run as many `designate-mdns` services as needed, as long as they all
have access to the AMQP server(s), work will be distributed across all of them.

designate-worker
================

Needs Access to:
----------------

* AMQP
* DNS Servers

Notes
-----

You can run as many `designate-worker` services as needed, as long as they all
have access to the AMQP server(s), work will be distributed across all of them.

designate-producer
==================

Needs Access to:
----------------

* AMQP
* DLM

Notes
-----

You can run as many `designate-producer` services as needed, as long as they
all have access to the AMQP server(s), and a distributed lock manager,
work will be sharded across all the services.

You will need to set a coordination `backend_url`. This needs to be a DLM
that is supported by tooz, that supports group membership.
See `tooz driver list`_ for available drivers

.. warning:: Failure to set a `backend_url` can cause unexpected consequences, and may result in some periodic tasks being ran more than once.

.. code-block:: ini

   [coordination]
   backend_url = kazoo://<zookeeper url>:<zookeeper port>

designate-sink
==============

Needs Access to:
----------------

* AMQP

Notes
-----

You can run as many `designate-sink` services as needed, as long as they all
have access to the AMQP server(s), work will be distributed across all of them.


.. _tooz driver list: https://docs.openstack.org/tooz/latest/user/compatibility.html#grouping
