nginx Proxy agent forward proxy reverse proxy

1, Acting Principle
  • Reverse Proxy background of:

    In the computer world, since a single server handling the client (user) has the ability to request a limit, when a user's access request flocking, and cause the server busy situation, you can use multiple servers to be shared many thousands of user requests, these servers provide the same service for users, simply do not feel any difference.

  • Reverse proxy service implementations:

    Requires a load balancing device (i.e., a reverse proxy server) to distribute the user request, the request is distributed to the user free server.

    The server returned their service to the load balancing device.

    Server load balancing device will return to the service user.
    Here Insert Picture Description
    Here Insert Picture Description
    2, forward / reverse proxy difference

So the question is, then many people will ask what is a reverse proxy? Why is it called a reverse proxy? What is a forward proxy? Let's illustrate

  • Forward proxy:
  • Forward proxy process to hide the true client's request, the server does not know who the real client, the client requested services are replaced by the proxy server requests. We often say that the agent is forward proxy, forward proxy agent is requesting party is the client; for example, we want to access youtube, but can not access, can only install a software on your behalf to visit FQ, FQ by software to access, FQ software known as forward proxy.
    -Here Insert Picture Description

Reverse Proxy:

The process of reverse proxy hides the real server, the client does not know who the real service delivery, client service requests are processed proxy server. Reverse proxy is a proxy responder, which is the server; we request that www.baidu.com www.baidu.com is a reverse proxy server, provide services of real servers have a lot of units, we will reverse proxy server the sub-forwarding requests each server to provide services to the real. Nginx is very good performance reverse proxy server to do load balancing.

Www.baidu.com forward proxy access process is
Here Insert Picture Description
a reverse proxy, proxy server belong to the same LAN and
Here Insert Picture Description
the forward and reverse proxy agent schematic comparison

Forward proxy object proxy client, proxy, and client belong to a LAN, transparency of the server;

Reverse proxy object is a proxy server, proxy server, and belong to the same LAN, transparency of the client
Here Insert Picture Description
Here Insert Picture Description

3, knowledge Extensions 2
  1. HTTP Server and Application Server differences and connections

    Apache / nignx static server (HTTP Server):

    Nginx advantages: load balancing, reverse proxy, static files advantage. nginx static process requests faster than Apache;

    Apache advantage: Tomcat server for static files relative to its advantage fast. Apache is static resolution, suitable for static HTML, images and so on.

    HTTP Server HTTP protocol is concerned about the level of transmission and access control, so the Apache / Nginx you can see the proxy, load balancing and other functions

    HTTP Server (Nginx / Apache) used to do static content services, and the proxy server forwards the request to the back of the foreign application services (tomcat, jboss, jetty, etc.).

    The application server (tomcat / jboss / jetty) is a dynamic server (Application Server):

    Application Server Application Server, is a container application execution. It first needs to support the development of language Runtime (for Tomcat, it is Java, if you use other language development Ruby / Python, etc. can not be run directly on Tomcat).

  2. But things are no absolutes, for convenience, the application server (such as tomcat) also tend to integrate the functions of HTTP Server, nginx can also be provided by the application function module development, but not as good as professional HTTP Server so powerful, so application servers often run after behind HTTP Server, the application execution, the dynamic content into static content, distributed to clients via HTTP Server.

  3. Popular open source cluster software: lvs, keepalived, haproxy, nginx, apache, heartbeat

    Common commercial cluster hardware: F5, Netscaler, Radware, A10, etc.

Published 48 original articles · won praise 18 · views 3654

Guess you like

Origin blog.csdn.net/wx912820/article/details/104855923