With the arrival of the eleven long vacation,
‘s 12306 discussions on the Ministry of railways have come up again. This article extends from the 12306 website to many discussions of website performance, and has a strong reference for entrepreneurs and technical lovers. The author Chen Hao (Weibo) has 14 years of software development related work experience, more than 8 years of project management and team management experience.
12306.cn website hung up and was scolded by the people all over the country. I’ve been thinking about this for the last two days, and I’d like to briefly discuss the performance of the website with this matter. Because of the rush and entirely based on my limited experience and understanding. Discuss performance issues only, and do not discuss the functionality of the UI, user experience, or whether to separate the payment and ticket orders.
any technology can not be separated from the business needs, so to illustrate the performance problems, first of all still want to talk about business problems.
one, someone might compare this to QQ or online games. But I think the two are not the same, online games and QQ online or login to visit more users of their own data, and the booking system access is the center of the ticket amount of data, which is not the same. Don’t think online games or QQ can do it, you think it’s the same. Online games and QQ’s back-end loads are still relatively simple compared to e-commerce systems.
second, some people say that the booking of trains during the Spring Festival seems like a spike activity on the website. It’s very similar, but if your thinking isn’t on the surface, you’ll find it’s a little different. The train tickets for this thing, there are a lot of query operation, check the time, check seat, check the berth, not a train, and check to another train, which accompanied by a large number of single query operation, when the need for database operation. And kill directly kill just fine. In addition, a page can be made only accept seckill, the first N user request (any data, not only the operation of single back-end operation for users of log), this kind of business, as long as the exact time of each server can be, without operating any database at the time. After the order is enough, stop the spike, and then batch write the database. This train ticket is more than simply seckill. Can I get the ticket and tell the user at that time?.
third, someone compares the system with the Olympic ticketing system. I still think it’s different. Although the Olympic ticketing system was also on-line on the scrap. But with the Olympics is a way to draw, that is to say there is no fifg grab way, and, after the draw, only need to receive information in advance, advance does not need to ensure data consistency, no lock, it is easy to extend the level.
fourth, booking system should be similar to the e-commerce order system, all need to inventory: 1) accounting for inventory, 2) payment (optional >