GitHub Blocked In China Thanks To The Railway Ministry’s Crappy Ticketing Site [UPDATE]

Ministry of Railway image

Image via Charlie Custer/Tech in Asia

The Golden Shield Project (aka Great Firewall of China) has decided GitHub no longer conforms with Chinese notions of harmony, as first noticed Monday by and reported on The Next Web.

The block comes on the heels of the Ministry of Railways’s unsuccessful attempt to convince Chinese browser-makers to stop providing a plugin that helps users purchase train tickets off MOR’s website.

A bit of background before we go any further: GitHub acts as a platform for software developers to share, revise, and track changes to code. This means that people who make those cool apps and websites we use every day use GitHub as a means to communicate with other developers, share their work, and generally make their products (and, thus, our lives) better1.

According GitHub’s representative, China ranks fourth in traffic to the site, while Beijing is the sixth-ranked city. There’s no regional breakdown, but the service does have 3 million registered users.

Also, this isn’t the first time that GitHub has been censored. Last year, users were unable to download a new version of Node.js2, as its version number shared the same date as the 1989 Tian’anmen protests.

As I mentioned above, much of the speculation as to causes surrounds the recent showdown over browser plugins between the Ministry of Railways and software companies, most notably Kingsoft (金山) and Qihoo 360. This does seem to make the most sense, as one of the plugins makes reference to javascript code that is hosted on GitHub. Block GitHub, stop the plugin.

The plugins themselves don’t use any APIs, as MOR’s ticketing site,, doesn’t actually have any APIs that I know of. Instead, they work by automatically refreshing the page until the desired ticket/trip becomes available for purchase. Imagine the Flash hitting refresh hundreds, if not thousands, of times every second. As you can imagine, this would put increasing pressure on already overloaded (read: incapable) servers dealing with the largest annual migration in the world.

As my good friend and former podcast co-host Charlie Custer points out on Tech in Asia (he’s responsible for the image above), the problems with overloaded servers and the plugins that overload them could all be solved very easily: make the website better. When the site first debuted, it was plagued with server-side issues and confusing interface… after the ministry spent $52 million. To give them credit, they did make some upgrades last September… that cost an extra $53 million (330 million RMB).

The moral of this story: if you can’t solve a problem by throwing money at it, make sure that unauthorized third-parties are unable to make things better, either.


1 This is, of course, a contentious philosophical issue. If you want to hear my thoughts, buy me a beer and you’ll get an earful.

2 Software used to write Internet applications that can flexibly handle higher and lower numbers of users depending on traffic. It’s usually used on web servers.

John Artman has been China watching and covering tech since 2010. Follow him @KnowsNothing.

UPDATE, 1/24, 12:32 pmGitHub has been unblocked, maybe.

    17 Responses to “GitHub Blocked In China Thanks To The Railway Ministry’s Crappy Ticketing Site [UPDATE]”

    1. Chackie Jan

      But isn’t it part of the fun? The CNY-frenzy starts right in your web browser! Try to get tickets now! Ping others to the death, F5 them in the groin! Coming soon to a browser near you!

    2. Fred

      Used this to snap up my tickets actually. Worked great until they started blocking browsers that had the plugin. Then the plugin updated and it became a old-fashioned war.

        • Fred

          Sure, it’s all working just fine and dandy. Of course, I never bothered with the github shit. 猎豹 is basically the best solution to ticket sniping, and that’s what I used to snipe all my tickets as well as some for others as well.

          A simple fact that’s being left out of the news on this is that NOT ALL TICKETS ARE SOLD ONLINE. Yep, you heard that right. Online/phone sales start up 20 days in advance, while in-person sales are 18 days. However, online does not account for every ticket. I’d honestly call it less than half of the total. The majority are still sold in-person, even if it becomes “sold out” online. This is a necessity, as there is a massive chunk of people going home who do not have access to the internet at precisely 11am or whenever they start selling the tickets.

          Sure, 12306′s website is flawed which makes a plugin very useful. But can you think of a better way to do it? The investments made were to cope with the literally millions of people coming on the website all at once in a massive flood. It’s been moved over to CDN as well, and during the peak time, it was still virtually impossible to check on the ticket status after snapping them up.

          Each user was limited to 5 tickets at a time which had to be paid for within 45 minutes. Obviously, many people used multiple accounts to have more chances. Which is no different than having multiple associated people standing in different lines. The sheer insanity which is 春运 is something that is very hard to compensate for, and despite all the bitching, they seem to have pulled it off rather well.

          • C. Custer

            Are you sure tickets are being held for offline buyers this year? They weren’t last year, and that’s why there were complaints about the system being unfair; since in-person tickets went on sale two days later, some lines were totally sold out before in-person sales even started.

            As for better ways to do it, sure. Taobao and Tmall see as much traffic, and very possibly even more, when they have huge one-day sales (like their 11/11 sale this past year) and yet somehow their sites don’t explode. I’d be willing to bet a large heap of money that virtually any non-state-owned internet company (Alibaba, 360buy, baidu, whatever) could build a more stable platform in far less time and using far less money. They’d probably also be able to produce a mobile app quickly, something the Railway Ministry promised they’d have available in September 2012 but which still hasn’t materialized.

            • Fred

              The leftover tickets are the 团体票 and a good number of the 无座. For most destinations, there’s gonna be at least one train for the day that has something left. For the ones that are totally sold out, typically day-of, you might get lucky due to cancellations and reserved 无座 tickets which you have a shot at upgrading once you’re on the train.

              How much was spent on the system really, honestly doesn’t matter. It was doing over 1 billion hits a day and to compensate they nuked the plugins and the refresh rate was capped to about 5 seconds. It didn’t crash either. What got overloaded was the order-status page and you had 45 minutes to pay. Once you had a purchase in process, you could not add more to it until it was completed or cancelled. After 3 cancellations, you’re locked out for the day.

              Also, how would a mobile app help in any way shape or form? You assume that someone who can’t use a computer or even has access to a computer will magically have a smartphone with data access? 2G data would be useless. So it’s 3G people who just get a convenience and this solves literally nothing.

              Even assuming a tiptop system, sitting on non-state servers that can handle everyone with no problem at all. It comes down to who is fastest. Fastest phone, computer, bandwidth, etc. And this inherently favors NOT the 农民工. Who are the ones upset.

              Other options:
              In-person sales first – but then the website is pointless and you get the epic crowds and waiting out in the cold

              Simultaneous sales – increases the chance you just waited in line for nothing, and if an integrated system was magically devised, you end up with an issue of who’s waiting in line for what… and it just pisses off everyone period.

              Allowing market forces to determine prices. Good luck poor people! You’ll never get a ticket.

              The 团体票 system is just about as fair as you can get, unless you really want to go back to the days of fighting in crowds to get to the window first. You could even give ALL 农民工 first rights to the trains, remove everything comfy and have nothing but hard seats, and you still wouldn’t have enough tickets and still have nothing but complaints.

              So what’s your automagical solution? Add more permanent capacity and then whine bitch and moan about how it’s never used most of the year? Add more temporary capacity and then whine bitch and moan about it being unsafe? Jack up prices and then whine bitch and moan about how no one can afford anything? Devise a hilarious means-tested ticket system that denies cheap tickets to anyone who can afford better? End the holiday entirely, and then whine bitch and moan about destroying Chinese traditions?

              Then you get the personal preference issues. Some 农民工 were upset that there were not sleepers set aside, some were upset that there were not cheap tickets set aside and they were not willing to pay for a sleeper. Some were upset that their cheap train would take 30 hours. Some were upset that they didn’t know about the 团体票 system until they were sold out.

              So here’s your options people:
              You can either leave early, leave a day late, be willing to shell out higher prices for other options to leave when you want, get educated as to how to do things, get lucky, or cry bitch and whine about how everyone else is to blame.

          • Markoff

            i think you are wrong thinking there is some quota for offline tickets in china, china is not india

   site is infamous for reason, as was pointed there are plenty of CN websites with heavier load which they can handle, but at those were money used effectively and didn’t went to pockets of some corrupted officials embezzling people’s money

      • RhZ

        Just change the name servers and the block is gone…if the censors really want something blocked they can do that, but most blocks are lazy, um just like this one, where github was only blocked in order to frustrate the plug-ins, they couldn’t think of an easier way presumably….should have been pretty obvious that the call could be changed to some other random site in like 30 minutes by people who know what they are doing, I am assuming that’s what they did.

        Thanks for the info Fred and C Custer. Don’t use that site but like to keep up on what the kids are doing these days.

    3. RhZ

      Although it should be noted that an app that just hammers on the db causing new calls is absolutely not socially optimal or even really reasonable. That’s basically what DDOS is…

      • Fred

        It’s exactly what a DDOS is. Now quick, design a system that was built without the anticipation of that app coming out and can magically handle it anyways with no problems at all.

        And at the same time, be well aware that any attempt to outsource it to a private company will be viewed as nothing but corruption. And a low-bidder system for service will just result in some nobody lying about capability and failing hilariously.

        Also, keep in mind that the people who are pissy about the system give no fucks about the servers working or not. They want to buy in person and pay with cash in hand and would rather fight to the front rather than wait in line.

        • RhZ

          Yes I see the ‘contradictions’. I think your point is no such app would even be contemplated if the site didn’t suck, isn’t that right? How many of these apps exist for say the travelocity site?

          I must admit I am at a loss here, as I don’t use the system at all.

          Still, fun to watch the mandarins try their hand at tech. Green Dam anyone? Good times, good times.

          • Fred

            It’s not that the site “sucks”, it’s that there’s a shitload of people trying to get tickets and the apps allow you to snap up tickets faster when they appear and fill out your info quickly. A better system would allow for all those fields to be filled out in advance and do a one-click buy. Which is essentially what the apps do for you. Unfortunately, that would more or less fuck anyone who took time to confirm all their info was correct, or happened to click too late, it would level the playing field, but at the same time the refreshers still have an advantage.

            If it was a real-time updating system, with one-click buying. Then yes, it would be ideal, however it becomes a pain to allow for modification in terms of ticket class selection or splitting classes on the same purchase.. And in the end, the end result is the same, lack of tickets. And they would have pissed away a ton of money to develop a system that is only easier to overload, especially when at a bare minimum you’re handling tens of millions of simultaneous users. And of course, this nice thing would be useless overkill at all other times of the year.

    4. Fred

      Also this part

      “To give them credit, they did make some upgrades last September… that cost an extra $53 million (330 million RMB)”

      Is wrong. That’s the total sticker price after adding on another 1.3亿 to the original 1.99亿. If you want to believe the whistle blower and say it cost 5亿 in total. Well, there’s more to the site than just passenger tickets. 5亿 in dev, while the revenue for the entire system in 2012 was 9752亿元. The passenger network loses money and is subsidized by the freight side. The majority of the website development went into the freight booking side, which is vastly more complex, more complicated and generates more revenue anyways. It’s also why they generally don’t care if the HSR loses money, as it’s freeing up more lines for freight… which makes a lot more.


    Leave a Reply

    • (will not be published)

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    − 5 = four