Question regarding sinital slow response time of AWS ELB


Here is my setup:

  • AWS ELB (cross zone enabled and internal scheme)
  • Routes the traffic to 1 AWS t2.medium instance
  • The ec2 instance runs an application hostsed on Apache and it exposes Port 80.
  • There's an SSL Certificate that I got from AWS ACM but it terminates at the ELB. So the ELB is connecting to the backend instances via http on Port 80
  • The instances are in a private subnet and are connected to the internet via a NAT Gateway
  • Route 53 private hosted Zone like It consists of a CNAME which routes the trafiic to this Private ELB.

When I access the for the frist time during the day then it takes time to load the page. I have tried playing around with Idle timeout = 4000 seconds but this doesn't help me to load the page faster. If the session is idle, then I have to wait as well for the page to load.

Is there a way to reduce th waiting time and still use Private ELB?

1 Answer

The ELB will be associated with at least two public-facing subnets. And what you're describing sounds like only one of these is able to be used, so any time it hits the "bad" one it's timing out has to wait to try the "good" one.

Do each of the ELB's subnets have the correct routing table in place, i.e. all the ELB's subnets have a route to an internet gateway?

Also does the EC2 instance have a security group that allows inbound port 80 from all subnets that the ELB is in?

Is the CNAME set to the hostname of the ELB or to an IP address (it should be the hostname, because the ELB will have multiple IP addresses, one for each subnet)?

profile picture
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions