Column | chapter nine algorithm

Url | www.jiuzhang.com

Verify the standard of a star flow is not big, in the TA official publicity event, the micro-blog downtime, what attitude micro-blog program ape.

For example, at the time of Zhao Liying’s official wedding announcement, the microblog was sent at 10:07, and immediately the microblog hot search function broke down, and the server was down for an hour.

When Lu Han announced his love, Weibo expanded 1,000 servers an hour for him, and the programmers who went home to get married were forced to work overtime at the wedding.

Last night was winter solstice, Yang Mi picked a golden time — around 8 PM, announced her divorce from Hawick Lau. At 8:17 a.m., the heat hit 20 million, breaking the slag wave record. But what’s wrong with eating melons?

Normally, such a big melon, the weibo server should be down. But last night, the weibo servers seemed to hold up?

A Zhongbo, a micro blog technology expert, was eating dumplings at 8:30 yesterday without any sign of overtime. Unlike Zhao Liying, Lu Han, Wang Baoqiang, Xue Zhiqian and other melons, weibo despair asked.

Shouldn’t be, is mil mil can’t handle the knife? Or has Weibo improved?

Why does weibo explode when there is melon?

Micro expo explosion, with @ Jiangning mother-in-law words to explain the most popular: if the micro blog is a supermarket, usually a cashier is enough, meet the star goods suddenly discounted (star material), customers (netizens) will flock to buy goods (eat melon). When there are not enough cash registers, congestion and downtime can result.

Why does everyone rush to expand when the server explodes?

The way to avoid this is to get outside help — to pay for a cash register, which is expansion. Server capacity expansion refers to increasing the number of servers, storage resources, bandwidths, and computing capabilities to meet service requirements.

Weibo server expansion, using Aliyun. Every time a big explosion hot search, Sina program will be busy to find Ali cloud rent server expansion, so every time eat melon time, Ali cloud will become the biggest winner! You should know that Ali Cloud charges by second. The longer people eat melons, the more people eat melons, and the more money weibo sends to Ali Cloud.

The same is a large flow, how double 11, 12306 Spring Festival transport will not explode

Double 11, Spring Festival transport can be estimated in advance of the large flow, and Ali cloud Taobao is a server 12306 is directly used by Ali cloud, so the early warning response is fast. But the melon of micro blog is always sudden, who knows the stars are who and who good, chaoyang masses today and reported who.

Can’t write an algorithm to automatically expand?

Why does the weibo server always go down first and then find Ali Cloud? Can’t you write an algorithm to automatically expand?

There was a saying that the algorithm of automatic expansion of microblog was probably not written well, or did not dare to give all the algorithm to do. For example, if you find that traffic increases, automatic order plus dozens of servers can accept, suddenly add a thousand if the program bugs, micro won’t cost how much money ah… Most capacity expansion of this magnitude requires manual confirmation by O&M. (Zhihu netizen @Surian)

It is very difficult to design the structure of microblog with irregular timing, short time and high concurrency. (Thundering Herd Problem)

Manual expansion will also miss, in November, eight melon even eat, slag wave for Ma Rong expansion, A Zhong Bo also personally guide Ma Rong blog, but did not expect to wait for what good melon, handed over a lot of silver to Ali Cloud.

Weibo did not go down this time, probably because

1. Yang Mi had already said hello to weibo, and The slag wave was arranged in advance.

After all, weibo’s surname is Yang, and some people claim that the vice minister announced divorce Yang Mi also bought a hot search. From a zhongbo, to CEO micro-blog is not unexpected, slag waves should have known in advance.

Privately, this is the two years of Yang Mi pr press release said the most interesting sentence…

2. Yang Mi’s divorce has long been recognized as something that does not explode. If at this time to a “Yang Mi has remarried”, or “Yang Mi Lau Kaiwei divorce was exploded because of TA”, I believe tonight is a microblog program ape sleepless night.

Or daily love under the sina program ape, although not exposed, but DO not know the server estimate is not accurate, there is no more rent, spent money.

Arzhongbo recently announced that he was starting to model the spread of influence.

Alas, if one day eat melon micro-blog does not break down, always feel like Spring Festival without snatching tickets, good is good, is less that a little atmosphere.

The divider

Welcome to follow my wechat official account: Ninechapter.



Elite programmer exchange community, regular release of interview questions, interview skills, job information, etc