1) 概念

代理服务器: 代理内部网络去访问外部Internet的连接请求

反向代理服务器: 代理外部网络上的主机访问内部网络

反向代理在外部就被当作一个web服务器,而外部却不需要配置直接当作web服务器访问,但是这个反向代理没有保存网页真实数据,所有的资源都保存在内部的web服务器上,这样即使攻击了反向代理,却不会更改资源,从而加强安全

2) Difference

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.

  • X = your computer, or "client" computer on the internet
  • Y = the proxy web site, proxy.example.org
  • Z = the web site you want to visit, www.example.net

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 myspace.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 TORor 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.

  • X = your computer, or "client" computer on the internet
  • Y = the reverse proxy web site, proxy.example.com
  • Z = the web site you want to visit, www.example.net

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 Y. A Reverse Proxy is typically less visible than a "forward proxy", and requires no configuration or special knowledge by the client, X.

The client X probably thinks he is visiting Z directly (X --> Z), but the reality is that Y is the invisible go-between (X --> Y --> Z again).

Reasons why Z would want to set up a reverse proxy server:

  • 1) Z wants to force all traffic to its web site to pass through Y first.

    • a) Z has a large web site that millions of people want to see, but a single web server cannot handle all the traffic. So Z sets up many servers, and puts a reverse proxy on the internet that will send users to the server closest to them when they try to visit Z. This is part of how the Content Distribution Network (CDN) concept works.

      • Examples:

        • Apple Trailers uses Akamai
        • Jquery.com hosts it's javascript files using CloudFront CDN (sample).
        • etc.
  • b) The administrator of Z is worried about retaliation for content hosted on the server, and does not want to expose the main server directly to the public.
    • a) Owners of Spam brands such as "Canadian Pharmacy" appear to have thousands of servers, while in reality having most websites hosted on far fewer servers. Additionally, abuse complaints about the spam will only shut down the public servers, not the main server.

In the above scenarios, Z has the ability to choose Y.

Links to topics from the post:

Content Delivery Network

  • Lists of CDNs

    • http://www.mytestbox.com/miscellaneous/content-delivery-networks-cdn-list/
    • http://blog.streamingmedia.com/the_business_of_online_vi/2008/01/updated-list-of.html

forward proxy software (server side)

  • cgi-proxy
  • phproxy (discontinued)
  • glype
  • Internet censorship wiki: List of Web Proxies

reverse proxy software for HTTP (server side)

  • apache mod_proxy (can also work as a forward proxy for HTTP)
  • squid
  • nginx (written by russians, used on hulu.com, spam sites, etc.)
  • HAProxy
  • lighthttpd
  • perlbal (written for livejournal)
  • portfusion
  • pound
  • varnish cache (written by a freebsd kernel guru)
  • repose

reverse proxy software for TCP (server side)

  • balance
  • delegate
  • pen
  • portfusion
  • pure load balancer (web site defunct)
  • python director

see also:

  • Wikipedia - Content Delivery Network
  • Wikipedia - Category:Reverse_proxy
  • Wikipedia - Load Balancing
  • Wikipedia - Scalability

转载: http://stackoverflow.com/questions/224664/difference-between-proxy-server-and-reverse-proxy-server

