Skip to content
Open
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
1 change: 0 additions & 1 deletion daprdocs/content/en/concepts/dapr-services/placement.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ The Placement service is not deployed with this setting in Kubernetes mode. This

For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page](https://docs.dapr.io/operations/hosting/kubernetes/).


## Related links

[Learn more about the Placement API.]({{% ref placement_api %}})
20 changes: 11 additions & 9 deletions daprdocs/content/en/concepts/dapr-services/scheduler.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,25 +260,27 @@ Changing these settings should always been done first in a testing environment,
{{% /alert %}}

```
--etcd-backend-batch-interval string Maximum time before committing the backend transaction. (default "50ms")
--etcd-backend-batch-limit int Maximum operations before committing the backend transaction. (default 5000)
--etcd-compaction-mode string Compaction mode for etcd. Can be 'periodic' or 'revision' (default "periodic")
--etcd-compaction-retention string Compaction retention for etcd. Can express time or number of revisions, depending on the value of 'etcd-compaction-mode' (default "10m")
--etcd-backend-batch-interval string Maximum time before committing the backend transaction. (default "100ms")
--etcd-backend-batch-limit int Maximum operations before committing the backend transaction. (default 10000)
--etcd-compaction-mode string Compaction mode for etcd. Can be 'periodic' or 'revision' (default "revision")
--etcd-compaction-retention string Compaction retention for etcd. Can express time or number of revisions, depending on the value of 'etcd-compaction-mode' (default "1000000")
--etcd-experimental-bootstrap-defrag-threshold-megabytes uint Minimum number of megabytes needed to be freed for etcd to consider running defrag during bootstrap. Needs to be set to non-zero value to take effect. (default 100)
--etcd-max-snapshots uint Maximum number of snapshot files to retain (0 is unlimited). (default 10)
--etcd-max-txn-ops uint Maximum number of operations permitted in a single etcd transaction. (default 10000)
--etcd-max-wals uint Maximum number of write-ahead logs to retain (0 is unlimited). (default 10)
--etcd-snapshot-count uint Number of committed transactions to trigger a snapshot to disk. (default 10000)
--etcd-snapshot-count uint Number of committed transactions to trigger a snapshot to disk. (default 100000)
```

Helm:

```yaml
dapr_scheduler.etcdBackendBatchInterval="50ms"
dapr_scheduler.etcdBackendBatchLimit=5000
dapr_scheduler.etcdCompactionMode="periodic"
dapr_scheduler.etcdCompactionRetention="10m"
dapr_scheduler.etcdBackendBatchInterval="100ms"
dapr_scheduler.etcdBackendBatchLimit=10000
dapr_scheduler.etcdCompactionMode="revision"
dapr_scheduler.etcdCompactionRetention="1000000"
dapr_scheduler.etcdDefragThresholdMB=100
dapr_scheduler.etcdMaxSnapshots=10
dapr_scheduler.etcdMaxTxnOps=10000
```

## Related links
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ description: "Configure Scheduler to persist its database to make it resilient t
---

The [Scheduler]({{% ref scheduler.md %}}) service is responsible for writing jobs to its Etcd database and scheduling them for execution.
By default, the Scheduler service database embeds Etcd and writes data to a Persistent Volume Claim volume of size `1Gb`, using the cluster's default [storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/).
On fresh Dapr v1.18+ installs, the Scheduler service database embeds Etcd and writes data to a Persistent Volume Claim volume of size `16Gi`, using the cluster's default [storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/). Earlier versions defaulted to `1Gi`, and clusters upgraded from those versions keep their original PVC size because `spec.volumeClaimTemplates` is immutable on an existing StatefulSet; the Helm chart detects the existing StatefulSet and pins `storageSize` to the value already in use.
This means that there is no additional parameter required to run the scheduler service reliably on most Kubernetes deployments, although you will need [additional configuration](#storage-class) if a default StorageClass is not available or when running a production environment.

{{% alert title="Warning" color="warning" %}}
The default storage size for the Scheduler is `1Gi`, which is likely not sufficient for most production deployments.
Clusters upgraded from before Dapr v1.18 keep their original Scheduler PVC size (typically `1Gi`), which is likely not sufficient for most production deployments.
Remember that the Scheduler is used for [Actor Reminders]({{% ref actors-timers-reminders.md %}}) & [Workflows]({{% ref workflow-overview.md %}}), and the [Jobs API]({{% ref jobs_api.md %}}).
You may want to consider reinstalling Dapr with a larger Scheduler storage of at least `16Gi` or more.
If your cluster is in this state, see [Increase existing Scheduler Storage Size](#increase-existing-scheduler-storage-size) below to expand the PVCs in place, or reinstall Dapr with a larger Scheduler storage.
For more information, see the [ETCD Storage Disk Size](#etcd-storage-disk-size) section below.
{{% /alert %}}

## Production Setup

### ETCD Storage Disk Size

The default storage size for the Scheduler is `1Gb`.
This size is likely not sufficient for most production deployments.
The default storage size for the Scheduler is `16Gi` on fresh Dapr v1.18+ installs, and `1Gi` on earlier versions (and clusters upgraded from them).
The legacy `1Gi` is likely not sufficient for most production deployments, and even the new `16Gi` default may need to be raised for higher-throughput workloads.
When the storage size is exceeded, the Scheduler will log an error similar to the following:

```
Expand All @@ -41,7 +41,7 @@ This means the actual disk usage of Scheduler will be higher than the current ob
### Setting the Storage Size on Installation

If you need to increase an **existing** Scheduler storage size, see the [Increase Scheduler Storage Size](#increase-existing-scheduler-storage-size) section below.
To increase the storage size (in this example- `16Gi`) for a **fresh** Dapr installation, you can use the following command:
To set the storage size explicitly (in this example matching the `16Gi` default) for a **fresh** Dapr installation, you can use the following command:

{{< tabpane text=true >}}
<!-- Dapr CLI -->
Expand Down Expand Up @@ -84,7 +84,7 @@ Not all storage providers support dynamic volume expansion.
Please see your storage provider documentation to determine if this feature is supported, and what to do if it is not.
{{% /alert %}}

By default, each Scheduler will create a Persistent Volume and Persistent Volume Claim of size `1Gi` against the [default `standard` storage class](#storage-class) for each Scheduler replica.
On clusters upgraded from before Dapr v1.18, each Scheduler PVC is typically `1Gi` (inherited from the earlier default) against the [default `standard` storage class](#storage-class) for each Scheduler replica. The procedure below applies whenever you need to grow existing PVCs, regardless of their starting size.
These will look similar to the following, where in this example we are running Scheduler in HA mode.

```
Expand Down
Loading