Function Type
CloudBase Cloud Function provides two types to meet different scenario needs:
| Function Type | Regular Cloud Function | HTTP Cloud Function |
|---|---|---|
| Applicable Scenarios | Data Processing, Scheduled Tasks, API Interfaces | Web Applications, Websocket Applications, SSE Real-time Communication, File Upload and Download |
| Invocation Method | SDK invocation, HTTP request, timer trigger | Direct handling of HTTP requests |
| Framework Support | No specific framework requirements | Supports Express.js, Koa.js, and other Web frameworks |
| Features | Simple and easy to use, focuses on business logic processing | Has 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: