Skip to content

Clarify which instance runs scheduled events when scaling to multiple instances - #11749

Open
Yornik wants to merge 3 commits into
mendix:developmentfrom
Yornik:docs-scheduled-events-multi-instance
Open

Clarify which instance runs scheduled events when scaling to multiple instances#11749
Yornik wants to merge 3 commits into
mendix:developmentfrom
Yornik:docs-scheduled-events-multi-instance

Conversation

@Yornik

@Yornik Yornik commented Aug 17, 2026

Copy link
Copy Markdown
Member

The alert in the Introduction of Scaling Your Environment in Mendix Cloud described only the behavior for versions below Mendix 9.12.0:

For versions below Mendix 9.12.0, scheduled events are always run on the first instance if there are multiple instances.

This leaves the behavior on currently supported versions undefined. A reader who scales to two instances and then sees uneven CPU usage between them cannot tell from this page which instance runs scheduled events, or whether the imbalance is expected.

Changes

  1. Alert now states the current behavior, then keeps the historical note. The wording for the current behavior is reused verbatim from Clustered Mendix Runtime so the two pages agree:

    legacy scheduled events are only executed on the cluster leader; task queue based scheduled events are executed on an arbitrary cluster node

  2. Scaling Notes gains one bullet explaining that the cluster leader can use more CPU than other instances, because it also handles cluster management activities. This sits next to the existing task queue scope note, where per-instance scaling behavior is already covered.

Style notes

  • The alert stays at one paragraph with no list, per the alert guidance in style-guide/grammar-formatting.md ("keep alerts short (1-2 paragraphs)" and avoid lists in alerts). That is why the CPU point went into Scaling Notes rather than expanding the alert.
  • task queue based is left unhyphenated to match the existing wording in Clustered Mendix Runtime.
  • Both link targets and the #cluster-leader-follower anchor were verified to resolve; that anchor form is already used in custom-settings/_index.md and the Azure HA page.

For reviewers

The second bullet in Scaling Notes is the one addition that is not lifted directly from existing docs. It is a consequence of the cluster leader duties already documented in Clustered Mendix Runtime, and it is included because per-instance CPU differences are a recurring support question. Happy to drop it if you would rather keep this change purely to the alert.

🤖 Generated with Claude Code

Yornik and others added 2 commits August 17, 2026 11:11
The note on this page only described behavior for versions below Mendix
9.12.0, which left the current behavior undefined. Readers scaling to
multiple instances could not tell from this page which instance runs
scheduled events on a supported version.

State the current behavior explicitly, distinguishing legacy scheduled
events (cluster leader only) from task queue based scheduled events
(arbitrary instance), matching the wording already used in Clustered
Mendix Runtime. Also note that the cluster leader can show higher CPU
usage as a result, since this is a common source of confusion when
looking at per-instance metrics. The pre-9.12.0 note is kept.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Restructure the previous commit to follow the repository style guide.
The guidance in the style guide is to keep alerts to 1-2 paragraphs and
to avoid lists inside alerts, so the alert is reduced to a single
paragraph with no list.

Move the point about cluster leader CPU usage out of the alert and into
Scaling Notes, next to the existing note about task queue scope, which
is where per-instance scaling behavior is already described.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* The number of available instances depends on the total memory provided by your cloud resource pack and the memory per instance that you have set. It is not possible to set scaling values that exceed the memory provided by your [cloud resource pack](/developerportal/deploy/mendix-cloud-deploy/#resource-pack).
* It is not possible for a single instance to use more than 32 GiB of RAM. Some very large cloud resource packs, such as XXXL21 or XXXXL21, provide more than this 32 GiB maximum; to use the full RAM in this case, you need more than one instance. For example, to use 64 GiB of RAM, you must spread the RAM between two or more instances.
* Consider the functionality that runs inside task queues; think about whether the scope of these task queues should be configured to run in all instances or once per cluster. It is possible to set the [scope of the threads](/refguide/task-queue/#create-queue) per task queue.
* In addition to handling requests, the [cluster leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower) performs cluster management activities such as removing persisted sessions and cleaning up unreferenced files. It can therefore use more CPU than the other instances, even when incoming traffic is distributed evenly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cluster management activities are run on every node. So this being the sole reason for the increased CPU would be incorrect.

Were you able to verify this statement ?

Review feedback: cluster management activities are picked up by any node
in a multi-node environment, not only by the cluster leader, so citing
them as the reason for higher CPU on one instance was incorrect.

Reword the note to reference legacy scheduled events, which Clustered
Mendix Runtime states are executed only on the cluster leader. Phrase it
as one example rather than the sole cause.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@akkrishnakumar

Copy link
Copy Markdown
Contributor

Alert now states the current behavior, then keeps the historical note. The wording for the current behavior is reused verbatim from Clustered Mendix Runtime so the two pages agree:

Why do this ? You can modify it a little and say that the legacy schedule event where executed on the leader node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants