All Products
Search
Document Center

CloudFlow:What is Serverless Workflow?

Last Updated:Oct 30, 2023

Serverless workflow is a fully managed cloud service that coordinates distributed tasks.

In Serverless workflow, you can orchestrate distributed tasks in sequence, in branches, or in parallel. Based on the defined steps, Serverless workflow reliably coordinates task executions, tracks the state transition of each task, and executes the user-defined retry logic when necessary to ensure the smooth completion of your flow. Serverless workflow provides the logging and auditing features to monitor flow executions, allowing you to diagnose and debug applications. Serverless workflow simplifies complex tasks such as task coordination, state management, and error handling required for application development and execution of business flows. In this way, developers can focus on business logic development.

The following figure illustrates how Serverless workflow coordinates distributed tasks, which can be functions, integrated cloud service APIs, and programs that run on virtual machines (VMs) or containers.

swf_product1

Benefits

  • Coordination of distributed components

    Serverless workflow can orchestrate applications that are developed in different architectures, different networks, and different languages. It can also eliminate the gaps in the transition from Apsara Stack to the hybrid cloud (Apsara Stack and Alibaba Cloud) or Alibaba Cloud, or from a monolithic architecture to a microservices architecture.

  • Less flow code

    Serverless workflow provides rich control logic such as sequence, choice, and parallelism, so that you can implement complex business logic with less code.

  • Improved fault tolerance of applications

    Serverless workflow manages flow states and provides built-in checkpoints and playback capabilities to ensure that your application is executed step by step as expected. Error retries and catch allow you to handle errors flexibly.

  • Serverless

    When you use Serverless workflow, you are charged based on the number of step transitions required to execute your application. After the execution, you will not be charged. Serverless workflow supports automatic scaling and therefore frees you from managing hardware budgets and extensions.

Features

  • Service orchestration capabilities

    Serverless workflow can separate flow logic from task execution and save you time in writing and orchestrating code. For example, after you call a face recognition function to detect the face in an image, the image is cropped based on the face position, and a message is sent to notify the user at last. Serverless workflow provides a serverless solution to reduce your orchestration and O&M costs.

  • Coordination of distributed components

    Serverless workflow can coordinate applications that are developed in different languages, different architectures, and different networks. Serverless workflow serves as a coordinator when applications transit from Apsara Stack to the hybrid cloud (Apsara Stack and Alibaba Cloud) or Alibaba Cloud or evolve from a monolithic architecture to a microservices architecture.

  • Built-in error handling

    By using built-in error retry and catch capabilities, you can automatically retry tasks that failed or timed out, respond differently to different types of errors, and define fallback logic.

  • Visual monitoring

    Serverless workflow provides visual interfaces for you to define flows and view the execution status. The state includes input and output. This allows you to identify and troubleshoot problems.

  • Support for long-running flows

    Serverless workflow can track the entire flow and allow long-time flow execution to ensure the completion of the flow. Some flows may take several hours, days, or even months, for example, O&M-related pipelines and email promotion flows.

  • Flow state management

    Serverless workflow manages all states in a flow execution, including tracking its execution steps and the data transfer between steps. You do not need to manage the flow states yourself or build complex state management into tasks.