diff --git a/daprdocs/content/en/concepts/components-concept.md b/daprdocs/content/en/concepts/components-concept.md index 3aa3e20b607..d95b79a0a41 100644 --- a/daprdocs/content/en/concepts/components-concept.md +++ b/daprdocs/content/en/concepts/components-concept.md @@ -54,7 +54,7 @@ For more information read [Pluggable components overview]({{% ref "pluggable-com ## Hot Reloading -With the [`HotReload` feature enabled]({{% ref "support-preview-features" %}}), components are able to be "hot reloaded" at runtime. +Since Dapr v1.18, components are "hot reloaded" at runtime by default. To opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "preview-features.md" %}}). This means that you can update component configuration without restarting the Dapr runtime. Component reloading occurs when a component resource is created, updated, or deleted, either in the Kubernetes API or in self-hosted mode when a file is changed in the `resources` directory. When a component is updated, the component is first closed, and then reinitialized using the new configuration. diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index 682c41f3e3f..31ac2db169c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -188,9 +188,14 @@ The example above shows an event subscription to topic `orders`, for the pubsub Place `subscription.yaml` in the same directory as your `pubsub.yaml` component. When Dapr starts up, it loads subscriptions along with the components. {{% alert title="Note" color="primary" %}} -This feature is currently in preview. -Dapr can be made to "hot reload" declarative subscriptions, whereby updates are picked up automatically without needing a restart. -This is enabled by via the [`HotReload` feature gate]({{% ref "support-preview-features" %}}). +Declarative subscriptions are "hot reloaded" by default, whereby updates are picked up automatically without needing a restart. To opt out, disable the `HotReload` feature in the Dapr application configuration: + +```yaml +spec: + features: + - name: HotReload + enabled: false +``` To prevent reprocessing or loss of unprocessed messages, in-flight messages between Dapr and your application are unaffected during hot reload events. {{% /alert %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md index fa2fd3afa01..f88bef647f6 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md @@ -87,9 +87,8 @@ For more information, read [about the subscriptions in Subscription Types]({{% r ### Reloading topic subscriptions -To reload topic subscriptions that are defined programmatically or declaratively, the Dapr sidecar needs to be restarted. -The Dapr sidecar can be made to dynamically reload changed declarative topic subscriptions without restarting by enabling the [`HotReload` feature gate]({{% ref "support-preview-features" %}}). -Hot reloading of topic subscriptions is currently a preview feature. +Programmatic topic subscriptions require the Dapr sidecar to be restarted in order to be reloaded. +The Dapr sidecar dynamically reloads changed declarative topic subscriptions without restarting. This is enabled by default; to opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "preview-features.md" %}}). In-flight messages are unaffected when reloading a subscription. ### Message routing diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md index 9f0f6721ab9..366158874da 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md @@ -21,9 +21,14 @@ The examples below demonstrate pub/sub messaging between a `checkout` app and an ### Declarative subscriptions {{% alert title="Note" color="primary" %}} -This feature is currently in preview. -Dapr can be made to "hot reload" declarative subscriptions, whereby updates are picked up automatically without needing a restart. -This is enabled by via the [`HotReload` feature gate]({{% ref "support-preview-features" %}}). +Declarative subscriptions are "hot reloaded" by default, whereby updates are picked up automatically without needing a restart. To opt out, disable the `HotReload` feature in the Dapr application configuration: + +```yaml +spec: + features: + - name: HotReload + enabled: false +``` To prevent reprocessing or loss of unprocessed messages, in-flight messages between Dapr and your application are unaffected during hot reload events. {{% /alert %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md index 65f0e0d2304..45796b7d8a7 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md @@ -67,6 +67,19 @@ There are two ways to invoke a non-Dapr endpoint when communicating either to Da curl http://localhost:3500/v1.0/invoke/https://darthsidious.starwars/method/order66 ``` +{{% alert title="Note" color="primary" %}} +`HTTPEndpoint` resources are "hot reloaded" by default, whereby updates trigger an automatic graceful restart of the Dapr sidecar without needing a manual restart. To opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "configuration-overview.md" %}}): + +```yaml +spec: + features: + - name: HotReload + enabled: false +``` + +See [Updating resources]({{% ref "component-updates.md" %}}) for more information. +{{% /alert %}} + ### Using appId when calling Dapr enabled applications AppIDs are always used to call Dapr applications with the `appID` and `my-method`. Read the [How-To: Invoke services using HTTP]({{% ref howto-invoke-discover-services %}}) guide for more information. For example: diff --git a/daprdocs/content/en/operations/components/component-updates.md b/daprdocs/content/en/operations/components/component-updates.md index aa0fd01ce66..4bca09a229f 100644 --- a/daprdocs/content/en/operations/components/component-updates.md +++ b/daprdocs/content/en/operations/components/component-updates.md @@ -6,29 +6,25 @@ weight: 300 description: "Updating deployed components, configurations, resiliency, and HTTPEndpoints used by applications" --- -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. -The Dapr sidecar needs to be restarted in order to pick up the latest version of the component. -How this is done depends on the hosting environment. +Updates to deployed resources (Components, Subscriptions, Configurations, Resiliency, WorkflowAccessPolicies and HTTPEndpoints) are picked up automatically by the sidecar via [hot reloading](#hot-reloading). Hot reloading is enabled by default; to opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "preview-features.md" %}}). +When hot reloading is disabled, the Dapr sidecar needs to be restarted in order to pick up the latest version of the resource. How this is done depends on the hosting environment. ### Kubernetes -When running in Kubernetes, the process of updating a component involves two steps: +When hot reloading is disabled and running in Kubernetes, the process of updating a component involves two steps: 1. Apply the new component YAML to the desired namespace -1. Unless the [`HotReload` feature gate is enabled](#hot-reloading-preview-feature), perform a [rollout restart operation](https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources) on your deployments to pick up the latest component +1. Perform a [rollout restart operation](https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources) on your deployments to pick up the latest component ### Self Hosted -Unless the [`HotReload` feature gate is enabled](#hot-reloading-preview-feature), the process of updating a component involves a single step of stopping and restarting the `daprd` process to pick up the latest component. +When hot reloading is disabled, the process of updating a component involves a single step of stopping and restarting the `daprd` process to pick up the latest component. > **Note:** On POSIX-compatible systems (Linux, macOS), you can also send a `SIGHUP` signal to the `daprd` process to reload the runtime in-process without fully restarting it. See [Reloading configuration with SIGHUP]({{% ref "configuration-overview.md#reloading-configuration-with-sighup" %}}) for more information. -## Hot Reloading (Preview Feature) +## Hot Reloading -> This feature is currently in [preview]({{% ref "preview-features.md" %}}). -> Hot reloading is enabled via the [`HotReload` feature gate]({{% ref "support-preview-features.md" %}}). - -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. +Dapr "hot reloads" resources whereby updates are picked up automatically without the need to manually restart the Dapr sidecar process or Kubernetes pod. ### Components and Subscriptions @@ -51,15 +47,11 @@ Any create, update, or deletion of these component types is ignored by the sidec - [Actor State Stores]({{% ref "state_api.md#configuring-state-store-for-actors" %}}) - [Workflow Backends]({{% ref "workflow-architecture.md#workflow-backend" %}}) -### Configurations, Resiliency, and HTTPEndpoints - -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. +### Configurations, Resiliency, WorkflowAccessPolicies, and HTTPEndpoints -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. +The Dapr sidecar also reloads [Configuration]({{% ref "configuration-overview.md" %}}), [Resiliency]({{% ref "resiliency-overview.md" %}}), [WorkflowAccessPolicy]({{% ref "workflow-access-policy.md" %}}), and [HTTPEndpoint]({{% ref "service-invocation-overview.md" %}}) resources. -{{% alert title="Windows" color="warning" %}} -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. -{{% /alert %}} +Unlike Components and Subscriptions which are reloaded in-place, changes to these resource types trigger an automatic **graceful restart** of the Dapr sidecar process. 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. ## Further reading - [Components concept]({{% ref components-concept.md %}}) diff --git a/daprdocs/content/en/operations/configuration/configuration-overview.md b/daprdocs/content/en/operations/configuration/configuration-overview.md index eb38eaacb29..5afd1a07892 100644 --- a/daprdocs/content/en/operations/configuration/configuration-overview.md +++ b/daprdocs/content/en/operations/configuration/configuration-overview.md @@ -77,6 +77,7 @@ The following menu includes all of the configuration settings you can set: - [Turning on preview features](#turning-on-preview-features) - [Example sidecar configuration](#example-sidecar-configuration) - [Reloading configuration with SIGHUP](#reloading-configuration-with-sighup) +- [Hot reloading](#hot-reloading) #### Tracing @@ -451,7 +452,7 @@ spec: ## Hot Reloading -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. +Changes to Configuration resources are automatically detected and trigger a graceful restart of the Dapr sidecar to apply the new configuration. To opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "configuration-overview.md" %}}). See [Updating resources]({{% ref "component-updates.md" %}}) for more information. diff --git a/daprdocs/content/en/operations/resiliency/resiliency-overview.md b/daprdocs/content/en/operations/resiliency/resiliency-overview.md index bb7d607ceb0..0973e6ce8b8 100644 --- a/daprdocs/content/en/operations/resiliency/resiliency-overview.md +++ b/daprdocs/content/en/operations/resiliency/resiliency-overview.md @@ -175,7 +175,7 @@ spec: ## Hot Reloading -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. +Changes to Resiliency resources are automatically detected and trigger a graceful restart of the Dapr sidecar to apply the updated resiliency policies. To opt out, disable the `HotReload` feature in the [Dapr application configuration]({{% ref "configuration-overview.md" %}}). See [Updating resources]({{% ref "component-updates.md" %}}) for more information. diff --git a/daprdocs/content/en/operations/support/support-preview-features.md b/daprdocs/content/en/operations/support/support-preview-features.md index dcf83337f17..6de1c3f22d6 100644 --- a/daprdocs/content/en/operations/support/support-preview-features.md +++ b/daprdocs/content/en/operations/support/support-preview-features.md @@ -19,8 +19,5 @@ For CLI there is no explicit opt-in, just the version that this was first made a | **Multi-App Run for Kubernetes** | Configure multiple Dapr applications from a single configuration file and run from a single command on Kubernetes | `dapr run -k -f` | [Multi-App Run]({{% ref multi-app-dapr-run.md %}}) | v1.12 | | **Cryptography** | Encrypt or decrypt data without having to manage secrets keys | N/A | [Cryptography concept]({{% ref "components-concept#cryptography" %}})| v1.11 | | **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 | -| **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 | -| **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 | -| **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 | | **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 | | **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. Strongly recommended to always be enabled when all Dapr applications are running the same version. Enabled by default as of v1.18. | `WorkflowsRemoteActivityReminder` | [Multi-application Workflows]({{% ref "workflow-multi-app.md#durable-activity-results" %}}) | v1.17 | diff --git a/daprdocs/content/en/reference/resource-specs/configuration-schema.md b/daprdocs/content/en/reference/resource-specs/configuration-schema.md index 02d35168120..ad2664df635 100644 --- a/daprdocs/content/en/reference/resource-specs/configuration-schema.md +++ b/daprdocs/content/en/reference/resource-specs/configuration-schema.md @@ -75,6 +75,9 @@ spec: components: deny: - + features: + - name: + enabled: accessControl: defaultAction: trustDomain: @@ -98,7 +101,7 @@ spec: | httpPipeline | N | Configure API middleware pipelines | [Middleware pipeline configuration overview]({{% ref "configuration-overview.md#middleware" %}})
[Learn more about the `httpPipeline` configuration.]({{% ref "middleware.md#configure-api-middleware-pipelines" %}}) | | appHttpPipeline | N | Configure application middleware pipelines | [Middleware pipeline configuration overview]({{% ref "configuration-overview.md#middleware" %}})
[Learn more about the `appHttpPipeline` configuration.]({{% ref "middleware.md#configure-app-middleware-pipelines" %}}) | | components | N | Used to specify a denylist of component types that can't be initialized. | [Learn more about the `components` configuration.]({{% ref "configuration-overview.md#disallow-usage-of-certain-component-types" %}}) | -| features | N | Defines the preview features that are enabled/disabled. | [Learn more about the `features` configuration.]({{% ref preview-features.md %}}) | +| features | N | Enables or disables Dapr features, including preview features and on-by-default features such as `HotReload`. | [Learn more about the `features` configuration.]({{% ref preview-features.md %}}) | | logging | N | Configure how logging works in the Dapr runtime. | [Learn more about the `logging` configuration.]({{% ref "configuration-overview.md#logging" %}}) | | metrics | N | Enable or disable metrics for an application. | [Learn more about the `metrics` configuration.]({{% ref "configuration-overview.md#metrics" %}}) | | nameResolution | N | Name resolution configuration spec for the service invocation building block. | [Learn more about the `nameResolution` configuration per components.]({{% ref supported-name-resolution.md %}}) |