Reverse Proxy setup to serve users in China

2,020 views
Skip to first unread message

Albert

unread,
Nov 24, 2011, 7:25:51 AM11/24/11
to Google App Engine
Hi!

I have some questions regarding setting up a reverse proxy to serve
users in China.

1. Can I setup the reverse proxy such that it is only used when a
visitor is coming from China?
2. If the answer to above is "yes", how do I do that?
3. Do I also have to scale up the reverse proxy if I get many visitors
from china? How many requests can an average single reverse proxy
serve?

I would greatly appreciate any answers from anyone, especially from
someone who has is also doing this.

Thanks!

Brandon Wirtz

unread,
Nov 24, 2011, 7:54:11 AM11/24/11
to google-a...@googlegroups.com
You need a "Good" DNS provider to do Geographic DNS.
The scale of your Reverse Proxy is dependent on which one you use, the
number of pages you have to serve, and the cache length of those pages.
If you want your site to not get blocked by the GCFW you will need those
proxies to be in China.

Hi!

Thanks!

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


Albert

unread,
Nov 24, 2011, 11:49:07 AM11/24/11
to Google App Engine
Thanks for your reply.

I have some follow up questions, and I would greatly appreciate it if
you could point me towards the right direction.

1. Any suggestions on a "Good" DNS Provider for the geographic DNS?
2. Any suggestions on setting up proxies/servers in China? I can do
some research, but I'm thinking that you might already be using or
know of a good proxy/hosting service provider in China (if they are
not banned).

Thanks!

Will

unread,
Nov 24, 2011, 5:12:47 PM11/24/11
to google-a...@googlegroups.com
Hi Albert,
 
I set up a reverse proxy on amzon EC2 about a year ago, it works great. One micro linux instance with Apatch is enough for me, the average requests/sec of my site is about 10-15. You can scale up on EC2 easily I believe, though the daily peak CPU usage of my proxy is only about 20% for now.
 
HTH,
 
Will

 

Brandon Wirtz

unread,
Nov 24, 2011, 8:09:05 PM11/24/11
to google-a...@googlegroups.com

Only about 1/3 of china can reach you if you are on Amazon, and if you get assigned an IP that was previously used by a blocked service no one will reach you.  

 

Also be aware that there are days even weeks when parts of China blocks most of the US.  If your business model depends on China you need servers there.

Will

unread,
Nov 24, 2011, 8:37:30 PM11/24/11
to google-a...@googlegroups.com
Interesting. I've been using it for about a year and my users are from all over China. We even have resale partners from Beijing, Guangzhou, Shanghai, ChongQing, SiChuan, ShanDong. Most complains are because of service disruptions caused by M/S datastore, because after moving to HDR, the amount of complains decreased drastically.
 
Where is your statistics from? 
 
A server in China to bypass the GFW? Good luck, hahaha....
 
Best,
 
Will

Barry Hunter

unread,
Nov 24, 2011, 8:47:58 PM11/24/11
to google-a...@googlegroups.com

 
A server in China to bypass the GFW? Good luck, hahaha....


Give the server a Satellite Modem, then it can go up and over the great wall...  

Or is there radio jamming?

;)

Brandon Wirtz

unread,
Nov 24, 2011, 8:59:56 PM11/24/11
to google-a...@googlegroups.com

There is radio jamming actually. I was part of the Radio Free Asia group and one of the solutions we built before the internet opened up a bit in China was to park boats in international waters and broadcast in to China. So China would set up frequency jammers.

 

Later we built a solution for embedding text and audio in to the images contained on sites that were hosted in china and carried government sanctioned reporting of events but which if you had our software player would allow you to read the “real” accounts of those events.

 

Ah, Those were the days.

 

From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of Barry Hunter
Sent: Thursday, November 24, 2011 12:48 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Reverse Proxy setup to serve users in China

 

 

 

 

A server in China to bypass the GFW? Good luck, hahaha....

 

--

Will

unread,
Nov 24, 2011, 9:06:40 PM11/24/11
to google-a...@googlegroups.com
Yeah, some short wave radio frequencies are jammed constantly, e.g., VOA.
 
Satellite dish is officially illegal.
 
Want to host/create a forum? Submit your ID card and sign a document. If some posts on your forum are deemed as 'threats to the national stability', your very existence may be on line.
 
If you are an individual, or a small company, want to rent a server in China, good luck. Oh, even Google appears not big enough.
 
Freedom is a privilege.
 
Will

 

--

Will

unread,
Nov 24, 2011, 9:10:29 PM11/24/11
to google-a...@googlegroups.com
My hats off to you, Brandon.
 
Best,
 
Will

Andrin von Rechenberg

unread,
Nov 25, 2011, 8:31:59 AM11/25/11
to google-a...@googlegroups.com
Brandon for the win. Great story :)

Albert

unread,
Nov 26, 2011, 5:01:46 AM11/26/11
to Google App Engine
"Wow!" to your stories, Brandon. I never realized it was that tough...

Will, did you use a geographic DNS? Or did you route all your
requests through your EC2?

In my case, a little more accessibility to my site from China is good
enough. :)

Thanks!

On Nov 25, 4:31 pm, Andrin von Rechenberg <andri...@gmail.com> wrote:
> Brandon for the win. Great story :)
>
>
>
>
>
>
>
> On Thu, Nov 24, 2011 at 10:10 PM, Will <vocalster....@gmail.com> wrote:
> > My hats off to you, Brandon.
>
> > Best,
>
> > Will
>

> > On Thu, Nov 24, 2011 at 12:59 PM, Brandon Wirtz <drak...@digerat.com>wrote:
>
> >> There is radio jamming actually. I was part of the Radio Free Asia group
> >> and one of the solutions we built before the internet opened up a bit in
> >> China was to park boats in international waters and broadcast in to China.

> >> So China would set up frequency jammers.****
>
> >> ** **


>
> >> Later we built a solution for embedding text and audio in to the images
> >> contained on sites that were hosted in china and carried government
> >> sanctioned reporting of events but which if you had our software player

> >> would allow you to read the “real” accounts of those events.****
>
> >> ** **
>
> >> Ah, Those were the days.****
>
> >> ** **
>
> >> *From:* google-a...@googlegroups.com [mailto:
> >> google-a...@googlegroups.com] *On Behalf Of *Barry Hunter
> >> *Sent:* Thursday, November 24, 2011 12:48 PM
>
> >> *To:* google-a...@googlegroups.com
> >> *Subject:* Re: [google-appengine] Reverse Proxy setup to serve users in
> >> China****
>
> >> ** **
>
> >> ** **
>
> >> ** **
>
> >>  ****
>
> >> A server in China to bypass the GFW? Good luck, hahaha....****
>
> >> ** **
>
> >> ** **


>
> >> Give the server a Satellite Modem, then it can go up and over the great

> >> wall...  ****
>
> >> ** **
>
> >> Or is there radio jamming?****
>
> >> ** **
>
> >> ;)****


>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-a...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengi...@googlegroups.com.
> >> For more options, visit this group at

> >>http://groups.google.com/group/google-appengine?hl=en.****

Will

unread,
Nov 28, 2011, 11:01:53 PM11/28/11
to google-a...@googlegroups.com
No, I don't use a geographic DNS, just simply redirect all requests by a micro EC2 instance.

Albert

unread,
Nov 29, 2011, 3:15:50 AM11/29/11
to Google App Engine
Got it! Thanks!

Albert

jon

unread,
Nov 30, 2011, 12:29:00 AM11/30/11
to Google App Engine
What I'm about to suggest may be completely silly as I have zero
experience in this sort of stuff, but what about setting up a proxy in
Hong Kong?

According to Wikipedia ( http://en.wikipedia.org/wiki/Internet_censorship_in_the_People's_Republic_of_China
) the Great Firewall of China doesn't apply in Hong Kong, and I assume
connections from China to Hong Kong aren't interfered with?

Brandon Wirtz

unread,
Nov 30, 2011, 1:00:25 AM11/30/11
to google-a...@googlegroups.com
Sorry I forgot about this thread.

http://www.hktechnology.com/

we use them they work well, and yes Hong Kong is a good place to be, you can
get filtered but usually only if you piss people off. If you really are
going to do business in china (more than $250k a year) Hire someone, $25k a
year and get an office ($6k a year) Give the person a title like "Enterprise
Liaison" have them as a phone contact, and email contact. They don't need to
do anything except sit there.

We hired a beautiful 20 something who also spoke enough English to get
through phone calls. This also helps with filling out forms that the
Chinese Government likes to send, many of which ask things like "Does your
web site express views of the X political party" "Discuss the features of
your web site that allow mass communication between users". (and yes
beautiful was a factor in hiring her, if you are going to pay someone to
fill out 3 forms a year and answer the phone you might as well have them
look good enough to put their picture on your website)

They send about 3 of these a year.

-----Original Message-----
From: google-a...@googlegroups.com
[mailto:google-a...@googlegroups.com] On Behalf Of jon
Sent: Tuesday, November 29, 2011 4:29 PM
To: Google App Engine

jon

unread,
Dec 1, 2011, 12:22:44 AM12/1/11
to Google App Engine
Thanks Brandon for sharing all that. Very insightful.

> According to Wikipedia (http://en.wikipedia.org/wiki/Internet_censorship_in_the_People's_Repu...

Albert

unread,
Dec 1, 2011, 2:42:57 AM12/1/11
to Google App Engine
Thanks so much, Brandon!

> According to Wikipedia (http://en.wikipedia.org/wiki/Internet_censorship_in_the_People's_Repu...

Cyle Hunter

unread,
Nov 29, 2014, 1:19:37 AM11/29/14
to google-a...@googlegroups.com
I realize this thread is a little dated now, but FWIW, IBM now offers cloud hosting in Hong Kong. See here: https://www.softlayer.com/Store/orderComputingInstance/1640,1644,2202
Reply all
Reply to author
Forward
0 new messages