I was in Gatineau Park during the crucial week leading up to the Pan Am Stadium vote with only limited internet access, but it was exciting - and sometimes harrowing - watching from a distance as the debate swung first one way and then the other.
I was dismayed, however, to discover that RTH visitors were experiencing slowdowns and timeouts on the day of the vote. At the most crucial moment in the whole enterprise, the website was failing under the heavy traffic coming our way.
Investigating it afterward, we discovered that the cause was actually a computationally expensive database query to generate the comments for each article and blog entry.
Because there were so many comments on each page, and because so many page requests were coming in, the server got bogged down trying to execute the slow comment queries and the result was poor response times and even failed page loads.
The site wasn't optimized to assemble the page content quickly enough, and the spike in both comments and traffic revealed this bottleneck in the worst way possible.
Since then, we've 'tuned' the database with better indexing on key look-up fields so that the comment query now runs a couple of orders of magnitude faster. Page loads on articles with lots of comments are already noticeably faster, and the site should be able to handle heavy traffic much better in future.
I'm really sorry for the inconvenience, and I promise that we'll take a more proactive approach to discovering other potential bottlenecks and alleviating them before the next spike in traffic.
You must be logged in to comment.
There are no upcoming events right now.
Why not post one?