Search code examples
architectureresourcesestimation

How to estimate resource consumption of web application


TL;DR;

Is there any technique that I can use to estimate the resources consumption of a web application? If yes, what sort of information do I need as input? Amount of users? Data types of fields to be persisted? How many transactions are expected?

More context: I have estimated the effort to develop a web application, lets say an E-Commerce APP (Product CRUD, Order CRUD, Payments...), now I need to estimate the resources that I will need to have this app up and running smoothly.

Example:

   16GB RAM
   4 Core CPU (3.0 GHz +)
   500GB PostgreSQL

How can I better estimate the values related to memory, disk and cpu?


Solution

  • This is a very difficult thing to estimate. Personally, if I needed to come up with an estimate, I'd break it down into multipliers. Figure out the capacity needed for a single product, a single order, and a single user... Then multiply out. This is going to be very rough. As far as CPU speed, it's impossible to tell without load testing. Very small decisions can make a huge impact on processing / memory consumption. The decision to use an in-memory hash-table vs an on-disk database for key-value lookups could grow your memory consumption by orders of magnitude. Your choice of programming frameworks can also have a huge impact.

    I could write an e-commerce system that runs on a Rasberry PI... Or one that requires several clusters of dozens of machines... It all depends on scaling factors, design factors, developer skill, implementation factors, etc.