Benchmarking the app

Performance is one of the primary concerns when it comes to making an app production-ready. Since a major section of this chapter is about making our app performant, it makes sense to know right at the beginning how to quantitatively measure the performance of our app.

We will use a command-line tool called siege for benchmarking our app. While it is not going to be the most scientific and accurate method, benchmarking with siege will give us a fair idea about how well our app is performing.

Here is how to install siege in Ubuntu:

$ sudo apt-get install siege

To start benchmarking an app located at http://localhost:3000/, we would benchmark it this way:

$ siege -b -c100 -t10S http://localhost:3000/

Basically, we are performing ...

Get Express Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.