Competing webserver workloads

Thursday, 17. 02. 2011  –  Category: sw, web

Recently a client was receiving complaints that their busy server hosting both their WordPress sites and their OpenX1 banner delivery was underperforming. Specifically, sites including their banners were seeing page loads hang on them. If you’re in the business of selling banners this is bad news. There were reports of the WordPress sites being slow too, but mostly from administrators2 rather than site visitors.

I sorted out a bunch of request amplification issues but still things still weren’t right, so I added a second server to help out. Instead of just chucking the combined traffic at both servers I used HAProxy to separate out the traffic to each, with a view to adding more OpenX servers as necessary.

Here’s what HAProxy’s stats had to say after some time running the sites split:

wordpress
Queue Session rate Sessions Bytes
Cur Max Limit Cur Max Limit Cur Max Limit Total LbTot In Out
app01 0 0 1 367 2 454 1758026 1758026 1336541933 30062777594
openx
Queue Session rate Sessions Bytes
Cur Max Limit Cur Max Limit Cur Max Limit Total LbTot In Out
app02 0 0 19 45 3 75 5588327 5588293 4216687748 11878951168

Some of these I found unsurprising – WordPress serves a higher volume of data, it is content heavy compared to banner delivery and related click handling. Conversely the inbound data volume for OpenX is up because it’s loaded with click information.

What’s interesting is that the WordPress sites have a higher maximum concurrent session count, yet the total sessions is far higher for the OpenX banners. This illustrates the benefit of separating out different server loads: one server is churning away pushing out fat content and even when heavily cached this burns enough resource that requests get queued and gum up, whilst another is fielding quick-in quick-out requests. When it’s not contending with its laggard sibling it can get on with its business unhindered.

Ultimately the visibility HAProxy affords beats an Apache scoreboard when that Apache is fielding two differently focused workloads.

  1. advertising is a necessary evil, right? []
  2. and that turned out to be a pagination issue []

Comments are closed.