- Mais recentes
- Mais votos
- Mais comentários
ALBs support websockets (https://aws.amazon.com/blogs/aws/new-aws-application-load-balancer/)
ALB provides native support for WebSocket via the ws:// and wss:// protocols.
NLBs support websockets (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html#listener-configuration)
You can use WebSockets with your listeners.
Obviously, you need to have a listener/target group on the websocket port. Websockets should be inherently stickly (at least on the alb https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html.
WebSockets connections are inherently sticky. If the client requests a connection upgrade to WebSockets, the target that returns an HTTP 101 status code to accept the connection upgrade is the target used in the WebSockets connection. After the WebSockets upgrade is complete, cookie-based stickiness is not used.
I confront the same issue with application load balancer. ALB blocks the websocket connection. It works fine without ALB (with direct access to IP). I enabled the stickiness of the target group. How can we use websocket with ALB?
I have an ALB that has 1 target group that has 3 instances. I need to subscribe on the socket on ALL 3 instanses via an ALB, because IDK from where the data will come (i use the kafka and send the data via the socket).
How can i achive this ? For now i subscribed only on one of them, and i lost some data
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos
- Por que os clientes não conseguem se conectar ao meu balanceador de carga do Elastic Load Balancing?AWS OFICIALAtualizada há 10 meses
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 2 anos