May 2020
« Mar    


WordPress Quotes

History is a relentless master. It has no present, only the past rushing into the future. To try to hold fast is to be swept aside.
John F. Kennedy
May 2020
« Mar    

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (40)
Ansibile (19)
Apache (135)
Asterisk (2)
cassandra (2)
Centos (211)
Centos RHEL 7 (270)
centos8 (3)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (30)
Eassy (11)
ELKS (1)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
health (2)
horoscope (23)
Hyper-V (10)
IIS (15)
JAVA (7)
JBOSS (32)
jenkins (1)
Kubernetes (7)
Ldap (5)
Linux (188)
Linux Commands (166)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (24)
MYSQL (84)
Nagios (5)
NaturalOil (13)
Nginx (35)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (35)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (62)
Ubuntu (1)
Uncategorized (30)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

0 visitors online now
0 guests, 0 bots, 0 members

Hit Counter provided by dental implants orange county

Traffic Calcuation for Tomcat and Apache

  • How many users can we handle?
  • How many requests/second can we handle?
  • How much bandwidth is needed to handle so many users or requests/second?
  • How do i calculate these figures?
  • How many (an application) servers do i need to handle this traffic?

Lets begin with a small example to understand how we arrive at answers to the above questions.

Our Application: It is a typical web-application where users browse web pages, do stuff(your business logic), and then leave! Simple enough for our scenario.

Our Server: Tomcat 6 server (with the default 200 worker threads).

So, we can conclude this easily:

We can handle 200 simultaneous requests definitely!(because there are 200 worker threads available to us).

But, how many requests/second can we handle?

For that we need to know what is the average time required by a thread to process requests. This will depend on your application. Let us assume that every thread takes 0.5 second average time to serve a request.

This means we can handle 200 requests/0.5seconds == 400 requests/second.

But, how many users can we handle simultaneously?

This depends on how frequently the user sends requests to the server! Let’s say an average user sends a request to the server once in every 10 seconds. So he sends 1 request/10 seconds OR 0.1 request/second.

Since our server can handle 400 requests per second, the number of total simultaneous users it can handle is: (400 requests/second) / (0.1 requests/second)

== 4000 (online) users!

How many total users can we support?

If you assume that 5% of users are online at any point in time, then we can support 4000/(5%)==80,000 users.

How much bandwidth is required (bandwidth is provided by data centre hosting your server!)?

Lets say every request results in average 20 KB of data by returning in response. Since we can handle 400 requests/second, we need at least 400 x 20 KB = 8000KBps == 8MBps == 64Mbps (NOTE: B=Bytes, b=bits, for simplicity assumed K as 1000 instead of 1024).

Lets summarize, what traffic our web application handle?

  • 4000 simultaneous users. 80,000 total users.
  • 400 requests/second.
  • And we need at least 64Mbps of bandwidth.

Now, this will give a some idea of how to find out what traffic your web application can handle. Here, we are not discussing how to scale your application/server(that is left for another post). Of-course as you scale(for example by using multiple tomcat servers behind a apache load balancer) you will be able to handle larger traffic.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




Blue Captcha Image


Protected by WP Anti Spam