Chapter 10. Statistics, Monitoring, and Alerting

Your killer application is going well and is scaling to provide services to the millions of paying customers clamoring to use it. Performance is good, the system scales easily, and you’ve made the world a better place.

The reality is that as time goes on, things change, and components fail. Your challenge in maintaining a large application is to make sure you stay on top of what’s happening, limits you’re reaching, and places you’re over-provisioning.

Performing periodic spot-checks for optimizing bottlenecks is all well and good, but consistent long-term monitoring provides a much better overview of how the system is performing and helps us see weak spots on the horizon. It’s more or less impossible to test everything before pushing real traffic onto it. Even with intensive load testing, we can never be sure exactly what users are going to do and how their behavior will affect the system. By monitoring our system well, we can see what’s happening in real time and address any problems as they occur. Of course, being able to monitor a system well is the real challenge.

Tracking Web Statistics

It’s all very Web 1.0, but people still care about page views. Web statistics analysis and tracking is comprised of a lot more than raw page views, including statistics that can provide important information about the usability of your application. Enlightened thinkers suggest that we shouldn’t be interested in the volume of traffic our application ...

Get Building Scalable Web Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.