Skip to content

Commit

Permalink
Add reminders protobuf section (dapr#4058)
Browse files Browse the repository at this point in the history
* Add reminders protobuf section

Signed-off-by: yaron2 <schneider.yaron@live.com>

* Update daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Yaron Schneider <schneider.yaron@live.com>

* Update daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Yaron Schneider <schneider.yaron@live.com>

* Update daprdocs/content/en/developing-applications/building-blocks/actors/actors-timers-reminders.md

Co-authored-by: Mark Fussell <markfussell@gmail.com>
Signed-off-by: Yaron Schneider <schneider.yaron@live.com>

* Update actors-timers-reminders.md

* Update actors-timers-reminders.md

typo

---------

Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Mark Fussell <markfussell@gmail.com>
  • Loading branch information
yaron2 and msfussell authored Mar 1, 2024
1 parent 658f3a3 commit 0122d1f
Showing 1 changed file with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,41 @@ If an invocation of the method fails, the timer is not removed. Timers are only
- The executions run out
- You delete it explicitly

## Reminder data serialization format

Actor reminder data is serialized to JSON by default. Dapr v1.13 onwards supports a protobuf serialization format for reminders data which, depending on throughput and size of the payload, can result in significant performance improvements, giving developers a higher throughput and lower latency. 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.

{{% alert title="Note" color="primary" %}}
Protobuf serialization will become the default format in Dapr 1.14
{{% /alert %}}

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.

{{% alert title="Note" color="primary" %}}
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**.
{{% /alert %}}

### Enabling protobuf serialization on Kubernetes

To use protobuf serialization for actor reminders on Kubernetes, use the following Helm value:

```
--set dapr_placement.maxActorApiLevel=20
```

### Enabling protobuf serialization on self-hosted

To use protobuf serialization for actor reminders on self-hosted, use the following `daprd` flag:

```
--max-api-level=20
```

## Next steps

{{< button text="Configure actor runtime behavior >>" page="actors-runtime-config.md" >}}

## Related links

- [Actors API reference]({{< ref actors_api.md >}})
- [Actors overview]({{< ref actors-overview.md >}})
- [Actors overview]({{< ref actors-overview.md >}})

0 comments on commit 0122d1f

Please sign in to comment.