I have a single instance running which is sitting behind their load balancer.
When I use apache's benchmark utility and point it at the instance the response time is more often than not, under 50ms. When I point ab at the load balancer the response time jumps up to 400ms+
I was wondering if anyone has encountered this and/or if there is a solution to get the response times lower?
ELBs don't really add much latency to the requests on their own. There's a small amount, of course, but it's typically in the single digits or close.
It's likely that if this is a new ELB the AB run was too much load for the ELBs default size and you simply hit it too hard.
AB is pretty terrible for load testing ELBs as it locks onto a single IP address and part of the ELBs load balancing includes DNS round robin. There are a few other tools out there like Tsung, Locust, or Bees With Machine Guns that do a better job of handling testing ELBs.