Skip to content
onteon logo


Manages scaling of applications. Distribution is responsible for creating and removing application instances. It is identified by id.



  Distribution id.


  Id of application that will be managed by the distribution.


  Number of application-instances that need to be running.


  Id of script that checks if node can accept new application-instances. If the value is null, node's script or default script will be used.


  Id of script that selects node for new application-instance. If the value is null, the default script will be used.


  Id of script that selects node that will have the application-instance removed. If the value is null, the default script will be used.


Distribution is highly recommended for production environment. It can automatically handle amount of instances that can be changed at any moment.

There is a few options to create distribution

Create distribution using CLI

onteoncli distribution create --application-id=<application-id> --number-of-instances=<number-of-application-instances>

Create distribution using CLI - with distribution file.

First, you need to create yaml file that describes distribution. Example file:

application: <application-id>
numberOfInstances: <number-of-application-instances>
type: <type>
  checkIfNodeCanAcceptNewApplicationInstance: <name-of-script OPTIONAL>
  selectNodeForNewApplicationInstance: <name-of-script OPTIONAL>
  selectApplicationInstanceToRemove: <name-of-script OPTIONAL>

Then, execute command:

 onteoncli distribution create-from-file <distribution-file>

Create distribution using http API

If you want to create distribution via http api, you can send POST request to /onteon-api-access/api/distributions. For more information, click here.

Modifying distribution

You can always modify you distribution. E.q. you can easily change the number of instances by executing onteoncli distribution set-number-of-instances <id> <newNumberOfInstances>. Environment will be updated during the next rescheduling. You can set when the rescheduling job should start here, by specifying cron expression.

Distributing instances

Scripts are used to decide where specific application instance should be located or which one should be removed. If you do not specify scripts, the distribution will use the default scripts.

Read more

CLI Commands


Your data will be processed by Onteon Tech Sp. z o.o. based in Krakow, Poland. We process your data for the following purposes: To answer questions emailed to us (only until the question is answered or you tell us to end processing your data) and secure potential claims (until they are time-barred under the law). Providing data processing consent is voluntary but, without it, we cannot give you an answer to the question you asked in your email. The data may be disclosed to entities that provide us with services (e.g., our hosting provider or our IT support company). You have the right to request access to your personal data, corrections, deletion, or the restriction of processing, as well as the right to object to processing and to lodge a complaint with a supervising authority.