具有负载平衡器可伸缩性的websocket

编程入门 行业动态 更新时间:2024-10-22 11:30:45
本文介绍了具有负载平衡器可伸缩性的websocket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在网站上使用负载平衡器.浏览器启动与我的应用服务器的websocket连接.打开的连接是否消耗了LB上的任何资源,还是直接在浏览器和应用服务器之间?如果LB上有什么开放的地方,这不是瓶颈吗?我的意思是,如果我的LB可以处理X个打开的连接,那么X + 1用户甚至无法打开连接.

I use a load balancer with my web site. The browser initiates a websocket connection to my app server. Does the open connection consume any resources on the LB or is it direct between the browser and the app server? If there is something open on the LB isn't it a bottleneck? I mean if my LB can handle X open connections then the X+1 user could not even open a connection.

推荐答案

要视情况而定!

最高效的负载平衡器监听请求,进行一些分析,然后转发请求;所有位都不会通过负载均衡器.网络转发发生在比http更低的网络层(例如,它不是http 302重定向-客户端永远不知道发生了什么,维护内部网络配置的隐私-这种情况发生在OSI 我认为是4级).

The most efficient load balancers listen for requests, do some analysis, then forward the requests; all the bits do not travel through the load balancer. The network forwarding happens at a lower network layer than http (e.g., it is not an http 302 redirect - the client never knows it happened, maintaining privacy around internal network configuration - this happens at OSI Level 4 I think).

但是,某些负载平衡器添加了更多功能,例如充当SSL端点或应用gzip压缩.在这种情况下,它们正在处理通过的位(在这种情况下为加密/解密或压缩).

However, some load balancers add more features, like acting as SSL endpoints or applying gzip compression. In these cases, they are processing bits as they pass through (encrypt/decrypt or compress in this case).

图片可能会有所帮助.将第一个图表与第二个图表进行比较在第三个此处中,请注意第一个重定向是其他人中没有的.

A picture may help. Compare the first diagram with the second & third here, noting redirection in the first that is absent in the others.

更多推荐

具有负载平衡器可伸缩性的websocket

本文发布于:2023-10-30 04:14:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1541731.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:平衡器   伸缩性   负载   websocket

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!