Double Cheese and Li did not grab tickets

introduction

Fellow students good, but also to the return ticket to grab time, I do not know how to grab the students.

Xiao Bian after battling some time ago, after all, is not New Year back home to grab a ticket.

This is a sad story.

Various means into battle, ticket hot line is still too difficult to grab a point.

Rush tickets now feel this child, in fact, and almost lottery, can not grab essentially a metaphysical problem.

Multi-point tool feels and former lottery love to analyze all previous periods in the Diansha, in addition to give yourself a little psychological comfort, in fact, true to grab votes, when no x with what.

Years of experience tells me to grab votes, the Buddha Buddha or to the Department of Department of thing, grab tickets complaint is of no use, then do not rush to buy a ticket gray, only two days on a business class.

Fortunately, years later, annual leave may take some days off, not so anxious to grab votes, more than to take a holiday, or buy tickets always get.

Ticket grab it when you can crash 12306 is how a situation.

A few days ago, and double-12306 Cheese Li collapse.

There are students in public background message number Xiao Bian asked, how old 12306 collapse ah, come every year, and aunt as on time.

Obviously just a simple ticketing software, said NB point, grab tickets software, how so not to force, you look at Taobao and micro-channel people next door, but also hundreds of millions of people online, passion interactive, chat, play games, cargo sweeping, no problem, why this one to you, to become a pair of ghosts.

emmmmmmmmm, on this issue, Xiao Bian is necessary and everyone talking about the talking.

12306 in the end how much is facing challenges and business pressures.

Ha course, I really just wanted to chat with fellow students why not buy tickets.

Under good balance his heart Well ~ ~ ~

Two-eleven and compare

Many people take two-eleven to more than 12306 and that is two-eleven so much traffic can make it, barely 12306, 12306 is the problem, not technology 12306.

Of course, if purely from the point of view in terms of traffic, and indeed two-eleven 12306 is a fight, who is great who is little concrete sides also have not released any specific data.

However, these two things put them together, from the stalk of the peer had not a contest, because Lynx double eleven activities is a purely online business, without having to lower the entire order data and line any interaction can be completed directly online business closed.

而 12306 就不同了, 12306 可不是只有线上的业务,可不是只有我们经常用的手机 APP 和网站,还有线下的售票网点(各个火车站)、售票机、电话售票等等很多渠道的,这么多的渠道在移动互联不是那么发达的以前,帮助了各种各样的人买到票上车回家。

现在的网点在实际生活中会仍然会有很多人去买返乡的火车票,如辛苦了一年的农名工朋友,他们很多人都不会线上操作,只能是在线下彻夜的排队,非常辛苦。

这就导致了 12306 是一个线上线下数据要互通的业务场景,包括很多 n 久之前的软硬件的基础建设,都需要得到兼容。

这就导致 12306 的整个业务场景,要比双十一复杂的多。

抛开业务复杂性不谈,这个毕竟有点太欺负 12306 了,我们从业务本身的可预测性上来聊一聊。

纵观整个双十一的业务,整个业务流程是有明确的操作节点的,在双十一之前的一个月的左右的时间里,各大商家就开始为整个活动造势了,前期主要完成商品的挑选、撕 B 、搞优惠券等操作。

这一套操作流程下来,用户早早的就选定了商品,商家也早早的就准备好了库存,直到双十一当前 0 点一到,就只剩下下单付款操作了。

这就代表着,双十一面对的是一个确定性相当高的一个任务,而一旦确定性高,那么流量再大也是有解决方案的。

反观 12306 ,这个问题就不是那么确定了,因为永远不会有人知道,中国人在回家过年这件事情上,是有多么的执著。

只要是能回家,直达的,买全程票的,转车的,转一次的,转两次的(小编去年没抢到票就转了两次),转三次的。

只要能回家过年,在路上损耗多少时间,转多少次车都不是问题。

这就成了,谁也不知道流量会在哪些线路上爆发,不可控程度相当高。

这就造成了这些线路上的流量可能会产生爆发,谁也不知道为啥会出现这种爆发,但是就是爆了,然后导致宕机了就。

当然,一些热门的线路 12306 肯定每年都是有复盘的,这些热门线路一般都会增加后备资源,但是,不可能所有的线路都按照最高标准来进行资源后备,这样的消耗,将会是一个天文数字。

这就和微博一样,每次明星一搞个大事儿,就跪了,因为谁也不知道哪位明星啥时候搞大事儿,资源后备不足,就完犊子了。

然后就是库存管理,电商场景下的库存管理,我们往简单里看就是加几个减几个的事情,最多就是库存不够,自动下架或者下单失败,最多出现一件商品同时被两个人买下这种小事儿。

12306 的库存管理就比较狂野了。

同样一般车次,它的经停站可能有十几个、二十几个、三十几个。

请问哪位同学能快速告诉小编,随便一个路线,中间经停 n 站,一个人随便上下车,能有多少种可能性。

这个公式应该是 (n - 1) + (n - 2) + ... + 1 对吧。

这种线路的实时库存,想想都感觉头大。

这还不是最难的地方,最难的是,这种数据的变动,往往会是连带很多数据一起变动,而且还对实时性有要求。

对数据库稍微有点了解的同学,可以思考一下一个 P 级数据的数据变动,对资源的消耗有多么恐怖。

如果没有了解的同学可以找一个 GB 级的 Excel 在自己的电脑上打开下试试看。

所以说为什么 12306 不是全天候 24 小时提供服务,这种数据级别的数据如果不是天天维护做缓存,一个查询下来可能直接就能把整个网站干掉。

所以各位同学以后买票的时候,多一点理解。

然后就是流量这个话题, 12306 的流量到底有多大,各位同学想一件事情,双十一的时候,有人会拼命疯狂的点下单按钮么,大家会怕自己不能在 0 点整的时候下单么?

即使有也会是小部分人吧。

再想一件事情,有人会在 12306 抢票的时候鼠标只点一次么?大家巴不得把吃奶的劲儿都试出来,就为了多点几次,多刷新几次,生怕自己没抢到票。

而且,最可怕不是人的点击,人嘛,最快能点多少次,就用你单身三十年的手速, 1s 5次?这个应该算快的了吧。

现在在网上抢票的,应该大多数的人都会使用抢票软件的吧,包括现在各个浏览器都装上抢票的插件,这种东西,一开起来可不是一个人在抢票了,这一下可能就成三个人五个人十个人在一起抢票了,这种软件装好,1s 100 次不是梦。

同时还有很多厂商直接提供了云服务也来帮大家抢票。

多的不敢说,加上刷票软件,1 亿人刷出来个几十亿一百亿人的流量毫无压力。

这种软件其实还可以叫另外一个名字, DDoS 攻击软件。

这叫啥,这叫 12306 天天顶全民着 DDoS 攻击还要为大家提供正常的服务。

所以,各位同学知道每天 12306 面临的流量负载有多强了么?

最后送各位同学一句话,佛系买票,得之我幸,失之我命。

Guess you like

Origin www.cnblogs.com/babycomeon/p/12154674.html