I have two windows Serer 2016 web servers in the public subnets:
- Each web server have their own public IP addresses.
- Each web server has self-signed SSL certificate, has both HTTP and HTTPS bindings, and redirecting HTTP to HTTPS.
- They are in a Target Group. There is an Application Load Balancer using that Target Group.
I could request the pages from the web servers directly or from the ELBs. Response is instant. All good.
Once I removed the public IP addresses from the web servers, the response from the ELB becomes very unreliable. It times out every now and then with error 504 Gateway Timeout. But sometimes it does work.
Why?