Ajax and Server Scalability: Theory and Practice

In theory, there is no difference between theory and practice. In practice, there is.

Ajax Scalability In Theory: Ambiguous

In theory, Ajax cuts both ways in terms of server scalability:

Ajax helps server scalability: Ajax server interaction is more flexible than page-centric interaction. That flexibility gives you better ability to optimize around whatever measure you care about -- including server load. Tim Bray makes a specific instantiation of this argument here.

Ajax hurts server scalability: Ajax lets us offer new and better services that we could not offer before. Those services are not free, but we accept the server load as a price of doing business. This is the argument that Billy Newport is making.

Ajax Scalability in Practice: Bad

Ajax encourages widespread adoption of a gizmo (XMLHTTPRequest) that facilitates hitting servers multiple times, with no user interaction required. "Widespread adoption" means that that average Ajax developer will not be an expert at distributed systems design. Even with experienced developers, mistakes will be made, and their damage can be magnified by Ajax. A few weeks ago I wrote a defective page whose symptom was duplicate requests to the server. As many as the browser would allow. As fast as it could. Forever. Luckily I write automated tests...

And the Winner Is... Server Vendors

I am not sure why everyone is spending so much time discussing the theory. After all, in both theory and practice, practice is more important than theory. In practice, Ajax is going to put a hurt on servers everywhere. This is not to suggest that Ajax is a bad thing, just that lots of people will do it badly.

Get In Touch