> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-self-hosted/configuration/performance-ha/high-availability.md).

# High availability

Configure high availability for CARTO Self-hosted (Kots and Helm)

This guide details configuring High Availability (HA) for CARTO Self-Hosted deployments on Kubernetes. HA ensures continuous service during pod or node failures by running multiple replicas of the components that are critical to the platform. Configure it through the **Admin Console** (Kots) or through your `customizations.yaml` (Helm).

{% hint style="info" %}
This page covers pod and node failures. To keep CARTO available when a whole availability zone fails, see [Multi-AZ deployment](https://docs.carto.com/carto-self-hosted/configuration/performance-ha/multi-az-deployment.md).
{% endhint %}

## Kots

### Enabling high availability mode

To enable the high availability configuration on your CARTO Self-Hosted deployment, you'll have to check the following option in your configuration:

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-4658da23fcd56240642b107c609e91ac79f7e69a%2Fenable-high-availability.png?alt=media" alt=""><figcaption></figcaption></figure>

This option turns on autoscaling for nine components (accounts-www, ai-api, aiproxy, import-api, lds-api, maps-api, router, workspace-api and workspace-www) between the minimum and maximum number of replicas below, and spreads each component's replicas across nodes. It does not spread replicas across zones.

### Customize your high availability options

In case you'd like to customize the high availability configuration, these are the available options:

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-ba9a34c4508de64a6334531fd2a94bf3163c2935%2Fhigh-availability-options.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Number of replicas for critical components:

* **Min replicas:** The minimum number of replicas of each of the nine components running at any given time. Increasing this value enhances fault tolerance by providing more replicas to handle requests during failures. The default value is 2.
* **Max replicas:** The upper limit on the number of replicas of each of those components. The autoscaler scales each one between the two values based on CPU usage. The default value is 3.

## Helm

For Helm-based deployments the same high-availability principles apply, but (unlike the Admin Console's single "high availability" toggle) replicas are configured **per component** in your `customizations.yaml`:

* For each critical component, set `<component>.replicaCount`, or enable autoscaling with `<component>.autoscaling.enabled: true` and `<component>.autoscaling.minReplicas` / `maxReplicas` (e.g. `mapsApi.autoscaling.minReplicas`, `workspaceApi.autoscaling.minReplicas`). Autoscaling is not available for notifier, http-cache, cdn-invalidator-sub, import-worker, sql-worker, workspace-subscriber and accounts-subscriber; set their `replicaCount`.

For the full list of components and their values, see [Advanced Helm customizations](https://docs.carto.com/carto-self-hosted/reference/advanced-helm-customizations.md).

## Limitations and dependencies

* **Stateful dependencies provide their own HA.** CARTO's replica settings don't make the metadata database or the in-memory cache highly available. That comes from running them as **external, managed, highly-available services** (for example a multi-AZ managed PostgreSQL, and a managed Redis/Valkey with Sentinel or Cluster). See [Metadata Database](https://docs.carto.com/carto-self-hosted/planning/prerequisites/metadata-database.md) and [Configure an external in-memory cache](https://docs.carto.com/carto-self-hosted/configuration/data-and-storage/configure-an-external-in-memory-cache.md).
* **Node spreading:** the Admin Console option spreads each of its nine components' replicas across nodes (preferred pod anti-affinity). The Helm chart applies the same node-level anti-affinity by default (`<component>.podAntiAffinityPreset: soft`). Neither spreads replicas across zones.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.carto.com/carto-self-hosted/configuration/performance-ha/high-availability.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
