tencent cloud

Serverless Cloud Function

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Related Concepts
How It Works
Strengths
Scenarios
Related Products
Purchase Guide
Billing Overview
Billing Mode
Billable Items and Billing Modes
Function Computing Power Support
Free Tier
SCF Pricing
Billing Example
Payment Overdue
Getting Started
Creating Event Function in Console
User Guide
Quota Management
Managing Functions
Web Function Management
Log Management
Concurrence Management
Trigger Management
Function URL
A Custom Domain Name
Version Management
Alias Management
Permission Management
Running Instance Management
Plugin Management
Managing Monitors and Alarms
Network Configuration
Layer Management
Execution Configuration
Extended Storage Management
DNS Caching Configuration
Resource Managed Mode Management
Near-Offline Resource Hosting Model
Workflow
Triggers
Trigger Overview
Trigger Event Message Structure Summary
API Gateway Trigger
COS Trigger
CLS Trigger
Timer Trigger
CKafka Trigger
Apache Kafka Trigger
MQTT Trigger
Trigger Configuration Description
MPS Trigger
CLB Trigger Description
TencentCloud API Trigger
Development Guide
Basic Concepts
Testing a Function
Environment Variables
Dependency Installation
Using Container Image
Error Types and Retry Policies
Dead Letter Queue
Connecting SCF to Database
Automated Deployment
Cloud Function Status Code
Common Errors and Solutions
Developer Tools
Serverless Web IDE
Calling SDK Across Functions
Third-Party Tools
Code Development
Python
Node.js
Golang
PHP
Java
Custom Runtime
Deploying Image as Function
Web Framework Development
Deploying Framework on Command Line
Quickly Deploying Egg Framework
Quickly Deploying Express Framework
Quickly Deploying Flask Framework
Quickly Deploying Koa Framework
Quickly Deploying Laravel Framework
Quickly Deploying Nest.js Framework
Quickly Deploying Next.js Framework
Quickly Deploying Nuxt.js Framework
Quickly Deploying Django Framework
Use Cases
Overview
Solutions with Tencent Cloud Services
Business Development
TRTC Practices
COS Practices
CKafka Practice
CLS
CLB Practice
MPS
CDN
CDWPG
VOD
SMS
ES
Scheduled Task
Video Processing
Success Stories
Tencent Online Education
Online Video Industry
Tencent Online Education
Best Practice of Tencent IEG Going Global
API Documentation
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
SDK Documentation
FAQs
General
Web Function
Billing FAQs
Network FAQs
Log FAQs
SCF utility class
Event Handling FAQs
API Gateway Trigger FAQs
Related Agreement
Service Level Agreement
Contact Us
Glossary

Web Function

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-12-02 16:29:12

What are the differences between web function and event function?

As a new function type, web function can be directly triggered by HTTP requests, breaking through the limit of JSON event format required by the current event function type. It has more flexible application scenarios and delivers a development experience much similar to that of native web services.

What are the use cases of web function?

Web function focuses on optimization of web service scenarios and can directly send HTTP requests to URLs to trigger function execution. You can use SCF to develop web services or quickly migrate your local web framework to Tencent Cloud.

How is web function billed?

As a new type of SCF function, web function is billed in the same way as event function. Both of them are billed by the number of invocations, resource usage, and public network outbound traffic. For more information, please see Billing Overview.

What is a bootstrap file? How do I write it?

A web function runs in the image environment built in it based on the standard programming language. You must create an executable file scf_bootstrap to start your web server, and then package the file with your code files for deployment to create a web function. During actual request processing, your scf_bootstrap file will start the service first, after which your web server will receive all HTTP requests by listening on the specified 9000 port, forward them to the backend service for logic processing, and return the responses to end users.

Can I simulate the cloud environment during local development?

Currently, the standard SCF runtime environment image has been opened up. For directions on how to use it, please see Using Container Image. You can select an appropriate image tag for local development and testing based on your actual development scenario. Before deploying a web function, please make sure that your project can be normally started in the local image.

Why don't some header requests work?

When an HTTP request is sent, certain header fields will be entered automatically by API Gateway and cannot be customized, because information exchange between the function and gateway has certain requirements and capability limits. Such fields mainly include the following:
connection field
Custom fields starting with X-SCF-

How do I quickly troubleshoot function execution failures?

You can quickly identify the cause of failure and find the solution based on the returned error code.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan