0

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?

Chris J
  • 139
  • 1
  • 7
  • it doesn't matter which instance is served via ELB they are both similar in the page load predicament. – Chris J Aug 13 '12 at 00:27
  • I'm confused. Per your benchmarks, the ELB is faster. – ceejayoz Aug 13 '12 at 01: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. – Chris J Aug 13 '12 at 02:01

1 Answers1

1

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.

Chris J
  • 139
  • 1
  • 7