Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Elastic Load Balancer paired to a set of instances one is persistant and the other is a variable number of spot instance. When i access the servers directly using their end points, the server behaves normally and loads the pages properly. When i access it via ELB, the pages load very slowly (relatively).

Ec2/Spot direct: connecting: 89ms ssl: 50ms sending: 1ms waiting: 1.53sec recieving: 23ms

ELB served: sending: 0ms waiting: 430ms recieving: 1.11sec

Numbers via google chrome network timeline tool, they vary but not by much

The result of this long recieving period is my pages html loads and takes 'forever' before it runs the javascript and applies the css. Clients see the page load and then after the end of what my gut says is 1.1sec it will apply the formatting... This is no good.

Anyone have an idea of what i'm doing wrong?

share|improve this question
it doesn't matter which instance is served via ELB they are both similar in the page load predicament. – Jones Aug 13 '12 at 0:27
I'm confused. Per your benchmarks, the ELB is faster. – ceejayoz Aug 13 '12 at 1:28
faster perhaps, but the issue i'm having is the way the pages are loaded. The html triggers the body load complete, but then waits for 1.xx seconds until the trigger for body ready is called, or this is my best guess based on timings. This leaves you with a screen of unformatted html for 1.xx seconds. – Jones Aug 13 '12 at 2:01
up vote 1 down vote accepted

Turns out to be apache being slow, not exactly sure why. However, swapping out apache for nginx + php-fpm + apc solved the problem.

Apache just seems to be the under performer these days, if anyone is setting up a server, just avoid apache and save yourself some time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.