Using “???” load balancer (require Network Load Balancer)
AWS Network Load Balancer (NLB)
We created a NLB called “remoting-gateway”.
Two availability zones: ap-southeast-2a (Elastic IP 54.66.225.172) and ap-southeast-2b (Elastic IP 3.24.15.136).
NOTE: When you create a target group, you specify its target type, which determines whether you register targets by instance ID or IP address. If you register targets by instance ID, the source IP addresses of the clients are preserved and provided to your applications. If you register targets by IP address, the source IP addresses are the private IP addresses of the load balancer nodes.
Since we register targets by instance ID, we need to make sure each target ec2 instance’s security group has the listener port 8989 open to the public (i.e. source is Anywhere) so client can connect via the NLB.