Does constant polling to the server to keep the page up-to-date slow down the server? Or in other words overwhelm the server with many requests? The way I’m looking at it is that the server now has to process more requests than before!
What do you think?
AJAX is just a typical HTTP request. Imagine you have 10 000 requests per second. You know your server, it possibilities and your numbers, do a simple math yourself, only you may answer your question, but in general, of course, more requests will affect a performance somehow.
You may do old-school AJAX request every 10-30 sec to check for updates or you may use today web sockets.
If server will have performance issues in the future then you just will set up proxy, load balancers, implement caching in both client-side and server-side. It is absolutely normal situation.
Mario Giambanco
Director of User Experience Development
As opposed to static content / data?
There's a ton of variables in a question like this.
Server capacity.
Hosting company bandwidth
Proximity of the website host to the server providing the data. You may host in Chicago or Texas but the data might be hosted in Europe.
Backend programming language chosen.
Is the code requesting a json file or querying an SQL database? What kind of query are we talking about? A simple select
emailfromusersor a more complex join? Is the DB properly index?How complex is the script being requested? Simple or is it processing images or working on data?
How often are you polling for data? Every 5 seconds or every 5 minutes?
How many concurrent users are making the same request?
Any dynamic site needs to get it's data from somewhere. Response times will come down to efficient code, thought out infrastructure and good sys admin skills to optimize servers. A Couple users on the site at any given time "shouldn't" be an issue. Thousands and that's why hosting companies have scaling solutions now.