diff --git a/docs/enterprise_edition/control_plane/.pages b/docs/enterprise_edition/control_plane/.pages index 1697fd8d..3a498226 100644 --- a/docs/enterprise_edition/control_plane/.pages +++ b/docs/enterprise_edition/control_plane/.pages @@ -1,5 +1,4 @@ nav: - index.md - installation.md - - features - ... diff --git a/docs/enterprise_edition/control_plane/features/alerts.md b/docs/enterprise_edition/control_plane/alerts.md similarity index 70% rename from docs/enterprise_edition/control_plane/features/alerts.md rename to docs/enterprise_edition/control_plane/alerts.md index 7e61e886..a85698b1 100644 --- a/docs/enterprise_edition/control_plane/features/alerts.md +++ b/docs/enterprise_edition/control_plane/alerts.md @@ -4,7 +4,7 @@ icon: material/alert-circle-outline # Alerts -Since the control plane has access to real-time PgDog [metrics](../../../features/metrics.md), it can detect outliers and trigger automatic alerts. +Since the control plane has access to real-time PgDog [metrics](../../features/metrics.md), it can detect outliers and trigger automatic alerts. ## How it works @@ -27,19 +27,34 @@ The following incident management providers are supported: Alerts are **disabled** by default. To enable them, configure a provider's API key and set thresholds for each supported metric you would like to monitor: -```yaml title="values.yaml" -control: - config: - alerts: - evaluation_window_secs: 300 - thresholds: - clients_waiting: 10 - cpu: 90.0 - memory: 2048 - server_connections: 100 - incident_io: - api_key: inc_live_xxx -``` +=== "Helm chart" + ```yaml title="values.yaml" + control: + config: + alerts: + evaluation_window_secs: 300 + thresholds: + clients_waiting: 10 + cpu: 90.0 + memory: 2048 + server_connections: 100 + incident_io: + api_key: inc_live_xxx + ``` +=== "control.toml" + ```toml + [alerts] + evaluation_window_secs = 300 + + [alerts.thresholds] + clients_waiting = 10 + cpu = 90.0 + memory = 2048 + server_connections = 100 + + [alerts.incident_io] + api_key = "inc_live_xxx" + ``` #### Parameters @@ -47,7 +62,7 @@ control: Thresholds have no defaults. If a threshold is not configured, its metric will not be monitored. -The following parameters are configurable via the [Helm chart](../installation.md): +The following parameters are configurable via the [Helm chart](installation.md): | Parameter | Description | Unit | |-|-|-| diff --git a/docs/enterprise_edition/control_plane/features/autoscaling.md b/docs/enterprise_edition/control_plane/autoscaling.md similarity index 61% rename from docs/enterprise_edition/control_plane/features/autoscaling.md rename to docs/enterprise_edition/control_plane/autoscaling.md index 85ac8906..cabff642 100644 --- a/docs/enterprise_edition/control_plane/features/autoscaling.md +++ b/docs/enterprise_edition/control_plane/autoscaling.md @@ -8,18 +8,24 @@ Autoscaling automatically adjusts PgDog settings when the number of processes (e ## Configuration -Autoscaling is **disabled** by default. To enable it, add the following settings to the [control plane](../installation.md) Helm [chart](https://github.com/pgdogdev/helm-ee): - -```yaml title="values.yaml" -control: - config: - autoscaling: - pool_size: true -``` +Autoscaling is **disabled** by default. To enable it, add the following settings to the [control plane](installation.md) Helm [chart](https://github.com/pgdogdev/helm-ee): + +=== "Helm chart" + ```yaml title="values.yaml" + control: + config: + autoscaling: + pool_size: true + ``` +=== "control.toml" + ```toml + [autoscaling] + pool_size = true + ``` ## How it works -When a PgDog process connects to the [control plane](../../control_plane/index.md), the control plane provides it with the total number of processes that are part of the same deployment. PgDog then automatically adjusts its configuration by dividing all pool-related configuration values by that number, for example: +When a PgDog process connects to the [control plane](index.md), the control plane provides it with the total number of processes that are part of the same deployment. PgDog then automatically adjusts its configuration by dividing all pool-related configuration values by that number, for example: === "Configuration" ```toml title="pgdog.toml" @@ -99,12 +105,12 @@ The following configuration options are supported for pool size autoscaling: | Section | Configuration | |-|-| -| [`[general]`](../../../configuration/pgdog.toml/general.md) | [`default_pool_size`](../../../configuration/pgdog.toml/general.md#default_pool_size) (alias: `max_pool_size`) | -| [`[general]`](../../../configuration/pgdog.toml/general.md) | [`min_pool_size`](../../../configuration/pgdog.toml/general.md#min_pool_size) | -| [`[[databases]]`](../../../configuration/pgdog.toml/databases.md) | [`pool_size`](../../../configuration/pgdog.toml/databases.md#pool_size) | -| [`[[databases]]`](../../../configuration/pgdog.toml/databases.md) | [`min_pool_size`](../../../configuration/pgdog.toml/databases.md#min_pool_size) | -| [`[[users]]`](../../../configuration/users.toml/users.md) | [`pool_size`](../../../configuration/users.toml/users.md#pool_size) | -| [`[[users]]`](../../../configuration/users.toml/users.md) | [`min_pool_size`](../../../configuration/users.toml/users.md#min_pool_size) | +| [`[general]`](../../configuration/pgdog.toml/general.md) | [`default_pool_size`](../../configuration/pgdog.toml/general.md#default_pool_size) (alias: `max_pool_size`) | +| [`[general]`](../../configuration/pgdog.toml/general.md) | [`min_pool_size`](../../configuration/pgdog.toml/general.md#min_pool_size) | +| [`[[databases]]`](../../configuration/pgdog.toml/databases.md) | [`pool_size`](../../configuration/pgdog.toml/databases.md#pool_size) | +| [`[[databases]]`](../../configuration/pgdog.toml/databases.md) | [`min_pool_size`](../../configuration/pgdog.toml/databases.md#min_pool_size) | +| [`[[users]]`](../../configuration/users.toml/users.md) | [`pool_size`](../../configuration/users.toml/users.md#pool_size) | +| [`[[users]]`](../../configuration/users.toml/users.md) | [`min_pool_size`](../../configuration/users.toml/users.md#min_pool_size) | ## Orchestrator integration @@ -112,7 +118,7 @@ Autoscaling actions are performed entirely using the internal PgDog <-> control ### Kubernetes -If using autoscaling and deploying PgDog with our [Helm chart](../../../installation.md), make sure to set the pool-related settings to reflect the _total_ number of connections. For example, if deploying 3 replicas and the total pool size across the 3 pods is 600 connections, set it accordingly in `values.yaml`: +If using autoscaling and deploying PgDog with our [Helm chart](../../installation.md), make sure to set the pool-related settings to reflect the _total_ number of connections. For example, if deploying 3 replicas and the total pool size across the 3 pods is 600 connections, set it accordingly in `values.yaml`: ```yaml title="values.yaml" defaultPoolSize: 600 diff --git a/docs/enterprise_edition/control_plane/features/.pages b/docs/enterprise_edition/control_plane/features/.pages deleted file mode 100644 index 8ae5ab46..00000000 --- a/docs/enterprise_edition/control_plane/features/.pages +++ /dev/null @@ -1,3 +0,0 @@ -nav: - - index.md - - ... diff --git a/docs/enterprise_edition/control_plane/features/index.md b/docs/enterprise_edition/control_plane/features/index.md deleted file mode 100644 index f33d33ed..00000000 --- a/docs/enterprise_edition/control_plane/features/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -icon: material/format-list-bulleted-type ---- - -# Features - -The control plane provides operational features for monitoring, configuring, and managing PgDog deployments. - -| Feature | Description | -|-|-| -| [Alerts](alerts.md) | Detect outliers in live PgDog metrics and send incidents to supported providers. | -| [Autoscaling](autoscaling.md) | Automatically resize connection pools when PgDog nodes are added or removed. | -| [Slack integration](slack.md) | Send deployment and configuration notifications to a Slack channel. | diff --git a/docs/enterprise_edition/control_plane/ha.md b/docs/enterprise_edition/control_plane/ha.md index 3346160a..41daa230 100644 --- a/docs/enterprise_edition/control_plane/ha.md +++ b/docs/enterprise_edition/control_plane/ha.md @@ -26,16 +26,26 @@ Whichever instance acquires the lease first will report itself as `"Ready"` to t 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 -``` +=== "Helm chart" + ```yaml title="values.yaml" + control: + config: + leader: + enabled: true + lease_name: "control2" + lease_duration_secs: 15 + renew_interval_secs: 5 + release_timeout_secs: 5 + ``` +=== "control.toml" + ```toml + [leader] + enabled = true + lease_name = "control2" + lease_duration_secs = 15 + renew_interval_secs = 5 + release_timeout_secs = 5 + ``` Most of these settings have sane defaults: @@ -44,7 +54,7 @@ Most of these settings have sane defaults: | `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. | +| `renew_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 diff --git a/docs/enterprise_edition/control_plane/index.md b/docs/enterprise_edition/control_plane/index.md index 3e22c144..4973eafe 100644 --- a/docs/enterprise_edition/control_plane/index.md +++ b/docs/enterprise_edition/control_plane/index.md @@ -45,17 +45,18 @@ PgDog nodes that are part of the same deployment should use the same token. It c A control plane deployment is capable of managing several PgDog deployments. It's not necessary (although possible) to have one control plane per PgDog deployment. -### Connection flow +## Architecture
+
+ Control plane <-> PgDog connection architecture
+