From 8faf2bfa5f00002a5803b7be85b9ad57ff5d507b Mon Sep 17 00:00:00 2001 From: Yornik Heyl Date: Mon, 17 Aug 2026 11:11:00 +0200 Subject: [PATCH 1/3] Clarify scheduled event distribution across multiple instances 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) --- .../deployment/mendix-cloud-deploy/scale-environment.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md index 1fb83afbeb0..698341d6106 100644 --- a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md +++ b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md @@ -15,7 +15,14 @@ This document explains how to scale an environment in Mendix Cloud. This can tak * Horizontal scaling – You can configure apps built using supported versions of Mendix to be run in multiple runtime containers (instances) simultaneously. Incoming traffic for your app is distributed over the running instances. {{% alert color="info" %}} -For versions below Mendix 9.12.0, [scheduled events](/refguide/scheduled-events/) are always run on the first instance if there are multiple instances. +When your app runs on multiple instances, [scheduled events](/refguide/scheduled-events/) are not distributed evenly over those instances: + +* Legacy scheduled events are only executed on the [cluster leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower). +* Task queue based scheduled events are executed on an arbitrary instance. + +The cluster leader also performs other cluster management activities, such as removing persisted sessions and cleaning up unreferenced files. Because of this, the cluster leader can show noticeably higher CPU usage than the other instances. This is expected behavior and does not indicate a problem with the distribution of incoming traffic. + +For versions below Mendix 9.12.0, all scheduled events are always run on the first instance if there are multiple instances. {{% /alert %}} ## Prerequisites From 0cc81d5768f960eceeb2b8b8e6df02cfafeb030c Mon Sep 17 00:00:00 2001 From: Yornik Heyl Date: Mon, 17 Aug 2026 11:13:54 +0200 Subject: [PATCH 2/3] Apply style guide rules to the scheduled events note 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) --- .../mendix-cloud-deploy/scale-environment.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md index 698341d6106..06cb621b6db 100644 --- a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md +++ b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md @@ -15,14 +15,7 @@ This document explains how to scale an environment in Mendix Cloud. This can tak * Horizontal scaling – You can configure apps built using supported versions of Mendix to be run in multiple runtime containers (instances) simultaneously. Incoming traffic for your app is distributed over the running instances. {{% alert color="info" %}} -When your app runs on multiple instances, [scheduled events](/refguide/scheduled-events/) are not distributed evenly over those instances: - -* Legacy scheduled events are only executed on the [cluster leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower). -* Task queue based scheduled events are executed on an arbitrary instance. - -The cluster leader also performs other cluster management activities, such as removing persisted sessions and cleaning up unreferenced files. Because of this, the cluster leader can show noticeably higher CPU usage than the other instances. This is expected behavior and does not indicate a problem with the distribution of incoming traffic. - -For versions below Mendix 9.12.0, all scheduled events are always run on the first instance if there are multiple instances. +If there are multiple instances, legacy [scheduled events](/refguide/scheduled-events/) are only executed on the [cluster leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower), and task queue based scheduled events are executed on an arbitrary instance. For versions below Mendix 9.12.0, all scheduled events are always run on the first instance. {{% /alert %}} ## Prerequisites @@ -53,6 +46,7 @@ To scale your licensed app in Mendix Cloud, follow these steps: * 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. ## Examples From c48bedadb84f6a781ff54c57cc3c19a4414bbfc4 Mon Sep 17 00:00:00 2001 From: Yornik Heyl Date: Mon, 17 Aug 2026 13:55:45 +0200 Subject: [PATCH 3/3] Correct the cause of uneven CPU usage in the scaling note 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) --- .../en/docs/deployment/mendix-cloud-deploy/scale-environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md index 06cb621b6db..7eb496f469b 100644 --- a/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md +++ b/content/en/docs/deployment/mendix-cloud-deploy/scale-environment.md @@ -46,7 +46,7 @@ To scale your licensed app in Mendix Cloud, follow these steps: * 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. +* Instances can show different CPU usage. For example, legacy scheduled events run only on the [cluster leader](/refguide/clustered-mendix-runtime/#cluster-leader-follower), so that instance can use more CPU than the others even when incoming traffic is distributed evenly. ## Examples