HTTP protocol Advanced (vi) proxy

Source: Internet
Author: User
Tags http redirect ftp access

The Web Proxy server is the intermediary entity of the network, between the client and the server, playing the role of "middleman", the function is to send messages back and forth between the endpoints.

The principle is: The client sends the request message to the proxy server, the proxy server handles the request and the connection correctly, and then returns the response, and the proxy server itself sends the request to the Web server and receives the response.

That is: The agent is the server, and the client . As shown in the following:

I. Types of agents

1. Private Agent

Definition: A single client-only proxy is known as a private agent.

Private proxies are not common, but they do exist, such as some browser-assisted products, and some ISP services run small proxies directly on the user's PC to extend browser features, improve performance, or provide host ads for free ISP services.

2. Public agent

Definition: A proxy shared by multiple clients is called a public agent, also known as a "centralized proxy."

Advantages: cost savings, higher efficiency, convenient management, such as: "Cache proxy Server."

Second, the difference between the agent and gateway

Proxy: Connect two or more applications that use the same protocol;

Gateway: Connects two or more endpoints using different protocols (which can be understood as "protocol converters");

The same point: the difference between the agent and the gateway is very vague, the agent will often do some protocol conversion work, such as: Support SSL protocol, SOCKS firewall, FTP access and so on.

As shown in the following:

Three, the characteristics of the agent

1. Resource access Control

Use the filter agent for Identity authorization authentication, or use a proxy server to achieve a unified access control policy between a large number of Web servers and resources, create an audit trail mechanism, configure all access control functions, especially in large environments or other distributed mechanisms of service.

2. Improve safety

Using a proxy server to restrict which application layer protocol data can flow in or out on a single security node in the network, you can also provide a hook-up program for certain precautions and anti-virus to allow for detailed checks of traffic.

3. Web Caching

A cache server can be used to maintain a local copy of a common resource and provide it on demand to reduce connectivity, shorten connection latencies, and improve performance.

4. Reverse Proxy

The agent can act as the server's role to receive real requests sent to the Web server, or to initiate communications with other servers to locate the requested content on demand, and reverse proxies can be used to improve performance when accessing public resources on the Web server.

or use it with the content routing feature to create a distributed network.

5. Content Routers

A proxy server can be used as a "content router", directing requests to specific Web servers (like load Balancing) based on Internet traffic and content types, and can also be used to implement various service-level requests.

6. transcoding device

The proxy server can also modify the content's principal format before sending the content to the client, and transparently convert it, which we call transcoding (such as changing the image format, file encoding type, etc.).

7. Anonymous

Proxies can be used to remove identity features (such as IP, cookies) from HTTP messages, providing a high degree of privacy and security.

Iv. Deployment of proxy servers

1. Export Agent

Pin the agent at the local network exit point to control traffic between the local network and the large Internet, provide firewall protection against malicious attacks outside the enterprise, or reduce bandwidth costs to improve performance.

2. Access (entrance) agent

The agent is placed on the ISP access point to handle aggregate requests from the client, and the ISP uses the cache proxy to store frequently used copies of resources, increasing user download speeds, reducing bandwidth consumption, and so on.

3. Reverse Proxy

Deploy the agent at the network edge, before the Web server, to handle all requests to the Web server as a reverse proxy, and only request resources to the Web server if necessary; Reverse proxies can improve server security and performance.

4, Network Exchange agent

Place a proxy server with sufficient processing power on a peer exchange point on the network, reduce network congestion through caching, and monitor traffic.

5. Level Agent

The proxy is cascaded through the hierarchy of agents, either statically or dynamically, until the message is sent to the original server.

is a hierarchy of level three agents:

is a static dynamic agent-combined structure:

6, a number of common dynamic selection of the parent agent mode

①, load Balancing

The sub-agent may decide how to select a parent agent based on the workload level on the current parent agent to achieve load balancing.

②, near the location of the route

The child agent may choose to be the parent agent responsible for the physical region where the original server resides.

③, protocol/type routing

The sub-agent may forward the message to a different parent agent and the original server based on the URI, and some specific types of URIs may want to forward the request through some special proxy server for special protocol processing.

④, subscription-based routing

If publishers pay extra for high-performance services, their URIs are forwarded to a large cache or compression engine to improve performance.

PS: In different products, dynamic parent routing logic is implemented in different ways, including the use of configuration files, scripting languages, and dynamic executable plugins.

V. How the agent obtains traffic

1. Modify Client Configuration

Many Web clients support both manual and automatic proxy configuration, and if the client is configured to use a proxy server, the client sends the HTTP request directly to the proxy instead of the original server.

2, modify the network, intercept agents

relies on switching devices and routing devices that monitor HTTP traffic, intercepts them without the client's knowledge, and imports traffic into an agent.

3. Reverse Proxy

Modify the DNS namespace, posing the name and IP address of the original server so that all requests are sent to these reverse proxy servers instead of the original server.

4. redirect

Some Web servers can be configured to send an HTTP REDIRECT command to the client, redirect client requests to an agent, and when the redirect command is received, the client communicates with the agent.

The above is about the HTTP protocol agent related to some of the content collation, involving specific implementation and other aspects, you can access or learn the relevant specific information ...

HTTP protocol Advanced (vi) proxy

Related Article

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.