Get the App
SLTechnology News&Howtos  ›  Servers  › 

Treatment of a surge in traffic at the entrance of the official account

Shulou Source: shulou.com Published: 2022-06-03 09:09:14 09月21日 Update

First of all, the conclusion: do not engage in promotional activities casually without being evaluated by the technical operations team. Even some small promotions drained by official accounts may cause a surge in network traffic and lead to failures.

Traffic surged at 10:00

Some people say that they are engaged in an activity today, snapping up a so-and-so financial product. Quickly find someone to understand the entry url, Firefox F12 analysis, found that there are more than 600 KB js files, as follows:

CDN is not enabled for this domain name. The script checks and verifies the previous F12 data again. The origin server traffic is mainly eaten up by several large js files.

Prepare to enable CDN

After analysis, the back end for php, has done a static separation, static resources in one project, dynamic resources in another project, using the same domain name.

You only need to start CDN for static resources, and you cannot cache dynamic APIs. The caching strategy is as follows:

When observed again at 10: 00 the next day, the traffic on the origin server dropped sharply, and CDN blocked most of the traffic:

The cache hit rate is also above 95%.

Tags: Traffic caching resources activities promotions dynamic domain names files static projects promotions analysis portals public products again action 10:00 just hit rate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple Shulou Technology Huawei NVidia