Where to put your web server if your users are in both US and China?

1 min read

Our literature altert app Stork has many users in US and China. Our server is located in US West (silicon valley), and it’s been fast. But recently we got more and more complaints from China users that it’s slow to load our website and sometimes the connection even failed.

We need to find a solution. There are a few options, from easy to difficult:

  1. We can migrate the server to a location where both China and US users can access reasonably fast. Still single server and the same domain name.
  2. We can have one server in mainland China (say Beijing) serving China users only, and the US server to serve the rest of world. We use the same domain name but make it “smart” so it redirects users to the appropriate server.
  3. Similar to #2, but we use two different domain names, one for China and the other for the rest of the world.

Obviously option 1 is most attrative – if we can find such a location. To this end, we created 8 test servers in different locations and test the connection from US West and China (Beijing). Here is the result:

Latency to 8 servers

And the same data in a table (numbers are latency in seconds):

Server LocationFrom US WestFrom Beijing
US West0.839.0
US West4.332.3
US West0.134.5
China (Beijing)737.14.4
Hong Kong3.40.7
China (Beijing) 22.00.1

We can see that the connection from China to most other countries is very slow, and connection from US to most other countried are fast except to China. So internet wise, China and US are practically disconnected!

The latency between China and US (West) is dependent on time.

The latency between China and US (West) is dependent on time. In the plot above, you can see that the latency is actually fairly small during the night time in China (note that the unit of the time in the above plot is UTC). The variation of latency suggests that we can’t measure the connection speed just at one time point.

But there is one exception which gives us hope. It’s Hong Kong! Its connection to Beijing is fast, and to US is reasonable. So it’s a good choice to choose Hong Kong. Actually we did this and the result is pretty good. Both our China users and users from other regions can access our website reliably and reasonably fast.

So if you have a significant number of users or customers in China, you may consider to host your web server in Hong Kong.


Want to receive new post notification? 有新文章通知我

ChatPaper makes reading difficult papers easy

Today I am going to introduce you ChatPaper. Reading papers is a necessary but arduous task that requires a lot of energy. Many terms and acronyms require us to do additional search, and almost every paragraph leaves us with questions. It would be gr
Xu Cui
1 min read


介绍一下我们的“ChatPaper”高级功能。(可以试用) 做科研,有件事非常累,但是又不得不做,那就是读文献。许多术语要另起窗口查询,而几乎每读一段都有一些疑问。加上我们的母语不是英语,语言又是另一
Xu Cui
3 sec read


介绍一下我们的“听文献”高级功能。(试听朗读效果) 我们知道,科研工作往往需要处理大量的文献。然而,在忙碌的工作中,有时候您可能会发现没有足够的时间阅读最新的文献,或者在开车、坐车或者疲劳的时候无法集
Xu Cui
0 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *