Tengxun cloud free real name account: use tengxun cloud ECM edge computing server to process data 5km away from users
In the traditional cloud computing architecture, when a user clicks on the screen on his mobile phone, the data needs to be connected to the nearest Tencent cloud "base camp" computer room (such as large data centers located in core cities such as Shanghai, Beijing and Guangzhou). If the user is in a third-or fourth-tier city or an edge suburb, the round-trip time (network delay) of this network "long distance" is usually in
30ms to 100ms
Between.
For brushing web pages and watching videos, this delay perception is not obvious. But if you're doing
Autopilot roadside control, factory industrial-grade machine vision quality inspection, fast quantitative transactions, or multiplayer online ultra-low latency cloud games.
Even an extra 10 milliseconds of delay means a car accident, missed inspection of defective products, or game Caton.
In order to break the delay limit caused by physical distance, Tencent Cloud launched
Edge Cloud Computing (ECM)
. Its core logic is:
Pull out the computing power from the remote core computer room and plug it directly into the edge node only 5 kilometers away from the user (such as the operator's district and county computer room, or even next to the base station).
Today's tutorial will take you to put aside the obscure PPT slander and go straight to the core of the technology. It will teach you how to use Tengxun Cloud ECM to build an ultra-low latency edge data processing system "5km away from users.
Core Principle: Why 5km?
Before we start, we need to understand the underlying business logic of edge computing.
The common cloud server (CVM) pursues "large and complete" and centralized management of the whole network; while the edge computing (ECM) pursues "fast and close" and distributed nearby access.
Tencent Cloud has deployed hundreds of ECM nodes across the country and even around the world. These nodes are close to the backbone network gateways of operators (telecom, Unicom, mobile) in provinces, cities, districts and counties. Through
4G/5G or local fiber
, The physical distance and network hops from the user terminal (such as camera, sensor, mobile phone) to this edge server are compressed to the extreme, and the network delay can be directly pressed
Within 5ms
.
We complete the "first-hand washing and filtering" of the data on the edge server, throw away the useless garbage data directly, and only send the refined core reports back to the central cloud of the base camp. This "edge processing center archiving" mode not only saves expensive cross-city public network bandwidth, but also meets the extreme real-time delay requirements.
The first stage: accurately capture the "5km edge node" in the Tencent cloud console"
Since ECM nodes are very scattered, buying edge servers cannot choose "Shanghai District 1" with your eyes closed like buying ordinary servers. We need to select the exact type according to the actual physical location of your equipment/users.
1. Node selection and creation
Log in to the Tencent Cloud console, search and enter the ECM console of the edge computing machine.
In the left-side navigation pane, click Instance Management-> Create Instance.
Key Selection-Regions and Nodes: At this point you will see a national map-like selection boundary.
Face. Suppose your business equipment (such as 100 industrial inspection cameras) are all deployed in an industrial park in Ningbo, Zhejiang Province. In the operator drop-down menu, check "Zhejiang" and then select the "Ningbo" node (it is better to check the operator covering the park, such as Ningbo Telecom or Ningbo Mobile). Tencent Cloud will automatically help you match the physical server cluster deployed in the local operator's computer room in Ningbo.
Configuration instance type: Billing mode: Edge computing usually involves a large amount of bandwidth bursts. We recommend that you select Fixed Bandwidth or 95 Billing based on your business ". Image: Choose a system you are familiar with, such as Ubuntu 22.04 LTS. Network: The edge computing instance has an external network IP by default, which is the direct exit IP of the local operator and is extremely fast.
The second stage: open the local equipment to the edge server "green channel"
After the server is opened, how can local devices (such as IoT devices, cameras or vehicle terminals) within 5 kilometers automatically connect to this edge server instead of running to the distant central cloud?
We need to configure the code or device side
Nearby access routing (based on intelligent DNS or anycast Anycast)
.
1. Intelligent DNS dynamic diversion
The safest way is to apply for a domain name for your edge service (for example
edge-api.yourcompany.com
).
Use Tencent Cloud to resolve DNS (or a third-party DNS platform).
When adding a resolution record, use the line policy for fine distribution: when the resolution request comes from "Zhejiang province-Ningbo city-telecom", point the domain name resolution to the Ningbo ECM telecom node IP you just purchased. When the request comes from elsewhere, it points to the central cloud.
In this way, as soon as the local device within 5 kilometers wakes up, the resolved IP is the edge server that is close at hand.
The third stage: actual combat exercise-edge data cleaning and real-time processing
Now we use a classic "intersection camera license plate recognition traffic flow statistics" scenario to write the data processing architecture.
After the local camera captures the high-definition picture, due to the bandwidth limitation of the public network, if all the massive high-definition original pictures are sent back to the Beijing central cloud for identification, the bandwidth cost is astronomical, and when the result returns, the car will have already left.
Correct schema:
The camera transmits the picture seconds to the ECM edge server 5 kilometers away. ECM runs a lightweight recognition model (such as YOLO), extracts the license plate number and traffic number, and then synchronizes the text results of only a few KB to the central cloud.
1. Edge End Environment Preparation (ECM Run)
Log in to your ECM server, configure the Docker environment and run a highly concurrent lightweight receiving service (here is a Python FastAPI):
Bash
# Quickly install Docker on ECM and run your edge cleaning suit
Duty
sudo apt-get update && sudo apt-get install -y docker.io
2. Edge-side receiving and processing core code (
edge_processor.py
)
This code runs on an ECM server 5 kilometers away and is used to receive streaming media data from local cameras and consume it directly locally.
The local device calls this ECM interface, and the total time spent on the whole network round-trip plus picture recognition can be pressed to death.
Within 15ms
"Real time response".
The fourth stage: the edge of the architecture of the "invisible pit" and self-defense guide
Although edge computing is straightforward, its physical environment is very different from that of the central cloud. When writing edge code, Jianghu veterans will pay attention to the following three big holes:
1. Weak network fault tolerance design (broken network can not die)
The stability of edge nodes (district and county computer rooms) is usually slightly lower than that of large BGP computer rooms in the central cloud. Sometimes when municipal construction breaks the optical cable of a certain road, ECM may lose contact with the central cloud for a short time.
Solution: The edge-side application must design a local cache mechanism. If the data transfer to the central cloud fails, store the data in the local ECM database (such as SQLite or local Redis) first, and then reissue the data in batches (resumable transfer) after the network is restored.
2. Storage space is extremely limited (don't use it as a disk)
The cloud hard disk (CBS) of the central cloud can easily buy dozens of T's. However, due to hardware limitations, the official local disk space allocated by ECM edge servers is usually very small (mainly used to run system and business programs).
Solution: It is strictly forbidden to save large files such as audio and video on the edge server for a long time! After data processing (such as video slice processing), delete it immediately, or push it away asynchronously through the edge acceleration function of object storage (COS).
3. CI/CD automated deployment issues
When your business expands to 50 districts and counties in the province and you control 50 ECM edge servers, if you log in to deploy the code one by one, the team will crash directly.
Solution: The best partner for edge computing is containerization (K8s/K3s). It is recommended to work with Tencent Cloud's Edge Container Service (TKE Edge). You only need to click "publish" in the central cloud, and the system will automatically push the updated Docker image distribution to all edge nodes of the whole network, managing the edge cluster of the whole network like a server.
Summary
Using tengxun cloud ECM to push the calculation force to a place 5 kilometers away from the user is essentially a
trade space for time
The technology upgrade.
Its standard floor type is:
Select local operator nodes (nearby placement) -> intelligent DNS traffic division (nearby access) -> edge lightweight service processing (nearby consumption burden reduction) -> core results back to the central cloud (centralized archiving)
. Just avoid good
With the characteristics of small edge storage and easy disconnection, this architecture can make your real-time business get a qualitative leap.

