Skip to content

Commit 84e559e

Browse files
authored
Merge pull request #5067 from JoshVanL/hot-reloading-configuration
[1.18] HotReload: Configuration, Resiliency, and HTTPEndpoints
2 parents 08600f3 + 60a756c commit 84e559e

5 files changed

Lines changed: 36 additions & 6 deletions

File tree

daprdocs/content/en/concepts/components-concept.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Component reloading occurs when a component resource is created, updated, or del
6060
When a component is updated, the component is first closed, and then reinitialized using the new configuration.
6161
The component is unavailable for a short period of time during reload and reinitialization.
6262

63+
Hot reloading also extends to [Configuration]({{% ref "configuration-overview.md" %}}), [Resiliency]({{% ref "resiliency-overview.md" %}}), and HTTPEndpoint resources.
64+
Changes to these resource types trigger a graceful restart of the Dapr sidecar (via SIGHUP) to apply the new configuration. SIGHUP is not supported on Windows.
65+
See [Updating resources]({{% ref "component-updates.md" %}}) for more details.
66+
6367
## Available component types
6468

6569
The following are the component types provided by Dapr:

daprdocs/content/en/operations/components/component-updates.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
type: docs
3-
title: "Updating components"
4-
linkTitle: "Updating components"
3+
title: "Updating resources"
4+
linkTitle: "Updating resources"
55
weight: 300
6-
description: "Updating deployed components used by applications"
6+
description: "Updating deployed components, configurations, resiliency, and HTTPEndpoints used by applications"
77
---
88

