Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engine can redistribute deployments when scaling up #24013

Open
2 tasks
Tracked by #21439
lenaschoenburg opened this issue Oct 24, 2024 · 1 comment
Open
2 tasks
Tracked by #21439

Engine can redistribute deployments when scaling up #24013

lenaschoenburg opened this issue Oct 24, 2024 · 1 comment
Assignees
Labels
component/zeebe Related to the Zeebe component/team kind/task Categorizes an issue as a breakdown of low-level implementation detail from a parent issue

Comments

@lenaschoenburg
Copy link
Member

lenaschoenburg commented Oct 24, 2024

When scaling up, deployments containing processes, forms and drgs need to be redistributed to new partitions.

Each deployment exists with all metadata but without the actual binary resource in the state.
When redistributing, we can iterate through all deployments and rehydrate the full deployment create record.
If a resource was deleted after the deployment, we will only redistribute the metadata but not the full binary resource.

This is compatible with resource binding in that validation only occurs on the deployment partition when the deployment is created for the first time. On redistribution, validation is skipped.

We can redistribute deployments one-by-one or in batches. Since deployments tend to be large but few, batching might not be worth it.

To decide whether new deployments created during redistribution need to be enqueued for distribution to a partition immediately or not, we keep track of the type and key of the latest redistributed resource. If not all deployments are redistributed yet, a new deployment does not need to be distributed to new partitions yet.

Tasks

Preview Give feedback
  1. 3 of 7
    component/engine component/zeebe kind/toil
    lenaschoenburg
@lenaschoenburg lenaschoenburg self-assigned this Oct 24, 2024
@lenaschoenburg lenaschoenburg added component/zeebe Related to the Zeebe component/team kind/task Categorizes an issue as a breakdown of low-level implementation detail from a parent issue labels Oct 24, 2024
@lenaschoenburg lenaschoenburg changed the title Engine can redistribute processes when scaling up Engine can redistribute deployments when scaling up Oct 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 29, 2024
This uses a common queue "DEPLOYMENT" when distributing the creation or
deletion of resources such as processes,
decisions and forms.

Closes #21357
Relates to #24013
@lenaschoenburg
Copy link
Member Author

Unfortunately this does not work out as planned because we decided a while ago to not store deployments anymore: d32354c

Instead what we'll have to do is go back to redistributing resource-by-resource again. We can still wrap them in deployment records such that we benefit from all of the resource creation logic built for that.

mo-okocha pushed a commit that referenced this issue Nov 14, 2024
This implements redistribution of deployments to all new partitions
during scaling up.
When scaling starts, it initiates redistribution. Redistribution is
organized into several stages itself, the first being deployments.
During each stage, a redistributor is asked to provide the next
redistributions. These then get enqueued for distribution to new
partitions. Once a batch of redistributions are acknowledged, the
redistributor is asked for the next ones until it returns none.
During this, the redistribution behavior keeps track of resources that
were redistributed. Notably, each redistribution may contain multiple
resources. This is because we redistribute deployments which in turn
contain many different resources.

Relates to #24013.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/zeebe Related to the Zeebe component/team kind/task Categorizes an issue as a breakdown of low-level implementation detail from a parent issue
Projects
None yet
Development

No branches or pull requests

1 participant