Load Testing - Spring Boot, MySQL, MongoDB, Prometheus, Grafana, Actuator, JMeter, API metrics, API monitoring, Rest API
MIT License
S/N | Database | Total DB records | API endpoint | Total process time |
---|---|---|---|---|
1 | MongoDB | 10,000,000 | /api/mysql/concurrentInsertEmployees | 4 mins and 14.28s |
2 | MySQL | 10,000,000 | /api/mongodb/concurrentInsertEmployees | 3 mins and 15.48s |
3 | Cassandra | To do | To do | To do |
4 | PostgeSQL | To do | To do | To do |
Database | Total DB records | set DB max_connections(Y/N) | API endpoint | Requests per min | Average API response | Total AverageAPI response | No. of errors |
---|---|---|---|---|---|---|---|
MongoDB | 10,000,000 | N/A | /api/mongodb/{id} | 2,000 | 14.9s | 25.1s | 0 |
N/A | /api/mongodb/name/{firstName} | 2,000 | 35.2s | - | 0 | ||
MySQL | 10,000,000 | N | /api/mysql/{id} | 2,000 | 88.2s | 181.5s | 56 |
N | /api/mysql/name/{firstName} | 1,944 | 277.4s | - | 306 | ||
MySQL(fine tuned) | 10,000,000 | Y - max_connections=1000 | /api/mysql/{id} | 2,000 | 56.2s | 111s | 0 |
Y - max_connections=1000 | /api/mysql/name/{firstName} | 2,000 | 165.9s | - | 0 | ||
Cassandra | To do | ||||||
PostgeSQL | To do |
cd /<path>/employee-service
mvn clean install
docker-compose build --no-cache
docker-compose up
docker ps -a
docker logs <CONTAINER ID of employee-app> --follow
http://localhost:8081/db/local_mongo_db/
JMeter script --> employee-service/_external_files/employee-mongo.jmx
JMeter bin --> <JMeter path>/bin
Copy <JMeter script> to <JMeter bin>
mkdir employee-mongo-report
./jmeter.sh -n -t employee-mongo.jmx -l employee-mongo-report/mongo-loadtest.jtl -e -o employee-mongo-report/
<JMeter path>/bin/employee-mongo-report/index.html
JMeter script --> employee-service/_external_files/employee-mysql.jmx
JMeter bin --> <JMeter path>/bin
Copy <JMeter script> to <JMeter bin>
mkdir employee-mysql-report
./jmeter.sh -n -t employee-mysql.jmx -l employee-mysql-report/mysql-loadtest.jtl -e -o employee-mysql-report/
<JMeter path>/bin/employee-mysql-report/index.html
mkdir employee-mysql-report-max-conn
./jmeter.sh -n -t employee-mysql.jmx -l employee-mysql-report-max-conn/mysql-loadtest.jtl -e -o employee-mysql-report-max-conn/
<JMeter path>/bin/employee-mysql-report-max-conn/index.html
http://localhost:9090
http://localhost:3001
Dashboard -> New -> New Dashboard -> Import DashBoard