How to speed up connection with a server in China

chinanetworkingoptimizationPROXY

I have a EC2 server in China using Amazon AWS China.

It's a server with : Apache 2 and PHP The database is a RDS instance running MySQL (also in china)

The problem: Access from out of China is very slow. (tested from australia, france and Canada). Yes, the server has to stay in China 🙂

From inside China, access time is perfect.

I also have to refine this problem a bit more: what is slow ? The Bandwidth china <> china is what AWS advertise. The bandwidth outside-china <> china is very very bad. Can go down to as low as 2ko/sc. It can also work fine… it's very random.

Just to be clear, i even tried a realy big server just in case it made difference to the network… to no avail.

The latency (let's ping) is also very slow for a connection to reach China.

So, the first solution i have tried is to setup a reverse proxy (Varnish) with nginx in front (to manage ssl) in a Hong-Kong server. I am trying this because i can get a good access time to Hong-Kong from both China and the Rest of the world.

Now, the application hosted in China on the EC2 server is an Intranet. So very hard to cache anything else than JS, CSS and Pictures. (and those are done with varnish also, and works good)

I did think that perhaps a reverse proxy would be quicker than a direct access, but not very succesfull as yet.

What solutions do i have ? I need to make this website / intranet faster from anywhere is the world and the server has to stay in china.

i am open to any ideas, like: is squid better for this ? a vpn server ?

Notes: It's not a software problem of the intranet. Even with only 1 person it's slow and never more than 20 people on at same time.

Many thanks for any suggestions and advice.

Best Answer

The "Great Firewall" is filtering all connections into and out of China. Generally, all connections suffer, there's a lot of packet loss as well.

As long as the Chinese don't change this (highly unlikely) there's next to nothing you can do. You can speed up content delivery by content caching (e.g. caching proxy) but you can't speed up functionality. Set up a server outside China.

see also: https://en.wikipedia.org/wiki/Great_Firewall

Related Topic