Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/enterprise_edition/control_plane/ha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
icon: material/shield-check
---

# High availability

The [control plane](index.md) is deployed as a standalone application. If using our [Helm chart](installation.md), it's possible to deploy multiple replicas in different availability zones which can provide operational redundancy.

To make sure only one instance performs infrastructure changes, the control plane implements leader election and automatically selects _one_ pod to serve all requests.

## How it works

!!! note "Kubernetes only"
This feature is only supported when running the control plane with Kubernetes. While a different synchronization primitive
could have been used, we rely on the Kubernetes `Service` to redirect traffic.

<center>
<img class="theme-aware-image" src="/images/ee/ha.png" width="100%" alt="Control plane">
</center>

When an instance of the control plane deployment is started, it attempts to acquire a `Lease` from the Kubernetes API. The lease is short-lived and is renewed periodically.

Whichever instance acquires the lease first will report itself as `"Ready"` to the `Service`. This ensures that only one instance can respond to API requests from both PgDog and the web UI.

### Configuration

This feature is **disabled** by default. It can be enabled and configured in the Helm chart:

```yaml title="values.yaml"
control:
config:
leader:
enabled: true
lease_name: "control2"
lease_duration_secs: 15
lease_interval_secs: 5
release_timeout_secs: 5
```

Most of these settings have sane defaults:

| Configuration | Description |
|-|-|
| `enabled` | Toggle leader election on or off. It is disabled by default (`false`). |
| `lease_name` | The name of the `Lease` resource. Change it if you're planning to deploy more than one control plane per namespace. |
| `lease_duration_secs` | Lease duration. Longer values prevent lease takeover due to clock skew, but slow down redeployments after unexpected pod termination. |
| `lease_interval_secs` | How often the control plane leader attempts to renew the lease. |
| `release_timeout_secs` | How long the control plane will wait while shutting down gracefully for the lease to be released. |

### Default deployment

By default, the control plane is deployed with only one replica. This is usually sufficient since high availability is not essential for normal operations and PgDog pods can tolerate intermittent control plane downtime.
4 changes: 2 additions & 2 deletions docs/examples/control_plane/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
x-pgdog: &pgdog
image: ghcr.io/pgdogdev/pgdog-enterprise:v2026-06-22
image: ghcr.io/pgdogdev/pgdog-enterprise:v2026-06-24
command:
[
"pgdog",
Expand Down Expand Up @@ -43,7 +43,7 @@ services:
image: redis:7

control:
image: ghcr.io/pgdogdev/pgdog-enterprise/control:v2026-06-22
image: ghcr.io/pgdogdev/pgdog-enterprise/control:v2026-06-24
ports:
- "8099:8080"
environment:
Expand Down
Binary file added docs/images/ee/ha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ table {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Theme-aware Images ===== */
.theme-aware-image {
filter: contrast(1.04) saturate(1.08);
}

[data-md-color-scheme="slate"] .theme-aware-image {
filter: invert(1) hue-rotate(180deg) contrast(1.12) saturate(1.05);
}

/* ===== Card Grid ===== */
.grid {
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Latest released tag for the Enterprise Docker images. Update this in one
# place; reference it in docs with {{ enterprise_tag }}. Can be overridden at
# build time with the ENTERPRISE_TAG environment variable.
ENTERPRISE_TAG = os.environ.get("ENTERPRISE_TAG", "v2026-06-22")
ENTERPRISE_TAG = os.environ.get("ENTERPRISE_TAG", "v2026-06-24")


def define_env(env):
Expand Down
Loading