Skip to main content

Overview

CloudBase cloud functions is a serverless computing service provided by CloudBase, allowing you to run backend code without managing servers.

Cloud Functions run on a Serverless platform. You only need to write code using the supported languages (Python, Node.js, PHP, Golang, Java, etc.). CloudBase will fully manage the underlying computing resources, and CloudBase will automatically handle the management and maintenance of the underlying infrastructure.

If you are using Cloud Functions for the first time, it is recommended to read the Quick Start document to quickly experience the basic features of Cloud Functions.

CloudBase also provides the Function Cloud Hosting service, which offers enhanced performance and richer features. You can choose the appropriate service based on your actual needs.

What Is a Cloud Function

Cloud Functions is an event-driven computing service that allows you to:

  • Focus on Business Logic: Only need to write core business code without worrying about server configuration, maintenance, and scaling
  • Execute on Demand: Functions run only when invoked, incurring no fees when no resources are consumed
  • Automatic Scaling: Automatically adjusts computing resources based on request volume, scaling from zero to tens of millions of concurrency
  • Multiple Trigger Sources: Supports various triggering methods such as SDK calls, HTTP requests, timers, and more

Function Types

CloudBase provides two types of cloud functions to meet the needs of different scenarios:

Event Function (Event Function)

  • Applicable Scenarios: Data processing, scheduled tasks, API interfaces, etc.
  • Invocation Methods: SDK calls, HTTP requests, timer triggers
  • Features: Simple and easy to use, focusing on business logic processing

Web Cloud Function (Web Function)

  • Applicable Scenarios: Web applications, SSE real-time communication, file upload and download, etc.
  • Invocation Methods: Directly handles HTTP requests
  • Features: Supports Express.js and Koa.js frameworks, providing full HTTP service capabilities

To learn more about Web Cloud Function, please refer to Web Cloud Function (Web Function)

For a comparison of the two cloud function types, please refer to Cloud Function Type Selection

Core Advantages

🌐 Multi-platform Access

  • Supports SDK calls for Web, Mini Program, Node.js, and more
  • Provides HTTP interfaces and supports access from any client
  • Seamlessly integrates with other CloudBase services, requiring no keys for internal calls

🚀 Zero Ops

  • No server management, automatically handles infrastructure
  • Built-in load balancing and failover
  • Supports multiple runtimes: Node.js, Python, Java, Go, PHP

📈 Auto-scaling

  • Millisecond-level cold start, rapidly responds to requests
  • Auto-scaling, supports up to 1000 concurrent connections
  • Billed based on actual usage, zero cost when idle

🔧 Developer Convenience

Use Cases

  • API Services: Build RESTful API and GraphQL services
  • Data Processing: File processing, data transformation, image processing, etc.
  • Scheduled Tasks: Data synchronization, report generation, cleanup tasks, etc.
  • Event Processing: Message queue processing, Webhook responses, etc.
  • Web Applications: SSR rendering, real-time communication, file upload, etc.