Book Image

Mastering Web Application Development with Express

By : Alexandru Vladutu
Book Image

Mastering Web Application Development with Express

By: Alexandru Vladutu

Overview of this book

Table of Contents (18 chapters)
Mastering Web Application Development with Express
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Load testing


Load testing is a testing technique used to determine how an application behaves when subjected to both normal and extreme load conditions. It can also be referred to as performance testing, volume testing, or reliability testing.

A common load-testing tool is ab (Apache Benchmark). It can be used from the terminal easily. We will perform the test on a file page, so make sure you upload a file and get its URL afterwards.

To perform 1,000 requests with a concurrency level of 10, we will enter the following command in the terminal:

$ ab -n 1000 -c 10 http://127.0.0.1:3000/files/chwrjte880000qsn9ivmx0q77.html

A sample output would look like the following screenshot:

There are similar CLI tools such as wrk (https://github.com/wg/wrk).

For more complex use cases, Apache JMeter TM (http://jmeter.apache.org/) is a good solution as it also comes bundled up with a GUI.