How API Gateway and SCF Create a Complete Serverless Solution
This article explains the core features of Tencent Cloud API Gateway, how it integrates with Serverless Cloud Functions (SCF) to provide a unified, secure, and high‑performance serverless architecture, showcases typical use cases, discusses pricing, and answers common deployment questions.
Overview
The presentation introduces Tencent Cloud API Gateway, outlines its main capabilities, and explains how deep integration with Serverless Cloud Functions (SCF) forms a complete serverless solution.
Four Main Parts
Brief introduction of the API Gateway product and its abilities.
Capabilities offered when API Gateway is combined with SCF.
Typical architecture patterns and real‑world customer cases.
Cost considerations that users often care about.
Why API Gateway Exists
Modern applications involve diverse front‑end call patterns and back‑end deployment options (physical machines, cloud VMs, containers, micro‑services, serverless). This diversity creates tight coupling between front‑end and back‑end, making scaling and feature addition cumbersome. API Gateway decouples these layers, providing a managed service that reduces operational overhead.
Key Capabilities
Unified Authentication & Authorization : Supports key‑pair authentication, OAuth, and integration with external auth servers.
API Transformation & Hiding : Parameter mapping, name conversion, and response transformation hide backend details.
Rate Limiting & Quotas : Controls QPS and request quotas to protect backend resources.
API Marketplace : Enables publishing APIs for third‑party consumption and monetization.
Automatic Documentation & SDK Generation : Generates Swagger and human‑readable docs plus SDKs with built‑in auth code.
High‑Load Handling : Leverages Tencent’s large load‑balancing platform for massive traffic spikes.
IP Whitelisting & Blacklisting : Controls access based on source IP.
CORS Support : Handles cross‑origin requests by injecting appropriate headers.
Response Integration : Pass‑through SCF HTTP responses directly to callers or transform them into standard HTTP responses.
WebSocket Support : Generates unique IDs for each client, enabling long‑living connections through API Gateway to SCF.
Integration Flow
Developers create an API in the gateway, configure authentication, rate limiting, and mapping, then publish it. The gateway acts as a trigger for SCF; when an API call arrives, the gateway forwards the request to the SCF function, which processes the logic and returns a response that the gateway can either pass through or transform before sending back to the client. Monitoring, logging, and error tracing are available throughout the flow.
Typical Use Cases
E‑commerce & Mini‑Program : Front‑end apps call unified APIs for product, user, and order services.
Online Education (Lizhihuike) : SCF runs recommendation models; API Gateway handles authentication, IP control, and monitoring.
AI Inference & Translation (Sogou) : GPU‑accelerated models run in SCF; API Gateway triggers inference and isolates front‑end from back‑end implementation.
Third‑Party API Publishing : Companies expose internal services via the API Marketplace for external partners.
Performance & Cost
API Gateway can sustain very high concurrency with asynchronous HTTPS handling. Pricing includes a free tier of 1 million calls per month; beyond that, network traffic is charged at 0.04 CNY per 10 k calls. No additional fees are currently applied, and the service is positioned as cost‑effective for serverless workloads.
Q&A Highlights
Environment and version management are supported; CLI tools are planned for future release.
Deploying updated code to SCF will be streamlined with upcoming one‑click upload tools.
Cost estimation depends on workload characteristics (triggered vs. resident); serverless can be cheaper for low‑frequency tasks.
Latency is typically millisecond‑level within the internal network; external latency depends on the caller’s network.
Images
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Tencent Cloud Developer
Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
