当前位置:网站首页>正向代理和反向代理快速理解
正向代理和反向代理快速理解
2022-07-01 01:01:00 【御剑长歌】
正向代理(Forward Proxy)
正向代理是指用户利用代理服务器访问目标服务器
代理服务器面向用户
常见情景
加速访问
像游戏加速器,各种代理软件,就是利用正向代理的原理。例如访问 GitHub, 原本的网络访问速度会比较慢,通过国外的代理服务器就可以达到加速的目的。代理访问
软件开发中,对接了一些服务,服务设置了 ip 白名单,只能通过特定 ip 去访问服务,这时通过代理的方式就可以从本地请求,方便开发与测试。
反向代理
正向代理代理的是用户,而反向代理则相反,代理对象是目标服务器,是指服务端利用代理服务器给用户提供服务。
和正向代理相比,二者都是利用代理服务器实现的,不过反向代理的主语是服务端,所以说反向代理对于用户来说是透明的,在用户的视野里,代理服务器便是目标服务器。

企业级应用中都为后端服务配置反向代理,例如常见的 nginx ,还有 LVS/F5 等。
总结
正向代理需要客户端来配置,一般来说我们会通过浏览器或者操作系统提供的工具或者界面来配置。这个时候,代理对客户端不是透明的,客户端需要知道代理的地址并且手动配置。配置了代理,浏览器在发送请求的时候会对报文做特殊的修改。
反向代理对客户端是透明的,也就是说客户端一般不知道代理的存在,认为自己是直接和服务器通信。我们大部分访问的网站就是反向代理服务器,反向代理服务器会转发到真正的服务器,一般在反向代理这一层实现负载均衡和高可用的功能。而且这里也可以看到,客户端是不会知道真正服务器端的 ip 地址和端口的,这在一定程度上起到了安全保护的作用
边栏推荐
- Basic knowledge 3 - standard unit library
- Gin configuration file
- Working for eight years as a programmer, but with a salary of three years after graduation, it's too late to be enlightened again
- 医疗HIS行业短信发送解决方案
- System settings large page
- Pre training / transfer learning of models
- Uniapp official component clicking item is invalid, solution
- Basic knowledge II - Basic definitions related to sta
- PHP array splicing MySQL in statement
- qt5-MVC:数据可视化的层次揭秘
猜你喜欢

Institute of Microbiology, commonly used biochemical reactions in microbiological testing

短信在企业中的应用有哪些?

Compile and install oh my Zsh

Unknown database connection database error

Microbiological health, why is food microbiological testing important

Neo4j installation, operation, project construction and function realization

医疗HIS行业短信发送解决方案

Ks009 implementation of pet management system based on SSH

DC學習筆記正式篇之零——綜述與基本流程介紹

Using recyclerreview to show banner is very simple
随机推荐
那些一门心思研究自动化测试的人,后来怎样了?
远程办公如何保持高效协同,实现项目稳定增长 |社区征文
Lecun, a Turing Award winner, pointed out that the future of AI lies in self-learning, and the company has embarked on the journey
The argument type 'function' can't be assigned to the parameter type 'void function()‘
Thinking about business and investment
Composants de la grille de données portatifs
[queue] 933 Number of Recent Calls
More pragmatic in business
微研所,微生物检验中常用的生化反应
laravel+redis 生成订单号-当天从1开始自增
Unknown database连接数据库错误
测试必备工具—Postman实战教程
Applet Custom Grid
PHP array splicing MySQL in statement
zabbix如何配置告警短信?(预警短信通知设置流程)
mysql插入\更新前+判断条件
3dsmax插件开发遍历节点对象和Object获取及INode变换矩阵说明
One of the basics - overview of sta Basics
Test essential tool - postman practical tutorial
Connectivity basis of Graphs