Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
122 views
in Technique[技术] by (71.8m points)

amazon web services - How to load balance AWS private subnet EC2 instances

If I create an ELB and try to attach the private subnet instances, my health check fails: OutOfService.

Question 1 : Can I get a internal / private IP(not IP but dns name) for Load Balancing. i.e not accessible to the internet?

Question 2 : If I have a public dnsname for my Application Load Balancer. How do I attach EC2 instances that are in my private subnet without an Elastic IP(aren't internet accessible). I am looking for the best approach. Should we have-

ELB --> public subnet EC2 instances (proxy configuration- */* [private_ip]:[port]/* ) ---> Service from Private Subnet/EC2 instance with health checks here.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The traditional architecture is:

  • Elastic Load Balancer in public subnet
  • Amazon EC2 instances in private subnet
  • Security group on Load Balancer permitting port 80 & 443 from 0.0.0.0/0
  • Security group on instances permitting port 80 from the Load Balancer security group
  • An Amazon Route 53 Hosted Zone with a CNAME record set pointing to the DNS Name of the Load Balancer

If your instances are failing the Load Balancer health check, check the following:

  • The instances should have a security group permitting inbound access from the Load Balancer
  • The Load Balancer health check should be configured with a path to a web page to use for the health check
  • The instances should have a functioning web server that is responding to the health checks

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...