99
When making an update to an existing deployed component used by an application, Dapr does not update the component automatically unless the [`HotReload`](#hot-reloading-preview-feature) feature gate is enabled.
@@ -26,10 +26,13 @@ Unless the [`HotReload` feature gate is enabled](#hot-reloading-preview-feature)
2626
## Hot Reloading (Preview Feature)
2727

2828
> This feature is currently in [preview]({{% ref "preview-features.md" %}}).
29-
> Hot reloading is enabled by via the [`HotReload` feature gate]({{% ref "support-preview-features.md" %}}).
29+
> Hot reloading is enabled via the [`HotReload` feature gate]({{% ref "support-preview-features.md" %}}).
3030
31-
Dapr can be made to "hot reload" components whereby component updates are picked up automatically without the need to restart the Dapr sidecar process or Kubernetes pod.
32-
This means creating, updating, or deleting a component manifest will be reflected in the Dapr sidecar during runtime.
31+
Dapr can be made to "hot reload" resources whereby updates are picked up automatically without the need to manually restart the Dapr sidecar process or Kubernetes pod.
32+
33+
### Components and Subscriptions
34+
35+
Creating, updating, or deleting a Component or Subscription manifest is reflected in the Dapr sidecar during runtime.
3336

3437
{{% alert title="Updating Components" color="warning" %}}
3538
When a component is updated it is first closed, and then re-initialized using the new configuration.
@@ -48,6 +51,16 @@ Any create, update, or deletion of these component types is ignored by the sidec
4851
- [Actor State Stores]({{% ref "state_api.md#configuring-state-store-for-actors" %}})
4952
- [Workflow Backends]({{% ref "workflow-architecture.md#workflow-backend" %}})
5053

54+
### Configurations, Resiliency, and HTTPEndpoints
55+
56+
With the `HotReload` feature gate enabled, the Dapr sidecar also supports reloading [Configuration]({{% ref "configuration-overview.md" %}}), [Resiliency]({{% ref "resiliency-overview.md" %}}), and [HTTPEndpoint]({{% ref "service-invocation-overview.md" %}}) resources.
57+
58+
Unlike Components and Subscriptions which are reloaded in-place, changes to these resource types trigger an automatic **graceful restart** of the Dapr sidecar process (via SIGHUP). This ensures that the new configuration is applied cleanly. Unchanged resources are detected and silently ignored, so a restart only occurs when an actual change is detected.
59+
60+
{{% alert title="Windows" color="warning" %}}
61+
SIGHUP is not supported on Windows. On Windows, you must fully restart the `daprd` process to pick up changes to Configuration, Resiliency, and HTTPEndpoint resources.
62+
{{% /alert %}}
63+
5164
## Further reading
5265
- [Components concept]({{% ref components-concept.md %}})
5366
- [Reference secrets in component definitions]({{% ref component-secrets.md %}})

daprdocs/content/en/operations/configuration/configuration-overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,12 @@ spec:
445445
workloadCertTTL: 24h
446446
```
447447

448+
## Hot Reloading
449+
450+
When the [`HotReload` feature gate]({{% ref "support-preview-features" %}}) is enabled, changes to Configuration resources are automatically detected and trigger a graceful restart of the Dapr sidecar (via SIGHUP) to apply the new configuration. Unchanged Configuration resources are silently ignored. SIGHUP is not supported on Windows.
451+
452+
See [Updating resources]({{% ref "component-updates.md" %}}) for more information.
453+
448454
## Next steps
449455

450456
{{< button text="Learn about concurrency and rate limits" page="control-concurrency.md" >}}

daprdocs/content/en/operations/resiliency/resiliency-overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ spec:
173173
circuitBreaker: pubsubCB
174174
```
175175
176+
## Hot Reloading
177+
178+
When the [`HotReload` feature gate]({{% ref "support-preview-features" %}}) is enabled, changes to Resiliency resources are automatically detected and trigger a graceful restart of the Dapr sidecar (via SIGHUP) to apply the updated resiliency policies. Unchanged Resiliency resources are silently ignored. SIGHUP is not supported on Windows.
179+
180+
See [Updating resources]({{% ref "component-updates.md" %}}) for more information.
181+
176182
## Limitations
177183

178184
- **Service invocation via gRPC:** Currently, resiliency policies are not supported for service invocation via gRPC.

daprdocs/content/en/operations/support/support-preview-features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ For CLI there is no explicit opt-in, just the version that this was first made a
2121
| **Actor State TTL** | Allow actors to save records to state stores with Time To Live (TTL) set to automatically clean up old data. In its current implementation, actor state with TTL may not be reflected correctly by clients, read [Actor State Transactions]({{% ref actors_api.md %}}) for more information. | `ActorStateTTL` | [Actor State Transactions]({{% ref actors_api.md %}}) | v1.11 |
2222
| **Component Hot Reloading** | Allows for Dapr-loaded components to be "hot reloaded". A component spec is reloaded when it is created/updated/deleted in Kubernetes or on file when running in self-hosted mode. Ignores changes to actor state stores and workflow backends. | `HotReload`| [Hot Reloading]({{% ref components-concept.md %}}) | v1.13 |
2323
| **Subscription Hot Reloading** | Allows for declarative subscriptions to be "hot reloaded". A subscription is reloaded either when it is created/updated/deleted in Kubernetes, or on file in self-hosted mode. In-flight messages are unaffected when reloading. | `HotReload`| [Hot Reloading]({{% ref "subscription-methods.md#declarative-subscriptions" %}}) | v1.14 |
24+
| **Configuration, Resiliency, and HTTPEndpoint Hot Reloading** | Changes to Configuration, Resiliency, and HTTPEndpoint resources are automatically detected and trigger a graceful restart of the Dapr sidecar via SIGHUP. Not supported on Windows. | `HotReload`| [Hot Reloading]({{% ref "component-updates.md" %}}) | v1.18 |
2425
| **Workflows Clustered Deployment** | Enable Workflows to function when workflow clients communicate to multiple daprds of the same appID who are behind a loadbalancer. Only relevant when using [Dapr shared]({{% ref "kubernetes-dapr-shared" %}}) | `WorkflowsClusteredDeployment`| [Dapr Shared]({{% ref "kubernetes-dapr-shared" %}}) | v1.16 |
2526
| **Workflows Durable Activity Results** | If set, ensures that activity results are durably sent to the owning workflow in multi-application scenarios, even when the owning workflow application is unavailable. Unless running multiple Dapr versions, this feature gate should be enabled. Disabled by default for backwards compatibility. | `WorkflowsRemoteActivityReminder` | [Multi-application Workflows]({{% ref "workflow-multi-app.md#durable-activity-results" %}}) | v1.17 |

0 commit comments

Comments
 (0)