Node+Express test server performance

Node+Express test server performance

1 Test Environment

1.1 Server Hardware

The host to be tested is AWS cloud server. Two tests are selected

1.1.1 t2.micro

t2.micro is an EC2 with breakthrough performance, which is the server in AWS global free package. The configuration is as follows:

t2.micro is an EC2 with breakthrough performance, which is the server in AWS global free package. The configuration is as follows:

model vCPU ECU Memory storage Network performance Price (hour)
t2.micro 1 variable 1 EBS only Low to medium 0.0945

Single core 1G, CPU performance is 0.45ECU, and can reach 2ECU when performance is improved. The network performance is said to be 20Mbps~100Mbps

PS: EC2 Compute Unit (ECU) – One EC2 Compute Unit (ECU) is equivalent to the computing power of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon CPU.

1.1.2 c5.large

Then we selected a c5.large for evaluation.

model vCPU ECU Memory storage Network performance price
c5.large 2 9 4 EBS only Up to 10Gb 0.493

Dual-core 4G, performance can reach 9ECU

1.1.3 Press

The press machine is another c5.large in the same availability zone.

1.2 Testing Tools

1.2.1 Test terminal

The ab tool is mainly used for testing. The ab tool can run up to 200 million concurrently, which is sufficient for single-machine testing.

For the use of ab tools, please refer to another blog: https://www.jb51.net/article/231502.htm

1.2.2 Server Monitoring

The server-side monitoring mainly uses the AWS backend cloudwatch service, and the CPU and memory usage are checked in the top tool.

For the use of top command, please refer to another blog:

1.3 Test Method

Add a test route directly in the express framework app.js and return res.end() directly.

2 Test Data

2.1 c5.large

We can see from the figure that when the concurrency is 2000, the average response time is 874.725ms, and the QPS is around 2286.43. On a 2-core 4G server with more than 300/month, the performance of the express framework itself is not bad.

2.2 t2.micro

We can see from the figure that when the concurrency is 300, the average response time is 189.191ms, the QPS is around 1585.7, and the performance of T2 at 70 blocks/month is quite good. However, it can also be seen from the figure that after the concurrency reaches 1000, the overall performance is not very stable.

3 Related Documents

Blog on estimating the concurrent volume of IoT devices:

https://www.jb51.net/article/231516.htm

Stress testing tool ab:

https://www.jb51.net/article/231502.htm

Indicators and methods of stress testing:

https://www.jb51.net/article/231518.htm

The above is the editor's introduction to using node+Express to test server performance. I hope it will be helpful to everyone. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Summary of commonly used performance test scripts for VPS servers
  • How to write a Go program to perform performance testing on the Nginx server

<<:  Example code for implementing page floating box based on JS

>>:  Solution to the problem that the div width is set to width:100% and then the padding or margin exceeds the parent element

Recommend

base target="" specifies the target of the base link to open the frame

<base target=_blank> changes the target fram...

Some basic instructions of docker

Table of contents Some basic instructions 1. Chec...

Vue front-end development auxiliary function state management detailed example

Table of contents mapState mapGetters mapMutation...

Detailed explanation of 6 ways of js inheritance

Prototype chain inheritance Prototype inheritance...

Summary of learning HTML tags and basic elements

1. Elements and tags in HTML <br />An eleme...

Detailed explanation of upgrading Python and installing pip under Linux

Linux version upgrade: 1. First, confirm that the...

Detailed explanation of Grid layout and Flex layout of display in CSS3

Gird layout has some similarities with Flex layou...

MySQL database deletes duplicate data and only retains one method instance

1. Problem introduction Assume a scenario where a...

Detailed explanation of JS browser event model

Table of contents What is an event A Simple Examp...

Two ways to open and close the mysql service

Method 1: Use cmd command First, open our DOS win...

Optimized implementation of count() for large MySQL tables

The following is my judgment based on the data st...

InnoDB type MySql restore table structure and data

Prerequisite: Save the .frm and .ibd files that n...