Tengxunyun Account Purchase: Tengxunyun CVM Server Daily CPU Idle Rate as High as 80% How to Reduce Cost
In the bill of enterprise IT infrastructure, there is an extremely absurd but widespread "cold joke":
The company pays thousands or even hundreds of thousands of server fees to cloud manufacturers every month, but when you click on the monitoring curve of the console, the daily CPU utilization rate of those high-profile servers is often only 10% to 20%.
What is the remaining 80% of the calculation power doing? Sleeping, fishing and burning money in vain.
Tencent Cloud Account Purchase
As a technical director, architect or financial manager, you may have watched the daily idle rate of Tencent cloud CVM (cloud server) gnash your teeth countless times. But whenever you propose to "reduce 8 cores to 2 cores", the technical team always has a lot of legitimate reasons to bring you back:
"What if the activity is greatly promoted and the concurrency is high?", "When the background runs batch reports in the early morning, the CPU will be full in an instant, and the distribution system will be stuck!"
In order to cope with the business peak of only 5% in a year, enterprises have to maintain 100% redundancy configuration all year round, which is typical of "covering up strategic waste with tactical preparation".
Today, we don't talk about those illusory architecture principles, directly on the ground, can cut bills of actual combat dry goods. Teach you how to use dynamic adjustment (elastic expansion)
with
Spot Instance (Spot) These two razors squeeze out 80% of the idle power of Tengxun Cloud CVM server, making your cloud cost fall precipitously.
1. Lesion Analysis: Why Does Your CVM Server Daily CPU Idle 80%?
To reduce costs, one must first understand how this 80% of idleness came about. In the vast majority of small and medium-sized enterprises, server idleness is usually caused by the following two "deep-rooted" traditional operation and maintenance thinking:
1. The "once and for all" thinking of static specifications
At the beginning of the project launch, many teams bought servers "patting their heads" or according to the highest peak value of pressure measurement. I bought an 8-core 32G monthly CVM, and the system just kept running.
But the business flow of the enterprise is inherently
tidal effect
. Office systems (OA, CRM) are only used for commuting during the day and are completely silent at night. For e-commerce or pan-entertainment applications, traffic is concentrated between 8 pm and 11 pm, and there is basically no one in the morning and morning. Using a set of thunder-moving monthly and annual configurations to remove the hard-top tidal flow will inevitably lead to a large amount of idle computing power during the trough period.
2. Core business and non-core business "equally high"
In order to stabilize the company's production environment, it is understandable to buy enterprise-class exclusive types (such as standard S5 and S6). However, when many teams build test environments, development environments, advance environments, or distributed computing nodes that run big data, they also replicate the annual and monthly high-end machines in the production environment. These machines are still billed 24 hours a day, even when they are not used at all on weekends.
2. First Razor: Configuring"
Tidal Lane ", by elastic telescopic automatic peak cutting valley
Since the traffic has tides, the server should be like a rubber band, which can be lengthened and shortened. Tencent Cloud provides a completely free efficiency tool--
AS (Elastic Scaling)
, in coordination with
Auto Scaling Group
and
CLB (Load Balancing)
This is the most orthodox solution to CPU idle.
1. Core Logic: From "Package Year and Package Month" to "Basic Package Year and Package Month + Dynamic Pay-As-You-Go"
Don't buy all the servers as monthly packages. The correct architectural design should be:
Guaranteed permanent (year-on-year and month-on-month): Assess the needs of your business at the peak of traffic in the early hours of the morning. For example, just two 2-core 4G machines are needed to carry the basic traffic. Then you can only buy these 2 sets per year and per month.
Elastic burst (pay-as-you-go billing): Hang these two machines behind the load balancing (CLB) and create an elastic scaling group at the same time.
2. Actual Combat Pit Avoidance Configuration: Farewell to Barbaric Machine
Purchase a Tencent Cloud account
Many people use elastic expansion and like to set * "when the CPU exceeds 80%, one machine will be automatically added" *. Believe me, there is a high probability that this will roll over on the line. Because when the CPU rushes to 80%, the new CVM often takes 2 to 3 minutes from creation, system startup and initialization environment. When the new machine joins the cluster, the old machine may have already crashed due to overload.
Correct advanced configuration posture: timing strategy: if your business tide is very regular (for example, the number of people starts to increase at 9: 00 a.m. every day), directly match a timing rule: automatically add 2 pay-as-you-go servers at 08:45 a.m. every day to let the machines "wait" for traffic instead of letting the traffic "rush" the machines. Multi-indicator combination strategy: Don't just monitor the CPU. Sometimes the CPU is not full, but the intranet bandwidth or the number of TCP connections is full. Set the combined trigger condition of "CPU> 60% or memory utilization> 70% or intranet bandwidth> 80%" to reserve sufficient system buffer space. Dynamic release: at 10 pm, the traffic recedes and the policy is automatically triggered to release these metered machines. Only pay for the calculation power that is really used, and the problem of idle 80% during the day can be solved.
3.'s Second Razor: Bid Example (Spot), Buy Big Factory with "10% Fracture Price"
If elastic scaling is to optimize the package year and month to the extreme, then the spot instance (Spot Instance) is a public "plug-in" left by tengxunyun official to senior operation and maintenance ".
1. What is a Spot Instance?
Tencent Cloud has built so many computer rooms around the world that it is impossible for every physical server to be fully loaded every second. Those idle physical computing power that no one buys are idle (and also burn electricity), so tengxunyun packs them into "bidding examples" and sells them at a low price in the market.
Temptation: its performance and ordinary by the amount
The billing CVM is exactly the same, there is no difference. However, the price is often only 10% to 20% of the charge by volume. For a server with an original price of 2 yuan an hour, the bidding instance may only cost 20 cents.
Fatal risk: It may be forcibly recycled by cloud vendors at any time. When tengxunyun finds out that someone is willing to buy this machine at full price, or the computer room resources are tight, the system will send you a termination notice 2 minutes in advance, and then ruthlessly shut down and release the machine, erasing all the data.
2. Cross-border/independent station/big data enterprises, how to use bidding examples to make money?
On hearing "may be recycled at any time", many traditional operation and maintenance immediately shook their heads:
"How can this work? In case the business is interrupted and the boss doesn't open me?"
Thinking a turn wide. As long as you carry out "dynamic and static separation" and "state non-sensitization" in your business, bidding examples are money-saving artifacts.
Scenario A: The DevOps test environment and the test environment of the CICD automatic compilation company are not used at all every night and on weekends, so why do you want to buy a package year and month? Directly use the Tengxun cloud's elastic scaling group, and all back-end instances are designated for purchase. Every morning at 9 o'clock in the morning, five bidding instances with a discount of 10% will be automatically opened to form a test cluster, and they will be automatically released after work at 6 o'clock in the afternoon. Even if one is occasionally recycled by Tengxun Cloud during the day, Elastic Scaling will automatically open another one in seconds to make up for it. One month's test server bill can be cut by 80% directly.
Scenario B: Offline big data computing, video transcoding, and AI rendering are characterized by tasks that can be "shredded". For example, there are 10000 videos that need transcoding, and it takes you 10 days to run with 10 ordinary machines. If you use spot instances + stateless architecture: spend a very low budget directly and open 100 spot instances with a 10% discount in an instant. Use distributed computing (such as big data Hadoop nodes, Jenkins distributed nodes) to throw tasks up and bombard them. Even if two machines are recycled by Tengxunyun in the process of running, and the remaining machines continue to run, the transcoding task can be completed in half a day. Not only is the speed 20 times faster, but the cost is much lower than before.
Scenario C: The Web application server mounted by the "cannon fodder" Web node of the highly concurrent website behind CLB (load balancing) is "stateless" as long as it is "stateless" (that is, the session is not stored in the local server, but hosted in the external Redis centralized cache; Files uploaded by users are not saved locally, and all are directly written to OSS/COS object storage). At this time, you can replace 70% of the machines in the cluster with auction instances. They are responsible for only one thing: parsing code and forwarding requests. Even if a machine is suddenly recycled, load balancing (CLB) will automatically remove it, the user has no perception. You used "cannon fodder" to jack up the high concurrency of the whole network, and all you saved was pure profit.
4. Tengxunyun's "Ultimate Copy of Homework"
In order to let you go to the boss tomorrow to invite
We summarize this set of dynamic adjustment and cost-down strategies into a minimalist landing model:
Business Server Role
Recommended Purchase Mode
Core strategy for cost reduction
Estimated budget savings
Core database (MySQL / Redis)
Package year and package month (exclusive specifications)
There is absolutely no room for interruptions. However, slow SQL needs to be checked regularly to reduce the allocation by improving code efficiency. Elastic scaling is not required.
0% (safety first)
Core Web App/API Portal
Resident Package Year Package Month + Dynamic Pay-As-You-Go
Utilize Elastic Scaling (AS). Two units will be guaranteed at the bottom of the valley, automatically expanded according to CPU and bandwidth during the day, and automatically released at night.
30% - 50%
Test/Development Environment, Advance Cluster
Time switch machine or pure spot instance
Automatic shutdown after work. Or use spot instances (Spot) completely, release them directly after work, and pull them up again at work.
70% - 80%
Offline computing, running batches, and video transcoding
Pure Spot Instance (Batch Calculation)
With the bidding node pool of Tengxun Cloud Batch (batch computing) or Container Service (TKE), the task is shredded and runs without status.
More than 80%
5. epilogue
In the era of cloud native and fine operation and maintenance, the standard to measure the excellence of a technical team is no longer "whether the system can be built up", but "whether the system can run stably with the most elegant architecture and the least money".
Purchase a Tencent Cloud account
It is a great crime to keep the CPU idle rate of 80%. Put away the old thinking of "once and for all" package year and month, leave the core of stability to package year and month, give the tidal flow to flexible expansion and contraction, and bravely throw the stateless calculation power to the bidding example of 10% discount. When you understand the flexible rules of the game, you will find that the original cut half of the IT budget, can be so calm.

