Forward Proxy and Reverse proxy

Source: Internet
Author: User

The way to implement the proxy is to install the proxy Server software on the server, so that it becomes a proxy server, open source software is more popular is squid and nginx.

First, the forward agent

A forward proxy is a server between client A and the original Server B, in order to get content from the server, the user sends an HTTP request from the client to the proxy server and specifies the target server, then the proxy server forwards the request to the destination server and then returns the content to the client. Before this, the client wants to set up to use the forward proxy.

The forward proxy is the proxy server instead of the client to access the target server, why use a proxy server? This should start with the use of Proxy server.

1. Access to unreachable target server: If the client can not directly reach the server side of the possible intermediate routing failure, can only use proxy server to access the server instead of itself;

2. In order to speed up the speed of access: Possibly the client directly to the server side of the bandwidth than the proxy server to the server bandwidth is low;

3.Cache: Before the user accesses the server from the client, someone has already accessed the target server through the proxy server, so that the cached data will be persisted in the proxy server, so the user can get data directly from the proxy server;

4. The proxy server and the original server set up a firewall as a gateway, used to filter the extranet to its access, set access rights on the proxy server, allow a certain network access to the Internet, so that users can access the original server through a proxy server;

Second, reverse proxy

In the reverse proxy for the client proxy server It is like the original server, it does not know the existence of the real original server, the client does not need to make special settings.

The client sends the request to the content in the reverse proxy server's namespace (Name-space), and the reverse proxy server determines where (the originating server) forwards the request and returns the acquired content to the client.

Meaning of using reverse proxies:

1. Hide and protect the original resource server: There is a firewall between the proxy server and the original server, allowing only the proxy server to access the original host, so that the firewall and proxy server together protect the original resource server;

2. Enhance the security of the Web server: Proxy server as a Web server, the server does not save the real data of any Web page, so the static Web page or CGI programs are stored on the internal Web server, so the attack on the reverse proxy server will not cause the Web page information to be compromised ; Of course, the reverse proxy server can also be like a forward proxy server with the role of the cache;

3. Provide load balancing for back-end servers: Use the load balancing policy session to maintain or adjust the backend server performance uneven;

The difference between the two:

From the use of: the typical use of a forward proxy is to provide a way for clients to access the Internet in a local area network inside the firewall, whereas a reverse proxy is a server that provides access to Internet users behind a firewall;

From the security point of view: The forward proxy allows clients to access any Web site through it, so security measures must be taken to ensure that the authorized client is serviced, and the reverse proxy is transparent to the client and does not know that it is accessing a proxy server.

For a more detailed explanation see forum: http://bbs.51cto.com/thread-967852-1-1.html

Forward Proxy and Reverse proxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.