Updated on 2024-04-01 GMT+08:00

Solution Overview

Scenarios

This solution uses a FunctionGraph timer trigger to periodically start and stop Elastic Cloud Servers (ECSs). You can stop unused ECSs, and later start them when needed to reduce operations costs.

Solution Architecture

This solution uses Huawei Cloud FunctionGraph to periodically start and stop ECSs. This solution architecture is illustrated below.

Figure 1 Architecture

This solution will:

  • Create two functions in FunctionGraph to call the ECS APIs for periodically starting and stopping ECSs.
  • Create a timer to periodically invoke the function code.
  • Create an agency in IAM to delegate FunctionGraph to access ECS in the relevant region.

Advantages

This solution has the following advantages:

  • Serverless

    The serverless architecture frees you from underlying resource O&M and availability and scalability issues.

  • Easy deployment

    You can schedule ECS startup and shutdown in just a few clicks.

  • Customization based on open source

    This solution is open-source and free for commercial use. You can also make custom development according to the practical requirements.

Constraints

  • Before deploying this solution, ensure that you have an account with access to the target region and sufficient balance for purchasing the resources listed in Resource and Cost Planning.