Help Center/ ServiceStage/ User Guide (ME-Abu Dhabi Region)/ User Guide/ Application O&M/ Configuring a Scheduling Policy of an Application Component Instance
Updated on 2023-06-25 GMT+08:00

Configuring a Scheduling Policy of an Application Component Instance

ServiceStage provides a variety of scheduling policies, including static global scheduling policies and dynamic runtime scheduling policies. You can select or combine these policies as required.

Concepts

  • Application-AZ Affinity and Anti-Affinity
    • Affinity with AZs: Application components can be deployed in specific AZs.
    • Non-affinity with AZs: Application components cannot be deployed in specific AZs.
  • Application-Node Affinity and Anti-Affinity
    • Affinity with Nodes: Application components can be deployed on specific nodes.
    • Non-affinity with Nodes: Application components cannot be deployed on specific nodes.
  • Application Affinity
    It determines whether application components are deployed on the same node or different nodes.
    • Affinity with Applications: Application components are deployed on the same node. You can deploy application components based on service requirements. The nearest route between application components is used to reduce network consumption. For example, Figure 1 shows affinity deployment, in which all applications are deployed on the same node.
      Figure 1 Application affinity
    • Anti-affinity with Applications: Different applications or multiple instances of the same application component are deployed on different nodes. Anti-affinity deployment for multiple instances of the same application reduces the impact of system breakdowns. Anti-affinity deployment for applications can prevent interference between the applications.
      As shown in Figure 2, four applications are deployed on four different nodes. The four applications are deployed in anti-affinity mode.
      Figure 2 Application anti-affinity

Precautions

When setting application component-node affinity and application component-application component affinity, ensure that the affinity relationships are not mutually exclusive; otherwise, application deployment will fail. For example, application deployment will fail when the following conditions are met:

  • Anti-affinity is configured for two application components APP 1 and APP 2. For example, APP 1 is deployed on node A and APP 2 is deployed on node B.
  • When APP 3 is deployed on node C and goes online, affinity is configured between APP 3 and APP 2. As a result, affinity relationships are mutually exclusive, and APP 3 fails to be deployed.

Procedure

When the component type is Common and the runtime system is Docker, perform the following operations:

  1. Access the page for setting a scheduling policy of an application component instance.

    • To set a scheduling policy during component configuration in the application component deployment, go to 2.
    • To set a scheduling policy after an application component is deployed, go to 3.

  2. On the Configure Component page:

    1. Configure the scheduling policy for the application component instance based on the following table.

      Purpose

      Procedure

      Setting application component-AZ affinity

      1. Click Add Affinity Object.
      2. Set the object type to AZ, and select the desired AZ.
      3. Click OK.

      Setting application component-AZ anti-affinity

      1. Click Add Anti-affinity Object.
      2. Set the object type to AZ, and select the desired AZ.
      3. Click OK.

      Setting application component-node affinity

      1. Click Add Affinity Object.
      2. Set the object type to Node, and select the desired node.
      3. Click OK.

      Setting application component-node non-affinity

      1. Click Add Anti-affinity Object.
      2. Set the object type to Node, and select the desired node.
      3. Click OK.

      Setting application component-application component affinity

      1. Click Add Affinity Object.
      2. Set the object type to Component, and select the desired application components.
      3. Click OK.

        The selected application components are deployed on the same node.

      Setting application component-application component anti-affinity

      1. Click Add Anti-affinity Object.
      2. Set the object type to Component, and select the desired application components.
      3. Click OK.

        The selected application components are deployed on different nodes.

    2. Click Next to complete the component deployment.

  3. Log in to ServiceStage and choose Application Management > Application List to view all applications.
  4. Click an application. The Overview page is displayed.
  5. On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
  6. Click an application component. The Overview page is displayed.
  7. Choose Scheduling Policy and set the following parameters:

    Purpose

    Procedure

    Setting application component-AZ affinity

    1. Click Add Affinity Object.
    2. Set the object type to AZ, and select the desired AZ.
    3. Click OK.

    Setting application component-AZ anti-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to AZ, and select the desired AZ.
    3. Click OK.

    Setting application component-node affinity

    1. Click Add Affinity Object.
    2. Set the object type to Node, and select the desired node.
    3. Click OK.

    Setting application component-node non-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to Node, and select the desired node.
    3. Click OK.

    Setting application component-application component affinity

    1. Click Add Affinity Object.
    2. Set the object type to Component, and select the desired application components.
    3. Click OK.

      The selected application components are deployed on the same node.

    Setting application component-application component anti-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to Component, and select the desired application components.
    3. Click OK.

      The selected application components are deployed on different nodes.

  8. Click Re-deployment to complete the setting.

For other types of components, perform the following operations:

  1. Access the page for setting a scheduling policy of an application component instance.

    • To set a scheduling policy during component configuration in the application component deployment, go to 6.
    • To set a scheduling policy after an application component is deployed, go to 2.

  2. Log in to ServiceStage and choose Application Management > Application List to view all applications.
  3. Click an application. The Overview page is displayed.
  4. On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
  5. Click an application component. The Overview page is displayed. Choose Upgrade.
  6. Choose Advanced Settings > Deployment Configuration and set the following parameters on the Scheduling Policy tab.

    Purpose

    Procedure

    Setting application component-AZ affinity

    1. Click Add Affinity Object.
    2. Set the object type to AZ, and select the desired AZ.
    3. Click OK.

    Setting application component-AZ anti-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to AZ, and select the desired AZ.
    3. Click OK.

    Setting application component-node affinity

    1. Click Add Affinity Object.
    2. Set the object type to Node, and select the desired node.
    3. Click OK.

    Setting application component-node non-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to Node, and select the desired node.
    3. Click OK.

    Setting application component-application component affinity

    1. Click Add Affinity Object.
    2. Set the object type to Component, and select the desired application components.
    3. Click OK.

      The selected application components are deployed on the same node.

    Setting application component-application component anti-affinity

    1. Click Add Anti-affinity Object.
    2. Set the object type to Component, and select the desired application components.
    3. Click OK.

      The selected application components are deployed on different nodes.

  7. Complete the settings of the scheduling policy.

    • If the scheduling policy is set during component configuration, click Next.
    • If the scheduling policy is set after the application component is deployed, click Re-deployment.