websockets with load balancer scalability

前端 未结 1 479
栀梦
栀梦 2021-01-02 20:54

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 dire

相关标签:
1条回答
  • 2021-01-02 21:19

    It depends!

    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).

    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.

    0 讨论(0)
提交回复
热议问题