代理服务器和反向代理服务器相关推荐

  1. python反向代理服务器_主机、服务器,代理服务器,反向代理服务器理解(自用)...

    一.服务器和主机 当用作网络服务的机子时叫服务器.必须具有承担服务并且保障服务的能力,为其他网络设备提供网络服务. 最简单的一句话:主机和服务器是相对而言的. 专业的服务器的配置是很高的,不过本身从硬 ...

  2. 代理服务器与反向代理服务器的区别

    说到代理服务器,大部分人都应该比较熟悉了.记得在学校的时候因为校园网无法访问国外网站,因此经常使用代理来访问国外的网站.但是提到反向代理服务器可能大部分人就比较陌生,对于一般的代理服务器与反向代理服务 ...

  3. 手机配置网络代理服务器_两张图简说代理服务器和反向代理服务器

    代理服务器通常分为两类,即转发代理(forward proxy)服务器和反向代理(reverse proxy)服务器.转发代理服务器又通常简称为代理服务器,我们常提到的代理服务器就指的是转发代理服务器 ...

  4. 代理服务器和反向代理服务器详解

    通常我们所说的代理,都是指的客户端向外界发起请求时,并不是直接与目标服务器连接,而是经过一个代理服务器,将所有请求交给代理服务器,由它去负责连接外界的目标服务器,同时从服务器返回的数据,也经过代理服务 ...

  5. 正向代理服务器和反向代理服务器的区别

    正向代理是一个位于客户端和原始服务器(origin server)之间的服务器,为了从原始服务器取得内容,客户端向代理发送一个请求并指定目标(原始服务器),然后代理向原始服务器转交请求并将获得的内容返 ...

  6. 什么是反向代理服务器

    我们常会看到'反向代理服务器'这个名词,例如常看到文章上说 nginx 是一个反向代理服务器.varnish 是一个反向代理服务器 -- 下面就了解下这个概念 含义 '反向代理服务器' 有两个概念,一 ...

  7. 反向代理服务器的工作原理

    最近接触了nginx,nginx可以作为一个反向代理服务器完成负载均衡,下面记录一下从网上学习到的一些知识. 一  概述 反向代理(Reverse Proxy)方式是指以代理服务器来接受Interne ...

  8. 反向代理服务器(Reverse Proxy)

    反向代理服务器(Reverse Proxy) 普通代理服务器是帮助内部网络的计算机访问外部网络.通常,代理服务器同时连接内网和外网.首先内网的计算机需要设置代理服务器地址和端口,然后将HTTP请求发送 ...

  9. 深刻理解:反向代理服务器

    很久以前,老王去饭店吃饭,需要先到饭店,七荤八素点好菜,坐等饭菜上桌,然后大快朵颐,不亦乐乎. 有了第三方订餐外卖平台(代理),老王懒得动身前往饭店,老王打个电话或用APP,先选好某个饭店,再点好菜, ...

  10. 【大型网站技术实践】初级篇:借助Nginx搭建反向代理服务器

    一.反向代理:Web服务器的"经纪人" 1.1 反向代理初印象 反向代理(Reverse Proxy)方式是指以代理服务器来接受internet上的连接请求,然后将请求转发给内部网 ...

最新文章

  1. 从网页模版切图到网页生成全攻略(转)
  2. php和python写爬虫-为什么选择用python做爬虫
  3. Swift中使用构建配置来支持条件编译-b
  4. hibernate笔记--缓存机制之 一级缓存(session缓存)
  5. 关于ASP.NET动态加载Master页面
  6. Leetcode--122. 买卖股票的最佳时机Ⅱ
  7. macbook历代_苹果MacBook Pro为什么越来越贵?历代回顾与新MBP简评
  8. ubuntu 16源码安装zabbix4.2
  9. Active Directory 灾难恢复
  10. 微信公号“架构师之路”学习笔记(七)-互联网搜索架构设计
  11. 小游戏市场被微信点燃,社交平台蜂拥而至谁能分到蛋糕?
  12. 阿里云中标“金关工程二期”大数据云项目,总金额8568万!(含标单)
  13. 深度学习论文: Slicing Aided Hyper Inference and Fine-tuning for Small Object Detection及其PyTorch实现
  14. Linux --配置网络(通过网络访问服务器)
  15. springcloud入门——config分布式配置中心
  16. Oracle ERP AP模组中Vender 联系人信息查询语句
  17. 64位win7下安装keras的过程
  18. 如何修改PDF并调整页面尺寸大小
  19. RO,RW,ZI,FLASH,RAM前世今生
  20. 工作流引擎添新丁:Flowable6.0发布

热门文章

  1. ASP.NET Repeater控件使用方法
  2. HTML二级下拉菜单自动联动,html二级联动下拉菜单 [Excel函数如何制作二级联动下拉菜单]...
  3. Python专栏 | ICA应用:如何识别伪影信号?(一)
  4. 谈谈web打印快递单及经验
  5. 计算机网络维护服务承诺书,网络信息技术中心服务承诺书
  6. Idea部署dubbo-admin
  7. ue4是什么意思_u3d和ue4的区别是什么
  8. python 按行读取_python按行读取
  9. 大白菜超级U盘启动制作工具V2.0(网络增强版)
  10. 千千静听界面模拟(C#)