NetTalk Central

Author Topic: Server app capacity?  (Read 3366 times)

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Server app capacity?
« on: August 19, 2012, 11:34:58 AM »
I read somewhere in a posting that 1 hit/second on a NetTalk server app was inconsequential. What about 1000 hits/second? I don't know anything about massive web server installations like Amazon or Google, but would it be possible to make multiple iterations of a single NetTalk program (ie, app1, app2, app3, etc.) and have the primary app shunt successive logins off to the secondary apps in order to scale the whole thing up? The data path would have to the same for them all of course.

Regards,

Mark

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Server app capacity?
« Reply #1 on: August 19, 2012, 06:54:11 PM »
That's a good question.

I think that because of the way that NetTalk is threaded, that with enough RAM, etc., a single EXE could handle a massive workload.

Interesting.  I'm anxious to read Bruce's take on it.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11263
    • View Profile
Re: Server app capacity?
« Reply #2 on: August 19, 2012, 09:52:09 PM »
Hi Mark,

While I applaud your ambition, it's worth pointing out that 1000 hits per second translates into a _lot_ of users. By illustration let's do some math.

Let's say you have 10 000 active daily users. And let's say they are all within a single time zone, and they only access the site from 8 am to 6pm. So that's 1000 users per hour. Or 16 users per minute. Now let's say each user makes average of 100 requests to the server. That's 1600 requests per minute, or 26 requests per second.

Now, you may vary the numbers if you like, but you get the idea.

As you point out, the server is capable of doing a lot more than 1 request per second. The actual number will depend on many factors, but in very informal testing here in the office I've exceeded 100 requests per second on a sustained basis.

The key limit is probably Ram. Each request uses up a thread for the life of the request. Each thread consumes Ram. And your program has access to a finite amount of Ram (a bit under 2 gigs) so hence a finite amount of threads. Each thread lasts for around a tenth of a second. So in my example above (26 requests per second) you have about 3 threads going. In some testing I did with bill we got up to about 100 threads before there was an issue, however the amount of ram consumed per thread is directly related to your dictionary, so mileage will vary from app to app.

Of course bandwidth, data access speed and CPU are other major contributors to performance.

Of course there will come a time when a single server is not enough. At this point you would set up a cluster of servers, along with a Load Balancer. Now this is a topic worth of more than I can type here, suffice to say that load balancers are "server agnostic", meaning that there should be no problem making use of them when required. Fortunately as the power of individual machines increase, the issue of load balancing has not been necessary for us personally (nor for any other user as far as I know.)

Of course all the above is true regardless of the web server you select. While one server may do more than another, they are all likely to be in the same ballpark and so ultimately all need the ability to move up to load-balancing at some point. But please remember it takes a _Lot_ of users to reach this point, regardless of the server used.

So back to the start - your ambition to require load balancing is a worth one. But it will be a long long time before that becomes a real necessity. And when it does, there are a lot of load-balancing options available to you (just like with any other web server).

cheers
Bruce