Wednesday, August 7, 2019

Sizing an Application

Capacity Planning of Web application.

Recently we have been observing that the website that I have been part of has been running on average constant response times for different peak loads. At this time, we had moved lot of the functionalities to different applications on the cloud where scalability is auto managed.  This made us revisit the number of instances that we have been running in production on our on-premise servers. If these servers were required for the peak load and validate if we could save some money and maintenance on the infrastructure by reducing certain number of servers.

This required re calculating the capacity planning for different environments. To calculate the approximate capacity or how much traffic an application can hold up is based on different data points.

These datapoints include factors number of requests per second, average application server response times, number of instances and their details of CPU, cores, threads, sockets etc. All the required information typically can be gathered from the analytics tool like GA, or Adobe web analytics or monitoring tools like new relic, Dynatrace etc.

Calculating the number of Cores?

For doing this all we need is to load the cpu information (lscpu) and view the information related to Threads per socket, Cores per socket and number of Sockets. In the below case the number of core = 6 * 1* 1 = 6.

This value is for a specific instance or virtual machine and the total cores is calculated by adding  all the virtual machine specific cores. For e.g. If there are 4 virtual machines then the total number of cores present in the infrastructure based on the above alogirthm is 4 * 6 = 24.



Calculate the maximum load or through put of the system?

The next step is to calculate the number of average requests to the application servers. This can be calculated by viewing the data of the monitoring tool. The information needs to be fetched for the most peak traffic or expected peak traffic for an application or website. For e.g. If the peak throughput for an application is say 1000 requests per minute. Then the value in RPS or request per second is 4000/60 = 66.66


Calculate the Average response times?


The next value that needs to be calculated is the average response times from the application server. This information also is available using any monitoring tool or can also be calculated by using the expected average value in seconds. For e.g. Assuming 250 m sec to be the average app server response time.



Now with the required information in place the number of cores can be calculated using the formulae

Number of cores = Requests per second * average response time in seconds

For.e.g Number of cores for peak traffic = 0.250 seconds * 66.66 = 16.665 cores. (app 17 Cores).

3 comments:

  1. You have posted such a good post. I am very impressed by your work towards your post for sharing such useful information. Thank you.work from home productivity monitoring tools USA

    ReplyDelete
  2. such a nice piece of article. Thank you for sharing your knowledge. This is a very valuable thing you shared. good stuff!!work from home productivity monitoring tools USA

    ReplyDelete
  3. Your information might only be used or disclosed for the aim for which it was collected except may have} otherwise consented, or when it's required or permitted by legislation. Your information is retained just for the time period required to satisfy the aim for which it was collected. By creating 우리카지노 a piece surroundings the place staff can constantly be taught, develop and thrive, we profit as a enterprise and society benefits from their increasing capabilities and contributions. We will do our best to respond to|to answer|to reply to} every request in a well timed and respectful fashion. Our companies reflect the enter and expertise of these organizations.

    ReplyDelete

Building Microservices by decreasing Entropy and increasing Negentropy - Series Part 5

Microservice’s journey is all about gradually overhaul, every time you make a change you need to keep the system in a better state or the ...