/    Sign up×
Community /Pin to ProfileBookmark

How much can servers handle ajax’s deman?

I have a site that uses ajax. The site pings the server repeatedly. At the moment I have set it up to where a user pings the server once every minute. But on a large scale, say I have 4000 users logged in at once, the server will be pinged a whole lot and I don’t know if the server can handle this kind of demand?

I’m not too familiar with servers and its performances. Does anyone know how many request a server can handle per second?

What is the average ping an average server can handle per second?

Also, do you know of any web hosting companies that uses extremely high performance servers that can handle this type of demand?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@Jeff_MottDec 12.2008 — The answer depends on a lot of things—the bandwidth, the hardware, and of course the backend software. You'll need to run simulations in a sandbox environment. Simulate 4000 users and see if you get lagging response times.

If the site does lag, and the software is as good as it can be, and the server is as good as it can be, then all that's left is to add more web servers, more database servers, and to use load balancers. [url=http://www.rackspace.com]Rackspace[/url] is the de facto standard when you need this kind of setup. But it'll be pricey, and your software will likely need re-architecting, so consider this a last resort.
Copy linkTweet thisAlerts:
@YourChildauthorDec 12.2008 — How do I run a simulation in a staging environment to simulate 4000 users?
Copy linkTweet thisAlerts:
@Jeff_MottDec 12.2008 — You'll likely need to write a program to do that. You can use any language. Have it send out HTTP requests that would mimic the requests a real user would trigger.
Copy linkTweet thisAlerts:
@rnd_meDec 13.2008 — //assume a 5mbps upload from host.

5mbps = 500kb/sec

/

4kb/packet

=
125 pings avail per second given infinite cpu power

4000 / 60 = 66 pings per second demand
Copy linkTweet thisAlerts:
@Jeff_MottDec 13.2008 — //assume a 5mbps upload from host.

5mbps = 500kb/sec

/

4kb/packet

=
125 pings avail per second given infinite cpu power

4000 / 60 = 66 pings per second demand[/QUOTE]


Erm... First, 5 mbps is 5000 kbps. Second, an IP packet can be as large as 65536 bytes, and each HTTP request and response may use more than one packet. Third, assuming infinite CPU power makes the whole calculation pointless, since the backend software and database queries are what take the most time.
Copy linkTweet thisAlerts:
@rnd_meDec 13.2008 — Erm... First, 5 mbps is 5000 kbps. Second, an IP packet can be as large as 65536 bytes, and each HTTP request and response may use more than one packet. Third, assuming infinite CPU power makes the whole calculation pointless, since the backend software and database queries are what take the most time.[/QUOTE]

you raise some good points, but seem to assume a worst case scenario, and mine's a best case.

i don't think the numbers unreasonable.

allow me to elaborate (i was kinda brief), and see if you still disagree with anything:


first: the bandwidth of 5 mega bits per second equates to about 500 kilo bytes per second. 8 bits per byts + 1 check bit+ avg packet overhead yeilds about 10:1...

second: a ping should never be that large. i was thinking of asking the OP what he was using to ping. using GET with xmlhttprequest is a poor way to do it, as it transfers cookies. an IMG ping or HEAD request should fit within a single packet on most networks.

third: responding to a ping is not that intensive. hosting centers will have the fancy NICs that do most of the frame processing, so i would certainly expect a modern CPU to be able to handle 250 IOs per second...

blank pages load very fast, and it's only going to get slower as you do more to each ping. still, 125/sec is not that much really, and i would expect the connection to be a bottleneck unless there is some remote transfer or something intensive occurring each ping...

hope that makes more sense...
Copy linkTweet thisAlerts:
@Jeff_MottDec 13.2008 — the bandwidth of 5 mega bits per second equates to about 500 kilo bytes per second. 8 bits per byts + 1 check bit+ avg packet overhead yeilds about 10:1...[/quote]

Converting mega to kilo and bits to bytes has nothing to do with check bits or packet overheads. 5 mbps * 1000 kb/mb / 8 bits/byte = 625 KB/s. That's all there is to it.

a ping should never be that large[/quote]Granted. The point was a packet can vary in size quite a lot, and you just picked 4 KB out of thin air.

responding to a ping is not that intensive[/quote]Despite the OPs words, I don't think he's talking about a literal ping, because that wouldn't be useful to a web app. He must be sending or receiving some kind of information, such as notifying the server that user X is still logged in, or receiving updated content, both of which would involve DB operations.
×

Success!

Help @YourChild spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...