当前位置:网站首页>正向代理与反向代理
正向代理与反向代理
2022-07-27 13:17:00 【华为云】
正向代理与反向代理
正向代理
正向代理是客户端知道服务器的地址,在发送请求的时候客户端需要知道目标服务器的信息,一般都是服务器的ip和端口,用户和服务器之间因为各种各样的原因无法直接通信,可以使用正向代理,用户发送请求到自己的代理服务器,代理服务器再把数据发送给目标服务器,比如我们用到的一些fanxiang软件,就是使用的正向代理。使用正向代理,客户端的HTTP请求可以转发到之前和客户端网络不通的服务器。
反向代理
反向代理是客户端不知道目标服务器的地址,用户发送请求到代理服务器,代理服务器发送请求到真正的服务器,比如客户端请求域名,域名后很多的服务器进行负载均衡,这就是反向代理。nginx是可以实现反向代理的软件。
正向代理隐藏的是客户端的信息,反向代理隐藏的是服务器的信息。
反向代理对外都是透明的,用户不知道自己访问的是不是代理服务器。使用反向代理可以提高内部服务器的安全性,还能加快对内服务器的访问速度。
nginx除了反向代理还有负载均衡的功能,用到的就是nginx的upstream指令,默认情况下按照轮询的方式进行负载分配,
总结
正向代理和反向代理是两种不同的代理,正向代理是客户端必须要知道服务器的地址信息,通过正向代理,客户端可以访问不能通信的服务器。反向代理是客户端不知道目标服务器的地址,用户发送请求给代理服务器,但是客户端不知道这是代理服务器,代理服务器下面有多个服务器进行负载均衡。
边栏推荐
- SLAM综述阅读笔记六:基于图像语义的SLAM调研:移动机器人自主导航面向应用的解决方案 2020
- watch VS watchEffect
- Jing Xiandong and other senior executives of ant group no longer serve as Alibaba partners to ensure independent decision-making
- 「游戏引擎 浅入浅出」4.1 Unity Shader和OpenGL Shader
- 10 practical uses of NFT
- 文旅数藏 | 用艺术的方式游云南
- 基于招聘广告的岗位人才需求分析框架构建与实证研究
- Group division and characteristic analysis of depression patients based on online consultation records
- Navicate报错access violation at address 00000000
- Negative ring
猜你喜欢

Excellent basic methods of URL parsing using C language

Pure C handwriting thread pool

GoPro access - control and preview GoPro according to GoPro official document /demo
![[related contents of multithreading]](/img/2d/c8bde21f13a5305ba54e9b52bd1e89.png)
[related contents of multithreading]

基于企业知识图谱的企业关联关系挖掘

一篇文章看懂JS执行上下文

Alibaba's latest equity exposure: Softbank holds 23.9% and caichongxin holds 1.4%

Redis

【论文精读】Grounded Language-Image Pre-training(GLIP)

【多线程的相关内容】
随机推荐
NFT 的 10 种实际用途
Research on automatic classification of electronic medical records based on unbalanced data
汉字风格迁移篇---对抗性区分域适应(L1)Adversarial Discriminative Domain Adaptation
@Repository详解
[luogu_p4820] [national training team] stack [mathematics] [physics] [harmonic progression]
Secondary spanning tree [template]
This points to problems, closures, and recursion
codeforces 1708E - DFS Trees
解气!哈工大被禁用MATLAB后,国产工业软件霸气回击
poj3461 Oulipo【KMP】
面试八股文之·TCP协议
spark job 使用log4j appender 追加日志到本地文件或者mysql
this指向问题,闭包以及递归
文献翻译__tvreg v2:用于去噪、反卷积、修复和分割的变分成像方法(部分)
Interview eight part essay · TCP protocol
Excellent basic methods of URL parsing using C language
连接ResourceManager 失败
Lighting 5g in the lighthouse factory, Ningde era is the first to explore the way made in China
Ten thousand words detailed Google play online application standard package format AAB
【多线程的相关内容】