Tuesday, February 14th, 2006

Bending HTTP until it breaks

Category: Ajax, XmlHttpRequest

Kris Wehner brings up a good point in this latest blog entry today – that Ajax inherently can cause more trouble to the server than it might be worth.

I’ve said before that I’ve been watching the AJAX fad with keen interest over the last few months, waiting for the inherent problems to start eclipsing the rampant enthusiasm. Today I ran across another one of these “techniques� that is even more scary, because it requires holding open a connection to the server “forever� in order to work.

The post suggests that, as settings stand now, some web servers out there are doing good keeping up with the normal web page requests. Throw in a few hundred/thousandy Ajax calls on top of that and things get even slower. There’s not much in the way of memory or processing power being used most of the time, but it’s still taking up space in that “max connections” threshold most servers set.

Some of this can be helped with a “lighter” Ajax coding style, but there gets to be a point when there are so many Ajax connections coming in, you almost have to increase the number just to keep afloat.

Posted by Chris Cornutt at 2:50 pm

3.5 rating from 22 votes


Comments feed TrackBack URI

I think we’re scratching the surface of what web servers will be able to handle in the future. In the last year or so we’ve seen an increasing number of people beginning to use alternate web server software like LightTPD which has a more efficient way of handling connections than traditional Apache systems.

Even Apache is beginning to take notice and created its own Event MPM which handles Keep-Alive connections more efficiently than the normal connection per thread/process approach.

With these new approaches hopefully we’ll begin see software that can more easily handle 1,000 or even 10,000 connections at once.

Comment by Dan Kubb — February 14, 2006

This is the reason why Apache 2.2 has such value with its Event MPM — it keeps a sinlge thread per process to manage Keep-Alives, rather than one thread per Keep-Alive or one process per Keep-Alive. I’m hoping it moves out of experimental soon.

Comment by Steven Roussey — February 14, 2006

Leave a comment

You must be logged in to post a comment.