Last night, I wrote a blog post about a bad signup experience with Square, posted it to Hacker News, and left to get dinner. I wrote it so others who share my predicament might find it by searching the web and get some more information about how Square’s verification works. I didn’t expect very many people to care — the experience I described is an edge case that affects few users. I didn’t even optimize the PNGs.
For the first half hour, not much happened. But if your post can reach 25 points or so, it gets tweeted by a bunch of Hacker News bots. That’s when it starts to spread like wildfire.
In a short period of time, my site received about 15,000 requests, peaking at 10 or so requests per second. This is nothing for most larger sites. But my site is running on the equivalent of a netbook — could it handle the load?
In short, yes. There was a flurry of disk activity at the beginning, as Apache loaded some files for the first time. Then, since the site is lightweight enough to be completely cached in memory, physical disk usage dropped to a trickle of writes for the log files.
The CPU could’ve handled about 10 to 15 times the traffic without a problem. In fact, if Apache were better optimized for ARM, I could’ve used a Raspberry Pi to serve the site. (Had this been an uncached WordPress site, the server would’ve been toast.)
Latency stayed below 200 ms for the most part.
All in all, this was a pretty good stress test. I don’t have anything to worry about until Justin Bieber tries to sign up for Square.