Anyone who's ever played online games knows that lag (latency) kills. With the introduction of AJAX, that's true for Web applications as well. High latency can introduce not only performance problems, but application logic problems. The latter is due to the asynchronous nature of AJAX. If several AJAX requests are sent at the same time, there is no guarantee that they will come back in the same order. While this rarely causes issues in properly coded applications, one small mistake can cause strange application errors that may be difficult to troubleshoot due to the difficulty in recreating the exact network situation.
Obviously there is some amount of latency in the network that you and your counterparts on the network side of IT can't change. "Speed of light" tells us that it takes a constant amount of time for a packet to travel from point A to point B and nothing -- save the ability to override the laws of physics -- can change that. But latency can be introduced into the equation in several places within your application and network infastructure, and in the case of AJAX that point of introduction is likely to be the server.
AJAX-based applications that perform frequent updates, for example updates within the server-specified connection time-out window, necessarily keep a session open on the server while the application is in use. This is good because it reduces the overhead associated with opening and closing TCP connections, but bad because it tends to consume more server resources for a longer period of time.
As more and more users load up your application, more and more resources on the server are consumed. This has the effect of reducing the total number of concurrent users your application can support. It is also possible that a single user will be using up to two connections to your server, effectively cutting the number of concurrent users supported in half. As the number of open connections to your servers increases, the processing power of your server decreases. This means it takes more time for the server to receive, process, and return a response to the user, making it appear that your application is not performing as well as it should. The server is now introducing more latency into the equation.
To address this problem, you can tweak your server configuration such that users aren't connected as long, freeing up resources for the next user. Setting a lower timeout value in the Web or application server forces sessions to end more quickly, which means you might be able to support more users on a single server. But if the AJAX application is performing real-time update, this will only shift the burden from maintaining open sessions to opening and closing sessions, a situation that requires just as many -- if not more -- resources on the server.
A better solution is to deploy an application delivery controller capable of managing connections between the browser and the server in such a way as to effectively reduce the burden on the server, resulting in improved performance. Application delivery controllers multiplex TCP connections to Web and application servers, and reuse the connections to reduce the impact on performance of constantly opening and closing those sessions on the server. This has the added benefit of aggregating client connections such that even if a browser session is opening multiple connections to the server, the application delivery controller still only requires a single connection to the Web or application server.
Additionally, application delivery controllers are rooted in load-balancing technology, which means that if your user base is so large that a single server cannot handle the load even with an application delivery controller deployed, you can add another server and use the device to distribute the load amongst multiple servers.
AJAX is one of the most exciting -- and disruptive -- programmatic innovations of the past few years. It is enabling a new generation of robust, highly interactive Web-based applications that offer many benefits for both developers and application users.
As is true of any disruptive technology, there are drawbacks and in the case of AJAX it is often the case that application performance degradation is the most obvious drawback of all. There are solutions available, however, that can mitigate the potential performance problems inherent in AJAX-based applications. Some of these solutions can be addressed by developers, others by network staff, and still others will require a collaborative effort -- and perhaps the implementation of an external solution.
An application delivery controller is one of those solutions, and provides benefits to both network and development teams alike. It offers myriad features and functionalities than can reduce the impact of AJAX-based applications on the network without disruption to the existing application and network infrastructure.
AJAX is an awesome advancement in Web-development technology. Don't let performance problems inhibit the deployment -- and subsequent enjoyment -- of your's.