Reputation: 181
I read the aws
documentation inside the elastic beanstalk program where aws
is responsible for scaling the servers and auto managing it. In the same documentation there is an option for changing and configuring the load balancer. In my case I want to change it to balance the requests that come to the servers on the IP network layer (L3), but it says that only HTTP
and TCP
can be listened and balanced.
I am developing a chat application backend that need to be developed with scaling in considerations. how can I configure the load balancer to listen on L3
?
the chat application in order to work it must make the tcp
connection with the server not the load balancer so that's why I must load the packets on the IP layer to the server so the server can establish a tcp
connection with the app ( if I am wrong and I can do it on the tcp
layer tell me ).
If I can't, does that give me another option or I will just be forced on using ec2
and handle all the system management overhead myself and create my own load balancer ?
Upvotes: 0
Views: 249
Reputation: 179364
ELB Classic operates at either Layer 4 or Layer 7. Those are the options.
the chat application in order to work it must make the tcp connection with the server not the load balancer so that's why I must load the packets on the IP layer to the server so the server can establish a tcp connection with the app.
You're actually incorrect about this. If you need to know the client's source IP address, you can enable the Proxy Protocol on your ELB, and support this in your server code.
When the ELB establishes each new connection to the instance, with the Proxy Protocol enabled, the ELB emits a single line preamble containing the 5-way tuple describing the external connection, which your application can interpret. Then it opens up the L4 connection's payload streams and is transparent for the remainder of the connection.
http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html
Upvotes: 1