4

I am currently switching over an application to amazon but I'm noticing that sometimes the response I receive is a 504. Our system is setup in a way where we have a LB in front of our ELB and then it goes straight to tomcat.

We are currently timing all our requests in our service and in the servlet filter logging the response time and they are always less than 1s. We then look at the LB logs and are seeing a 504 and it appears that somehow the ELB is timing out and returning the 504.

Does anyone know why this could happen? Thanks

EDIT: Not sure if it matters but currently we only have 1 instance and it can scale to 3 instances.

tlindhardt
  • 41
  • 4
  • Why do you have a LB front of an ELB? Is the instance accessible via directly the ELB? Is it healthy based on the ELB health-check? – Adam Ocsvari Jul 31 '15 at 12:41
  • We are going to try bypassing the DLB and see if helps. And yes the ELB shows the EC2 instance is healthy. – tlindhardt Jul 31 '15 at 17:50

1 Answers1

2

Amazon's ELB is known to not to handle very well sudden bursts of requests, because underneath they're just an auto-scaling group of instances running some proxy solution (HAProxy, I guess). So, it scales out as the load increases, just like an user-defined auto-scaling group would do, then, when you get bursts, you will probably miss some requests while it is launching additional instances. When you expect to have such a kind of workload for a specific event, you can request an ELB warm-up to the support, but you can't have it as a permanent configuration. They will ask you an exact scheduled for it, and resume to the normal behavior after the end of it.

So, for some applications and use-cases, Amazon's ELB is not the best solution. I don't know if this is your case, but it's a point to consider, anyway.

Edson Marquezani Filho
  • 2,436
  • 1
  • 14
  • 18