Amazon Web Services (AWS) is a division of Amazon Inc. which provides Infrastructure As A Service (IAAS) services to external customers. IAAS is a pay-per-use model for purchasing computing, storage and networking services from the ‘cloud’.

Even thought AWS does not have a data center in Mainland China many startups aimed at the Chinese market will still decide to use the AWS services, at least in the initial stages.  The reasons for China startups using AWS can be summarized into 4 categories:

  1. The startup is not incorporated in China (need a company to register Chinese website, rent server etc)
  2. Existing AWS skills within the startup team
  3. Taking advantage of the AWS 12 month free tier
  4. Taking advantage of the cheaper rates compared to Mainland China’s nearest equivalent, Aliyun

Recently I have had discussions about which AWS data center provides the best service into Mainland China, so today I decided to do some testing and document the process and results here to share with everyone.

I was firstly sidetracked by this amazing mashup created by Alon Swartz, showing the location of AWS datacenters and a plot of the undersea telecommunications cables for reference.  While the algorithm and UI still needs some work, the thickness and color of the cable provides a good visual indication of speed/latency to your intended location. Click the image to view the interactive mashup.

aws-datacenters

This diagram is a great start but it doesn’t take into account the many network factors present.  Time to start empirical testing.

Cloudping.info is a great site for simple testing of pings to all the AWS datacenters.  This is a short ping test so I recommend running it a few times, and testing at different times of the day to see the different results.  I have included some of my screenshots from Cloudping.  FYI I am based in Shanghai City, my ISP is China Telecom.  One of the tests below is with my VPN connected, the VPN server is located in San Francisco.

cloudping-novpn

Using Cloudping.info from my desktop. 10pm China time.

cloudping-vpn

Using cloudping.info from my desktop with VPN connected. 10pm China time.

The below screenshot is from my iPhone using China Unicom 3G

IMG_0765[1]

Using iPhone through China Unicom 3G. 1.45pm China time.

Of course you should not compare results across the tests as there are various hardware and other factors which I have not removed.  Within each test, however, you can compare the network latency results.  The debate is usually whether AWS’ Singapore or Tokyo Data Center is faster for China.  In fact during my testing today Singapore data center result remained constant over multiple tests (70mS), however the Tokyo Data Center result varied widely (between 40 – 300+ mS).

The above results made me suspect the server being targeted in Tokyo was possibly under load, leading to the big swings in latency.  Without being able to analyse this test further I searched for another test.

I found this site called site24x7 which allows ping tests from multiple locations around the world.  I decided to target two websites in China to test the latency.  The first website is based in Shanghai on the China Telecom network, the Shanghai Municipal Transport Safety Bureau website (www.shjtaq.com).  In this result you can see the Tokyo latency (77mS) is significantly lower than latency from Singapore (201mS).  To access the permalink from my test and see the full results click here.

site24x7-shjtaq

Using site24x7 to test network latency into Shanghai based shjtaq.com. 10.40pm China Time.

The second website is based in Beijing on the China Unicom network, the Ufida website (www.ufidacom.cn).  In this result you can see that Tokyo (87mS) is faster thank Singapore (131mS).  To access the permalink from my test and see the full results click here.

site24x7-ufida

Using site24x7 to test network latency intoBeijing based ufida.com.cn. 11.40pm China Time.

Based on the total evidence presented above it would appear Tokyo is the clear winner with latency sometimes less than half the latency for Singapore.  Unfortunately Tokyo is also the most expensive AWS datacenter.  If costs are of real concern then Singapore would be the second option, with California (US-West) a close third in speed and also having the cheapest AWS rates.

If you are interested to ping a server located in the Tokyo AWS datacenter you can ping Technode (www.technode.com).

While my testing strategy is not very thorough, I hope it can provide useful inputs to those interested in this topic.  I would also like to hear about other test strategies and the results.