Skip to content
This repository was archived by the owner on Jun 1, 2021. It is now read-only.
This repository was archived by the owner on Jun 1, 2021. It is now read-only.

Adapt replication batch size dynamically #398

@volkerstampa

Description

@volkerstampa

Currently the number of events that are replicated through a single akka-message is fix (eventuate.log.write-batch-size) (if enough events wait for replication). If the binary representation of the resulting message exceeds the akka-remote frame size (akka.remote.netty.tcp.maximum-frame-size) the message is dropped at the source and the replication essentially stops as each retry results in the same error. A problem like this can only be fixed by re-configuring ether eventuate.log.write-batch-size or akka.remote.netty.tcp.maximum-frame-size and restarting the application (or at least the actor-system).

To avoid a restart in these situations eventuate could either adapt the replication batch size dynamically (for example if n (n>=1) replication requests did not receive a response, the batch size is reduced incrementally by factor f1 (f < 1) until a replication response is received. After that the batch-size can be increased again either incrementally (by factor f2) or at once to its original size.
Alternatively the batch-size is no longer measured in number of events but rather in number of bytes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions