Thursday 27 July 2017

How Big is 'At Scale'?

I see the term 'at scale' being used a lot on tech/engineering blogs - "You need to do it like this when you run your app at scale", "We had to do this to make it work at scale" etc etc.

But what exactly determines that I am doing something at scale?

How do you quantify that?  There's no SI unit for scale like the 'Double Decker Bus' or the 'Olympic Swimming Pool'.  I like to think that if my systems break either due to the amount of traffic they're being asked to handle or the amount of data I've asked them to query then I'm probably running my systems 'at scale'.

Today I read the excellent ebook Scaling PHP Applications.  The blurb on the website makes the proud claim "Scale PHP 5.6 (and 7), nginx, haproxy, MySQL 5.6, Redis, and Memcache to 10K req/second".

That sounds like an upper limit for 'at scale' - 10,000 requests per second.

I'm sure I've seen my systems consistently handle more than 10k req/s.  Sure enough, my monitoring graphs are showing peak HTTP traffic of 25k req/s - that's 2.5x 'at scale'.  I call this 2.5 Xscale.

Taking a function of the number of requests handled and the service uptime, I got some stats from my system:

nginx - 14,227 req/s (1.4 Xscale)
php-fpm - 10,999 req/s (1.09 Xscale)
memcached - 93,221 cmd/s (9.3 Xscale)