Our project is hosting at AWS Singapore. Customers in China always complain the speed is very slow, or even can't access from time to time.

Some IT expert suggest that we should host our project in Hong Kong, with dedicated China bandwidth. I wonder if this is going to work, because 2 years ago, we had another project hosting in Hong Kong with 1MB dedicated China bandwidth, but having similar issue.

I am having a business trip at Yunnan (雲南). We stay at Kunming (昆明), Dali (大理), Shaxi (沙溪) and Lijiang (麗江). It surprise me that China network is not that slow. Mobile 4G with nice speed, everywhere have free WiFi. Although WiFi security settings are all crap (no guest network, no client isolation, no firmware upgrade...), but the speed is not bad. Most of them are using ADSL modem, download speed from 10-50M, and upload from 1-10M. If compare with Hong Kong, of coz it is fucking slow, but the speed should be more than enough for visiting our website.

So WTF is going on?

I tested on many different location, most of them can't access our website, I usually need to reload ~5 times before success. After that the speed to Singapore server is actually not that bad (~200ms). The problem is DNS resolve! Open console, try "nslookup mydomain.com", it always return SERVFAIL... The quality of DNS server set by WiFi router is varies. We can't expect client hardcode a good DNS server IP in their devices. Moreover in China, they can't use Google DNS and OpenDNS...

We are using AWS Route53 for our domains' name server. The performance is so poor in China really disappointed me, but I understand that is not their fault.

Fix it!

I decisive change our DNS name server away from Route53 to a China DNS service. I just found two available which are Wanwang (by Aliyun) and DNSPod, both free. I picked Wanwang because most of the China domain is register and park there, it should be good in China.

Wanwang recently bought by Aliyun. I try to create an account but failed N times, either it fail to send email to my gmail, or show me "timeout" at final step registration. I try again with the same email, it said that "email" is used but the registration is incomplete, ask me to continues. So I click the link to continues my registration, it bring me to an 404 error page, fuck it.

Suddenly I got the email from Wanwang, click on the link in the email and the account setup is done... I migrate all the DNS records from AWS Route53 to Wanwang, then change the domain name server to Wanwang, it works like magic.

The DNS resolving speed is not as fast as Google, but at least it resolve in 1st try. Lucky we don't need to move our servers back to China, and we can keep using AWS great services.