Skip to main content

Function Type

CloudBase Cloud Function provides two types to meet different scenario needs:

Function TypeRegular Cloud FunctionHTTP Cloud Function
Applicable ScenariosData Processing, Scheduled Tasks, API InterfacesWeb Applications, Websocket Applications, SSE Real-time Communication, File Upload and Download
Invocation MethodSDK invocation, HTTP request, timer triggerDirect handling of HTTP requests
Framework SupportNo specific framework requirementsSupports Express.js, Koa.js, and other Web frameworks
FeaturesSimple and easy to use, focuses on business logic processingHas complete HTTP service capabilities

Regular Function (Custom Function)

It is suitable for handling event-driven business logic, such as data processing, scheduled tasks, and other scenarios.

Key Features:

  • Focus on business logic without needing to worry about HTTP protocol details.
  • Supports multiple trigger methods (SDK, HTTP, timer)
  • Simple input and return value formats

HTTP cloud function (HTTP Function)

Suitable for building complete Web applications and API services.

Key Features:

  • Complete HTTP request/response handling capabilities
  • Supports mainstream Web frameworks (Express.js, Koa.js)
  • Supports real-time communication such as SSE, WebSocket, etc.

Learn More: