Grab your New Year red envelopes but not the cloud

In recent years, the New Year red envelopes called the war the most exciting year drama.

Tencent in 2015 to more than 50 million yuan of the high price, the exclusive right to win the CCTV Spring Festival Evening cooperation, bringing more than one overnight one hundred million new bank card binding to micro-channel payment, Alipay completed in just one day a few years the road traveled, is Ma called Ali Pearl Harbor history, since they opened the Internet giant Chinese New Year red envelopes marketing prelude.

2016 Spring Festival, Alipay spent 269 million won CCTV exclusive right to cooperate Spring Festival, and create the most classic collection Five red envelopes play history, when Alipay announced to a national audience Hao sent 800 million yuan red envelopes, New Year's Eve, pay add friends on the treasure, in other Foca, the number of red envelopes has reached 67.7 billion times.

The 2020 Spring Festival, deft early on to reach the CCTV Spring Festival Evening exclusive relationship, thought C-bit red war this year has been no suspense, but Ali suddenly announced on January 11 became Taobao Spring Festival exclusive electricity supplier partners, though not red envelopes but Ali has brought 10 billion subsidy shopping and decimation 50,000 consumers empty cart, and added a fire is red war.

The heart of the epidemic this year it is correct, it will make the line activities has decreased, but also increase the heat of online activities, these objective factors will make the battle more Aspect red envelopes this year. In fact, from a technical point of view the biggest surprise in World War II red cloud.


One of the technical highlights: a distributed architecture

If such a short amount of millions of concurrent scenarios would like to follow grab a red envelope, even if the world's most powerful supercomputer is also inadequate, so this requires a red envelope system must first meet the needs of distributed architectures, and distributed systems is also an important principle CAP theorem.
CAP theorem: refers to a distributed system (Distributed System), the consistency (Consistency), availability (Availability), partition fault tolerance (Partition tolerance), was impossible triangle, only three goals can only be done at the same time two, the three can not be taken into account.
In fact, CAP theorem is not difficult to understand, because if satisfied consistency, high availability, so if there is a node failure within the cluster, in order to ensure consistency of data, will make the whole system came to a halt.

If both meet availability, and fault tolerance to meet the partition, then there must be a node goes down in foreign service systems, and data consistency then each node, and can not fully guaranteed.
Here Insert Picture Description
Combined with red envelope system requirements analysis, system availability is certainly guaranteed to be first, the same day if the show is really not access the page, it probably is not marketing, would give the user a way to black.

And under the impact of high flow, node failure is inevitable, so partitions also need to ensure fault tolerance, so it seems, can be a little put off only data consistency, so from this perspective, the total amount of red envelopes bound around expectations fluctuating.

Distributed transactions current distribution system, there are two ways, one hash value is calculated after hashing, the sequence of service requests, according to this hash value then assigns the request to different nodes, according to the request directly of course send order cycle servers in the cluster, can be seen as variations hashing, but it will become a bottleneck at the entrance to the load equipment. Second, all requests artificially divided into several, each cluster only to their own processing request, in order to reduce the pressure of the inlet flow, but the disadvantage that it is difficult requests equally.

Such a system grab a red envelope, only the combination of these two programs. First, based on historical experience, the trading volume combined with the amount of area, divided into one group, such as Beijing, Tianjin and Liaoning, Changchun grouped, Shanghai, Suzhou, Nanjing, divided into two groups and so on and so on, the corresponding the cloud cluster has its own separate red lines, they dispose sent their request. This avoids bottlenecks inlet, also try to balance the amount of processing requests.

Then each cluster, the amount will be allocated to internal servers, each server will then own stock within the scope of the request, direct signs for success, and on the basis of its own stock on the range, but also more than a certain percentage set aside needs to be determined, to be unified reducing inventory and then determine whether the request can be successful.
Here Insert Picture Description
From the point of view of distributed, sub-regional and sub-inventory is the basic link system design, and the next step is on the cloud.


Technical Aspect II: cloud computing

2019 double eleven, Ali announced that their entire core system has been completed on the cloud, this is a very amazing achievement, along with the traditional separation of hardware and software, iterative mode gradually expose the limitations of today's increasingly complex applications, Operators force requirements become increasingly demanding, and algorithms, software and hardware gap causing huge calculation power waste, has been unable to meet in the ultra-large-scale computer scene, computing improve IT efficiency and reduce the cost of computing demands.

Then the value of the "cloud" beginning to show, but the cloud era of software development methodologies and models, and before the era completely different, because the cloud biggest feature is the sustainable delivery of services and micro, entirely on the cloud not only enormous benefits, but also It means a huge challenge. Here Insert Picture Description
Distributed computing and cloud like a pair of twin brothers, must be used in combination in order to play the greatest value, each node distributed system is the best uniform, so scheduling costs are likely to be reduced to a minimum.

And if there is any node count and strong, some weak-bus, then by the bucket theory constraints, the performance of the system is likely to be considered limited by the weakest node, and the cloud bottom of this screen, delivery to the customer standardized hardware technology, will be fully displayed their prowess in a distributed architecture.

It is precisely these reasons, we can see the red companies involved in such activities, are often purely online business, so once the cable network at the enterprise layout, so when participating in a red envelope activity needs to consider a request to initiate outlets raise priority, treated differently, such standard non-standard request system complexity will increase exponentially.

Therefore, from the cloud point of view, the user is not grab red, but the cloud resource requests in a queue area.


Domestic cloud computing bumpy road of development

While the benefits of the "cloud" a lot, but its development is not particularly successful, the concept was put forward at the beginning of a decade ago, generally people are not very optimistic, even dubbed an IT chiefs, "Cloud computing is just old wine in new bottle", behind the reason is the consumption of resource virtualization layer can not be avoided.

Ali cloud Wang Jian, founder of the Academy of Sciences, participated in CCTV "The Reader" program had said that Ali cloud engineers to take life to fill, because the power of the first person, the first person to fly is to take life fill.

It really is not alarmist, established in the early years, the annual turnover Ali cloud as high as 60% or less, even in 2012, the annual meeting of Ali, Wang Jian also because they are aware of colleagues who leave, and burst into tears.

但情况从2015年开始改观,阿里云在Sort Benchmark的排序竞赛中,仅用不到7分钟就完成了100TB的数据排序,打破了Apache Spark之前23.4分钟的纪录。

后又获得2017年中国电子学会颁发的科技进步奖之特等奖,这也是该奖项设立以来的首个特等奖。

接下来,神龙服务器和飞天操作系统的诞生,基本克服了云的弱点,并将云的规模效应发挥到极致。

神龙服务器:阿里云降低虚拟层消耗的秘决,在于神龙服务器这块完全自研的MOC卡,正是MOC的居中调度,让阿里神龙服务器不再使用宝贵的CPU资源进行虚拟化层的调度工作,从而大大降低云转换成本。

飞天操作系统:正所谓韩信点兵,多多益善,飞天能将百万级服务器连成一台超级计算机,还能有条不紊地通过云计算向用户提供计算能力。

我们看到在飞天的基础公共模块之上,有两个最核心的服务,一个是盘古,另一个是伏羲。

盘古是存储管理服务,伏羲是资源调度服务,飞天内核之上应用的存储和资源的分配都是由盘古和伏羲管理。具体见下图:Here Insert Picture Description
可以看到飞天中的众多模块都是以上古天神命名的,其中:

夸父:负责网络通信,由于飞天是要将众多服务器连接在一起的,夸父正是完成他们之间的通信功能。

女娲:与负责命名与协同工作,与神话中造人的工作不同,做为飞天中的唯一女性女娲负责将所有子模块的命名与协调工作。

盘古:负责分布式存储。

神农:负责监控,随时治病救人。

伏羲:负责任务调度及资源管理,这也和精通音律和伏羲氏有点渊源。

大禹:负责集群布署。

钟馗:负责安全,负责捉鬼。

在国产云计算行业,其它大厂也都有各自的特长,比如腾讯做为全球社区的巨头腾讯,其QQ类的社交软件,面对着比其它应用多出几倍的流量短暂时突发场景,在面对这样的问题时,以虚拟机为单位补充资源,会很浪费资源。

因此腾讯在容器化方面做了很多细节工作,以满足这种突发、短时的弹性需求。

Tencent recently open source TencentOS Kernel, running at the desired container resource scheduling flexibility, performance and security levels to do a lot of optimization, can be described as open source + "container cloud" model.


Future: turn on the tap will be able to use the cloud

By self-control technology, domestic technology giants in the field of cloud computing has gone to the forefront of the world, significantly increasing efficiency through cloud computing, implementation can be considered force to break the bottleneck of traditional IT era, highlighting the overall benefits of cloud computing.

Clouds are combined with the block chain become Baas, is combined with AI become Aaas, clouds are constantly sinking into air and water infrastructure of Internet time.

In the future we can no longer care about the details behind cloud computing, just do not care about how water is filtered, transported, like turn on the tap can be used to cloud the future development of cloud computing space and will continue to broaden usage scenarios, the future can be , wait and see.

Transfer from [Chao]

Published 46 original articles · won praise 39 · views 40000 +

Guess you like

Origin blog.csdn.net/weixin_42128813/article/details/104097934