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.
- 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.
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:
- 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.
- On the Configure Component page:
- Configure the scheduling policy for the application component instance based on the following table.
Purpose
Procedure
Setting application component-AZ affinity
- Click Add Affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-AZ anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-node affinity
- Click Add Affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-node non-affinity
- Click Add Anti-affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-application component affinity
- Click Add Affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on the same node.
Setting application component-application component anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on different nodes.
- Click Next to complete the component deployment.
- Configure the scheduling policy for the application component instance based on the following table.
- Log in to ServiceStage and choose Application Management > Application List to view all applications.
- Click an application. The Overview page is displayed.
- On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
- Click an application component. The Overview page is displayed.
- Choose Scheduling Policy and set the following parameters:
Purpose
Procedure
Setting application component-AZ affinity
- Click Add Affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-AZ anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-node affinity
- Click Add Affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-node non-affinity
- Click Add Anti-affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-application component affinity
- Click Add Affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on the same node.
Setting application component-application component anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on different nodes.
- Click Re-deployment to complete the setting.
For other types of components, perform the following operations:
- 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.
- Log in to ServiceStage and choose Application Management > Application List to view all applications.
- Click an application. The Overview page is displayed.
- On the Environment View tab, select an environment to view the application components that have been deployed in the environment.
- Click an application component. The Overview page is displayed. Choose Upgrade.
- Choose Advanced Settings > Deployment Configuration and set the following parameters on the Scheduling Policy tab.
Purpose
Procedure
Setting application component-AZ affinity
- Click Add Affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-AZ anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to AZ, and select the desired AZ.
- Click OK.
Setting application component-node affinity
- Click Add Affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-node non-affinity
- Click Add Anti-affinity Object.
- Set the object type to Node, and select the desired node.
- Click OK.
Setting application component-application component affinity
- Click Add Affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on the same node.
Setting application component-application component anti-affinity
- Click Add Anti-affinity Object.
- Set the object type to Component, and select the desired application components.
- Click OK.
The selected application components are deployed on different nodes.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot