Difference between proxy server and reverse proxy server
代理服务器和反向代理服务器有什么区别?
The previous answers were accurate, but perhaps too terse. I will try to add some examples.
First of all, the word "proxy" describes someone or something acting on behalf of someone else.
In the computer realm, we are talking about one server acting on the behalf of another computer.
For the purposes of accessibility, I will limit my discussion to web proxies - however, the idea of a proxy is not limited to web sites.
FORWARD proxy
Most discussion of web proxies refers to the type of proxy known as a "forward proxy."
The proxy event in this case is that the "forward proxy" retrieves data from another web site on behalf of the original requestee.
A tale of 3 computers (part I)
For an example, I will list three computers connected to the internet.
Normally, one would connect directly from X --> Z.
However, in some scenarios, it is better for Y --> Z
on behalf of X
, which chains as follows: X --> Y --> Z
.
Reasons why X would want to use a forward proxy server:
Here is a (very) partial list of uses of a forward proxy server.
1) X is unable to access Z directly because
a) Someone with administration authority over X
's internet connection has decided to block all access to site Z
.
Examples:
The Storm Worm virus is spreading by tricking people into visiting familypostcards2008.com
, so the system administrator has blocked access to the site to prevent users from inadvertently infecting themselves.
Employees at a large company have been wasting too much time on facebook.com
, so management wants access blocked during business hours.
A local elementary school disallows internet access to the playboy.com
web site.
A government is unable to control the publishing of news, so it controls access to news instead, by blocking sites such as wikipedia.org
. See TOR or FreeNet.
b) The administrator of Z
has blocked X
.
Examples:
The administrator of Z has noticed hacking attempts coming from X, so the administrator has decided to block X's ip address (and/or netrange).
Z is a forum web site. X
is spamming the forum. Z blocks X.
REVERSE proxy
A tale of 3 computers (part II)
For this example, I will list three computers connected to the internet.
Normally, one would connect directly from X --> Z.
However, in some scenarios, it is better for the administrator of Z
to restrict or disallow direct access, and force visitors to go through Y first. So, as before, we have data being retrieved by Y --> Z
on behalf of X
, which chains as follows: X --> Y --> Z
.
What is different this time compared to a "forward proxy," is that this time the user X
does not know he is accessing Z, because the user X
only sees he is communicating with Y
. The server Z
is invisible to clients and only the reverse proxy Y
is visible externally. A reverse proxy requires no (proxy) configuration on the client side.
The client X
thinks he is only communicating with Y
( X --> Y
), but the reality is that Y
forwarding all communication ( X --> Y --> Z
again).
Reasons why Z would want to set up a reverse proxy server:
In the above scenarios, Z
has the ability to choose Y
.
Links to topics from the post:
Content Delivery Network
forward proxy software (server side)
reverse proxy software for HTTP (server side)
reverse proxy software for TCP (server side)
see also:
A pair of simple definition would be
Forward Proxy: Acting on behalf of a requestor (or service consumer)
Reverse Proxy: Acting on behalf of service/content producer.
I found this diagram to be very helpful. It just shows the architecture of a forward
vs reverse
proxy setup from client to server over the Internet. This image will help you to understand qyb2zm302's post and other posts better.
You can also watch this video from F5
's DevCentral
by Peter Silva.
Picture Source: Quora. All credits to the person who created this diagram.
It reminded me of the classic proverb:
A picture is worth 1000 words.
链接地址: http://www.djcxy.com/p/2850.html上一篇: 为什么Chrome和Firefox处理jQuery ajax()回调中的javascript变量集的方式不同?
下一篇: 代理服务器和反向代理服务器之间的区别