Absrtact: In the opinion of Internet practitioner, the root of the problem of 12306 purchase ticket website lies in the incompatibility between the railway ministry's self-contained habit and the trend of Internet openness and transparency. Despite the difficulty of docking with Tiero, programmers spontaneously set up
In the eyes of Internet practitioners, the root of the problem with the 12306 purchase of ticket websites is the incompatibility between the self-contained habits of the Ministry of Railways and the era of open and transparent Internet. Despite the difficulty of docking with "Tiero", "programmers" spontaneously set up an Open-source project designed to optimize and develop 12306. We have invited several professionals from the project to evaluate 12306 websites and make analysis and suggestions on the Internet performance of "Tiero".
Build a website like a railroad
The flood-like rush of spring Energy, as the "railway official only buy train ticket website", 12306 did bear considerable pressure-data agency Hitwise disclosed, January 19, 2013, 12306 page Views (PV) To 120 million, an average of 14 pages per user, which means that 12306 of the day Independent visitors (UV) close to tens of millions, such data has been more than the Beijing-east, where to wait for sites.
During the Spring Festival in 2012, tens of millions of users across the country encountered a series of problems such as server downtime, payment failures, and long queues. 70% users are unable to log in 30 minutes, the remaining 30% in the query-selected-the next single-pay this four-step process randomly encountered the server denied access, the site stopped responding, the current number of users too many cases.
The essence of the problem is the Tiero of traditional thinking in the process of getting into the Internet. "He Jin, the technical vice president of a well-known electric company, 12306 encountered the first is the service model challenges: the Internet products need" small running "type of micro-innovation, the first rapid launch of the business to occupy market space, and then in the shortest possible time to carry out technical iterations, in the period of good service to enhance the user experience, reduce the loss, This is the development trajectory that a normal internet company should follow.
And 12306 of the construction and construction of a traditional model of the railway is no different: the contractor signed a service agreement, the completion of the operation, maintenance and subsequent development. This model itself has hidden dangers, coupled with the travel during the Spring Festival traffic and the number of visits far more than imagined, directly lead to server failures. He Jin made a contrast, "12306 access to peak data is equivalent to Taobao's ' double 11 ' activity during the amount of data." In order to achieve a stable database structure, Taobao for nearly eight years, and 12306 is only a few months. ”
Lack of middle-tier design mishap
"There is a dam theory in program development: to build a dike to withstand a big wave, usually do a few layers, a layer higher than a layer, so that can be divided into batches to withstand the waves." Web traffic is also so, the more hierarchical, the less pressure after the shunt, the more secure the site. 12306 in the design, the lack of middle-tier buffer, front-end user requirements directly into the end of the database, resulting in a series of failures. ”
He Jin further explained that if according to the idea of large-scale commercial website design 12306, the bottom is the ticket pool (centralized database), docking traditional railway system ticketing TRS (Railway ticket System) and TBS (high-speed rail ticketing system), "this part is the traditional business, has many years of accumulation, do well."
The second tier is the distributed database. From a centralized database to a distributed database, in fact, from a large ticket pool to a lot of small ticket pool. For example, a pool in north China, a pool in the Pearl River Delta, spread out different needs.
The third layer is the trading gateway, mainly processing order information and payment link. Concurrency is the main feature of this layer, and there are millions other users to do online transactions.
The fourth layer is the security layer, plays the role of the firewall, used for filtering and eliminating the malicious traffic such as cattle brush tickets, and network attack protection, to protect normal users of regular access. The top level is the service gateway, based on this layer, can build purchase ticket website (12306), Android client, iOS client, this layer is directly docking users.
The second layer to the fourth floor in the development is generally called the engine, and if the engine part of the design error or incomplete implementation, the direct performance is the front-end service instability, easy to happen ticket failure, payment errors and so on.
"It seems that the 12306 architecture before the fifth tier Service Gateway accepted the user ticket request, directly to the underlying database link, the lack of the middle-tier engine part of the buffer and streaming, which makes the centralized database in the face of the instantaneous large traffic request crashes." ”
Original front level
Beyond the architecture, 12306 has a number of problems, including rudimentary interfaces that have not yet changed. Many of the front-end engineers in the site after analysis, said that such a front-end level is too primitive, technology has remained at three or four years ago.
A series of 12306 vulnerabilities have been detected in a number of successive. For example, there is a "technical home" by modifying the code of 12306 submitted pages, successful booking to berth berth (normal ticket for random bunk); others have written a script to buy tickets more than 20 days in advance, and in the end there have been "ticket assistants" and "browser ticket-buying Plug-ins".
"To open the home page to build more than 60 HTTP connections, now the browser is concurrent request, 1 million users is 6000多万个 request, too much;" The first picture total 700k or so, if 1 million users for the first time access, and within 120 seconds to return, you will download 47Gbps data. If the site can lose weight, save bandwidth after the visit speed will be greatly improved. "Programmer" The highest silver soul proposal.
Zhao, a software engineer, said: "Even if the concurrent volume is large enough, the result is that all tickets are sold instantaneously, and the system is idle for the rest of the day." Therefore, the first thing to be solved is to change the time rules to buy tickets, dispersed, and then turn to solve the problem of concurrent volume. ”
Clove Garden CTO Feng Dahui recommends the use of a generic digital certificate. "12306 of digital certificates are issued by themselves, not generic, and need to be compatible with browsers and other applications, and are not even available in some browsers, which obviously affects the user experience." ”
Some of these recommendations have been implemented. For example, this year's ticket rules have been revised to 8 to 18 o'clock, with the exception of 14 o'clock, there are some new tickets available every hour. Since January 7, 2013 (20 days in advance) to sell the Spring festival tickets to date, the entire 12,306 has only two times the technical failure of a long time. Combined with a series of improvements in the database, most people's feedback in the 2013 is no longer "on the Go", but "can't buy tickets".
Limited network votes
Not buying tickets is certainly not because of the limited ticket. Behind this obvious problem is the docking problem of the old and new systems.
12306 is not an independent ticketing system. The Ministry of Railways originally used a set of artificial ticketing system, 12306 is built on the system on the Internet General Self-Service purchase ticket platform, the two share the same ticket pool. This leads to the most realistic question, how much of all the tickets for a train should be sold over the internet?
For example, this year's Spring festival in the "Buy Ticket assistant" appeared on the internet has caused hot debate: Since the network ticket 20 days in advance and the ticket window is only 18 days ahead of time, with the "ticket assistant" to queue up to buy the migrant workers is fair?
By understanding the whole system of ticketing, the answer is already clear. But we have reason to believe that in the Spring Festival last year, the Ministry of Railways, because of the first design of the ticket scheme, in both the proportion of the lack of experience, resulting in 12306 of the number of votes can not actually imagine that much.
"From the overall situation this year, the total number of tickets for 12306 and telephone tickets accounted for 30% to 40% of the total tickets." This is a bit higher than last year, but we can't think of it as an optimal solution. Network channels out of the proportion of the most appropriate, but also slowly groping, "a railway system insiders said.
Can imagine that for a long time in the future, this network + manual ticketing two-track parallel sales will not change, and this is doomed whether you are using 360 browser, ticket assistant software or every day insist on their own click of the mouse, you strive for the only one of the few tickets in the relatively small part.
Open and transparent at least on the internet
Although I do not understand the principle, but the total 12306 project won the winning amount of more than 300 million yuan, the public still sent an angry voice: 300 million to change this thing?
He Jin, who has been in charge of a large information portal and the technical architecture of its website, admits: "12306 is technically difficult." 300 million of the numbers certainly contain water, but the gap is not as big as most people think. ”
For example, 12306 compared with Taobao: Although the "Double 11" activities during the total number of Taobao transactions 106 million, but Taobao goods is actually static, only need to do the purchase queue, when the queue exceeds the number of goods that is close to purchase, during which do not need to query the database. And 12306 of all inquiries must be real-time, especially the same line when the starting ticket status is determined, the ticket status will change along the way, so even if trying to do distributed data, the entire line of all the station status table added together is a considerable number.
"By reckoning, last year's usability was so bad that the technology and business were optimized this year," he said. "Lilac Garden CTO Feng Dahui revealed that in May 2012, the Ministry of Railways invited Alibaba and other Internet companies, technical backbone, as a consultant to the 12306 project proposals, some of which have been adopted.
Despite the professional understanding, there are no small progress, but 12306 is still condemnation. It can be said that the traditional way of building websites of the Ministry of Railways is to bury the hidden dangers, and the lack of openness in coping with industry discussions and public opinion has magnified the problem.
In September 2012, for example, He Jin saw many programmers unable to order train tickets in 12306, which led to the establishment of the 12306ng.org community. All development processes, open documents, and source code for the project are open and free for all internet companies (including 12306). He Jin's idea is that 12306 open source projects can partially replace 12306 online booking or distribution, process data, and seamlessly switch to 12306. At present, the community has gathered more than 10,000 developers, but also made a number of related products such as browser grab ticket plug-ins, mobile phone clients.
But He Jin said the outlook was not rosy: "It's far from imagined, there's basically no communication with the ministry, and they don't have an open interface. ”
In 2012, a netizen suggested that the Ministry of Railways should make public tenders for 12306, and some people joked that Taobao should take over the part of the business. In the special case of a self-contained railway ministry, none of these proposals is feasible. But if the ministry wants to reduce criticism and reduce the pressure of public opinion, it should publish the whereabouts of the website construction funds and present the open posture of the Internet era in the maintenance and subsequent development. At least in the era of openness and transparency of the Internet, the "Tiero" of the former modern thinking should be changed.