You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[1.17] Remove reference to SchedulerReminders feature gate
As of 1.17, Dapr no longer supports the `SchedulerReminders` feature
gate meaning all actor reminders are managed via Scheduler.
PR removes all reference to it, including documentation on reminder
migration & old configuration for the legacy "state" reminders.
Signed-off-by: joshvanl <[email protected]>
Copy file name to clipboardExpand all lines: daprdocs/content/en/concepts/dapr-services/scheduler.md
+18-33Lines changed: 18 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ The Dapr Scheduler service is used to schedule different types of jobs, running
10
10
- Actor reminder jobs (used by the actor reminders)
11
11
- Actor reminder jobs created by the Workflow API (which uses actor reminders)
12
12
13
-
From Dapr v1.15, the Scheduler service is used by default to schedule actor reminders as well as actor reminders for the Workflow API.
14
-
15
-
There is no concept of a leader Scheduler instance. All Scheduler service replicas are considered peers. All receive jobs to be scheduled for execution and the jobs are allocated between the available Scheduler service replicas for load balancing of the trigger events.
13
+
There is no concept of a leader Scheduler instance.
14
+
All Scheduler service replicas are considered peers.
15
+
All receive jobs to be scheduled for execution and the jobs are allocated between the available Scheduler service replicas for load balancing of the trigger events.
16
16
17
17
The diagram below shows how the Scheduler service is used via the jobs API when called from your application. All the jobs that are tracked by the Scheduler service are stored in the Etcd database.
18
18
@@ -21,35 +21,17 @@ The diagram below shows how the Scheduler service is used via the jobs API when
21
21
By default, Etcd is embedded in the Scheduler service, which means that the Scheduler service runs its own instance of Etcd.
22
22
See [Scheduler service flags]({{% ref "#flag-tuning" %}}) for more information on how to configure the Scheduler service.
23
23
24
-
## Actor Reminders
25
-
26
-
Prior to Dapr v1.15, [actor reminders]({{% ref "actors-timers-reminders#actor-reminders" %}}) were run using the Placement service. Now, by default, the [`SchedulerReminders` feature flag]({{% ref "support-preview-features#current-preview-features" %}}) is set to `true`, and all new actor reminders you create are run using the Scheduler service to make them more scalable.
27
-
28
-
When you deploy Dapr v1.15, any _existing_ actor reminders are automatically migrated from the Actor State Store to the Scheduler service as a one time operation for each actor type. Each replica will only migrate the reminders whose actor type and id are associated with that host. This means that only when all replicas implementing an actor type are upgraded to 1.15, will all the reminders associated with that type be migrated. There will be _no_ loss of reminder triggers during the migration. However, you can prevent this migration and keep the existing actor reminders running using the Actor State Store by setting the `SchedulerReminders` flag to `false` in the application configuration file for the actor type.
29
-
30
-
To confirm that the migration was successful, check the Dapr sidecar logs for the following:
31
-
32
-
```sh
33
-
Running actor reminder migration from state store to scheduler
34
-
```
35
-
coupled with
36
-
```sh
37
-
Migrated X reminders from state store to scheduler successfully
38
-
```
39
-
or
40
-
```sh
41
-
Skipping migration, no missing scheduler reminders found
42
-
```
43
-
44
24
## Job Locality
45
25
46
26
### Default Job Behavior
47
27
48
-
By default, when the Scheduler service triggers jobs, they are sent back to a single replica for the same app ID that scheduled the job in a randomly load balanced manner. This provides basic load balancing across your application's replicas, which is suitable for most use cases where strict locality isn't required.
28
+
When the Scheduler service triggers jobs, they are sent back to a single replica for the same app ID that scheduled the job in a randomly load balanced manner.
29
+
This provides basic load balancing across your application's replicas, which is suitable for most use cases where strict locality isn't required.
49
30
50
31
### Using Actor Reminders for Perfect Locality
51
32
52
-
For users who require perfect job locality (having jobs triggered on the exact same host that created them), actor reminders provide a solution. To enforce perfect locality for a job:
33
+
For users who require perfect job locality (having jobs triggered on the exact same host that created them), actor reminders provide a solution.
34
+
To enforce perfect locality for a job:
53
35
54
36
1. Create an actor type with a random UUID that is unique to the specific replica
55
37
2. Use this actor type to create an actor reminder
@@ -60,7 +42,7 @@ This approach ensures that the job will always be triggered on the same host whi
60
42
61
43
### Job Failure Policy and Staging Queue
62
44
63
-
When the Scheduler service triggers a job and it has a client side error, the job is retried by default with a 1s interval and 3 maximum retries.
45
+
When the Scheduler service triggers a job and it has a client side error, the job is retried by default with a 1s interval and 3 maximum retries.
64
46
65
47
For non-client side errors, for example, when a job cannot be sent to an available Dapr sidecar at trigger time, it is placed in a staging queue within the Scheduler service. Jobs remain in this queue until a suitable sidecar instance becomes available, at which point they are automatically sent to the appropriate Dapr sidecar instance.
@@ -216,7 +202,6 @@ Fine tune the embedded etcd to your needs by [reviewing and configuring the Sche
216
202
## Disabling the Scheduler service
217
203
218
204
If you are not using any features that require the Scheduler service (Jobs API, Actor Reminders, or Workflows), you can disable it by setting `global.scheduler.enabled=false`.
219
-
220
205
For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{% ref kubernetes %}}).
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/building-blocks/actors/actor-reentrancy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ A core tenet of the [virtual actor pattern](https://www.microsoft.com/research/p
10
10
11
11
Reentrancy solves this by allowing requests from the same chain, or context, to re-enter into an already locked actor. This proves useful in scenarios where:
12
12
- An actor wants to call a method on itself
13
-
- Actors are used in workflows to perform work, then call back onto the coordinating actor.
13
+
- Actors are used in workflows to perform work, then call back onto the coordinating actor.
14
14
15
15
Examples of chains that reentrancy allows are shown below:
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/building-blocks/actors/actors-features-concepts.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Now that you've learned about the [actor building block]({{% ref "actors-overvie
14
14
15
15
Dapr actors are virtual, meaning that their lifetime is not tied to their in-memory representation. As a result, they do not need to be explicitly created or destroyed. The Dapr actor runtime automatically activates an actor the first time it receives a request for that actor ID. If an actor is not used for a period of time, the Dapr actor runtime garbage-collects the in-memory object. It will also maintain knowledge of the actor's existence should it need to be reactivated later.
16
16
17
-
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
17
+
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
18
18
- Actor reminders fire whether an actor is active or inactive. If fired for an inactive actor, it activates the actor first.
19
19
- Actor timers firing reset the idle time; however, timers only fire while the actor is active.
20
20
@@ -101,4 +101,4 @@ The following example illustrates the above concepts. Consider an actor type tha
101
101
102
102
-[Actors API reference]({{% ref actors_api %}})
103
103
-[Actors overview]({{% ref actors-overview %}})
104
-
-[How to: Use virtual actors in Dapr]({{% ref howto-actors %}})
104
+
-[How to: Use virtual actors in Dapr]({{% ref howto-actors %}})
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/building-blocks/actors/actors-runtime-config.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ weight: 30
6
6
description: Modify the default Dapr actor runtime configuration behavior
7
7
---
8
8
9
-
You can modify the default Dapr actor runtime behavior using the following configuration parameters.
9
+
You can modify the default Dapr actor runtime behavior using the following configuration parameters.
10
10
11
11
| Parameter | Description | Default |
12
12
| --------- | ----------- | ------- |
@@ -16,7 +16,6 @@ You can modify the default Dapr actor runtime behavior using the following confi
16
16
|`drainOngoingCallTimeout`| The duration when in the process of draining rebalanced actors. This specifies the timeout for the current active actor method to finish. If there is no current actor method call, this is ignored. | 60 seconds |
17
17
|`drainRebalancedActors`| If true, Dapr will wait for `drainOngoingCallTimeout` duration to allow a current actor call to complete before trying to deactivate an actor. | true |
18
18
|`reentrancy` (`ActorReentrancyConfig`) | Configure the reentrancy behavior for an actor. If not provided, reentrancy is disabled. | disabled, false |
19
-
|`remindersStoragePartitions`| Configure the number of partitions for actor's reminders. If not provided, all reminders are saved as a single record in actor's state store. | 0 |
20
19
|`entitiesConfig`| Configure each actor type individually with an array of configurations. Any entity specified in the individual entity configurations must also be specified in the top level `entities` field. | N/A |
21
20
22
21
## Examples
@@ -39,7 +38,6 @@ public void ConfigureServices(IServiceCollection services)
Copy file name to clipboardExpand all lines: daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md
+2-38Lines changed: 2 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ aliases:
10
10
11
11
Actors can schedule periodic work on themselves by registering either timers or reminders.
12
12
13
-
The functionality of timers and reminders is very similar. The main difference is that Dapr actor runtime is not retaining any information about timers after deactivation, while persisting the information about reminders using Dapr actor state provider.
13
+
The functionality of timers and reminders is very similar. The main difference is that Dapr actor runtime is not retaining any information about timers after deactivation, while persisting the information about reminders using Dapr [Scheduler]({{% ref scheduler.md %}}).
14
14
15
15
This distinction allows users to trade off between light-weight but stateless timers vs. more resource-demanding but stateful reminders.
16
16
@@ -108,10 +108,6 @@ Refer [api spec]({{% ref "actors_api#invoke-timer" %}}) for more details.
108
108
109
109
## Actor reminders
110
110
111
-
{{% alert title="Note" color="primary" %}}
112
-
In Dapr v1.15, actor reminders are stored by default in the [Scheduler service]({{% ref "scheduler#actor-reminders" %}}). When upgrading to Dapr v1.15 all existing reminders are automatically migrated to the Scheduler service with no loss of reminders as a one time operation for each actor type.
113
-
{{% /alert %}}
114
-
115
111
Reminders are a mechanism to trigger *persistent* callbacks on an actor at specified times. Their functionality is similar to timers. But unlike timers, reminders are triggered under all circumstances until the actor explicitly unregisters them or the actor is explicitly deleted or the number in invocations is exhausted. Specifically, reminders are triggered across actor deactivations and failovers because the Dapr actor runtime persists the information about the actors' reminders using Dapr actor state provider.
116
112
117
113
You can create a persistent reminder for an actor by calling the HTTP/gRPC request to Dapr as shown below, or via Dapr SDK.
@@ -146,7 +142,7 @@ Refer [api spec]({{% ref "actors_api#invoke-reminder" %}}) for more details.
146
142
147
143
## Error handling
148
144
149
-
When an actor's method completes successfully, the runtime will continue to invoke the method at the specified timer or reminder schedule. However, if the method throws an exception, the runtime catches it and logs the error message in the Dapr sidecar logs, without retrying.
145
+
When an actor's method completes successfully, the runtime will continue to invoke the method at the specified timer or reminder schedule. However, if the method throws an exception, the runtime catches it and logs the error message in the Dapr sidecar logs, without retrying.
150
146
151
147
To allow actors to recover from failures and retry after a crash or restart, you can persist an actor's state by configuring a state store, like Redis or Azure Cosmos DB.
152
148
@@ -155,38 +151,6 @@ If an invocation of the method fails, the timer is not removed. Timers are only
155
151
- The executions run out
156
152
- You delete it explicitly
157
153
158
-
## Reminder data serialization format
159
-
160
-
Actor reminder data is serialized to JSON by default. Dapr v1.13 onwards supports a protobuf serialization format for internal reminders data for workflow via both the Placement and Scheduler services. Depending on throughput and size of the payload, this can result in significant performance improvements, giving developers a higher throughput and lower latency.
161
-
162
-
Another benefit is storing smaller data in the actor underlying database, which can result in cost optimizations when using some cloud databases. A restriction with using protobuf serialization is that the reminder data can no longer be queried.
163
-
164
-
{{% alert title="Note" color="primary" %}}
165
-
Protobuf serialization will become the default format in Dapr 1.14
166
-
{{% /alert %}}
167
-
168
-
Reminder data saved in protobuf format cannot be read in Dapr 1.12.x and earlier versions. Its recommended to test this feature in Dapr v1.13 and verify that it works as expected with your database before taking this into production.
169
-
170
-
{{% alert title="Note" color="primary" %}}
171
-
If you use protobuf serialization in Dapr v1.13 and need to downgrade to an earlier Dapr version, the reminder data will be incompatible with versions 1.12.x and earlier versions. **Once you save your reminders data in protobuf format, you cannot move it back to JSON format**.
172
-
{{% /alert %}}
173
-
174
-
### Enabling protobuf serialization on Kubernetes
175
-
176
-
To use protobuf serialization for actor reminders on Kubernetes, use the following Helm value:
177
-
178
-
```
179
-
--set dapr_placement.maxActorApiLevel=20
180
-
```
181
-
182
-
### Enabling protobuf serialization on self-hosted
183
-
184
-
To use protobuf serialization for actor reminders on self-hosted, use the following `daprd` flag:
0 commit comments