Monthly Archives: July 2014

TV coverage – there’s no gift horse into the mouth of which a geek cannot look

Freegle got some TV coverage on Kirstie Allsop’s Fill Your House For Free last Tuesday, and with a bit of luck we’ll get some more over the next few weeks.

This is brilliant, fantastic, wonderful stuff.  It’s also horrific, stressful, awful and expensive.  Why?

Normally, while some people are pottering around on the Freegle website, others are stroking their cat.  After a while, the cat wanders off to decimate the local rodent population, so those people start posting WANTEDs on Freegle for cat toys in the deluded belief this will make the cat stay inside.  By this time the people who were on the website earlier have posted their OFFERs for the cat toys they got a while ago which just got ignored, and have now started hoovering.  Elsewhere, some people have decided to cut out the middlemog and just hoover the cat.

Anyway, you get the idea.  It ebbs and flows.

Then you get some TV coverage.  Don’t get me wrong, it’s great, and someone has worked hard behind the scenes to make it happen.  But what it means is that all over the country, people who see the name “Freegle” on screen decide to check out your website.

All.  At.  Once.

pageviews

Suddenly, your website has 50, or 100 times its normal traffic.  And it’s important that it handles it because, well, this is people’s first impression, and if doesn’t work, you’ve probably lost them.  And if it takes five minutes to load a page, by that time the cat has come back in with some entrails which need scooping up.

So what do you do?

Well, if you have lots of money, you just have a few hundred times more servers than you need.  Right, well, you just lost us at the whole “having lots of money” thing.

If you know the publicity is coming, you can usually add some more server capacity for a short period, if your hosting company allows that.  If they don’t, change hosts.

For the geekier readers, here’s some stuff you can do:

  • Use NGINX.  Seriously.
  • Use a PHP-FPM pool with a static size – you don’t want lots of processes spawning which chew up your memory and make you start swapping.
  • Make sure you’ve increased OS limits on file handles – the defaults are too low.
  • Don’t have slow MySQL logging turned on.  That can cause a death spiral.
  • Get your SQL queries right.  High load is a good time to monitor the system to spot missing indices – we found one in the email confirmation step.

Here are some other things we’ve learned:

  • It takes people 3 seconds to google.  Watch the screen, watch Google Analytics in real time, and you’ll see it.
  • When there are three different words on the screen, people mostly don’t react.  When there’s just one, boy do they leap on it.
  • Come the commercial break, the people who don’t google immediately start checking out the stuff they heard about in the previous segment.
  • People really do watch the +1 channels.  Who knew?