Analysis of the process of deploying nGrinder performance testing platform with Docker

Analysis of the process of deploying nGrinder performance testing platform with Docker

What is nGrinder?

nGrinder is a platform for stress testing that allows you to perform script creation, test execution, monitoring and result report generator simultaneously. Open source nGrinder provides an easy way to conduct stress testing by eliminating inconveniences and providing an integrated environment. It is licensed under the Apache License Version 2.0 and is an open source web performance testing platform based on Grinder, which was redesigned and improved by the development team of NHN Corporation, the largest Internet company in South Korea.

http://naver.github.io/ngrinder/

nGrinder consists of three components

Controller: A web application that enables performance testers to create test scripts and configure test-related parameters, and automatically distribute test scripts to agents.

agent: Load and run the test process and threads on the proxy server. It is recommended not to deploy it on the server being tested.

Monitor: used to monitor the system performance of the server under test (for example, CPU/MEMORY) and must be deployed on the server under test.

nGrinder Architecture

How it works

It consists of a controller and multiple agents. The test scenario is established through the controller (browser access) and then distributed to the agent for stress testing.
Users write test scripts according to certain specifications, and the controller distributes the scripts and required resources to the agent and executes them using Jython.
During the script execution, collect the running status, response time, test the running status of the target server, etc. And save these data to generate a test report, which is displayed in the form of dynamic graphs and data tables. Users can easily see the TPS, CPU and memory of the tested server.
Deployment

1. Single Controller with Multiple Agents

2. Multiple Controllers and Multiple Agents

Running nGrinder on Docker

Run the controller

docker pull ngrinder/controller
docker run -d -v ~/ngrinder-controller:/opt/ngrinder-controller --name controller -p 80:80 -p 16001:16001 -p 12000-12009:12000-12009 ngrinder/controller

The controller creates a data folder under /opt/ngrinder-controller to maintain test history and configuration data. In order to persist the data you should map the folder /opt/ngrinder-controller on the container to a folder on the host.

Port Information:

80: Default controller Web UI port.

9010-9019: Agents connect to the Controller cluster through these ports.

12000-12029: The controller distributes stress tests through these ports.

Run the agent

docker pull ngrinder/agent
docker run -d --name agent --link controller:controller ngrinder/agent

docker-compose quick deployment

Use docker-compose service to arrange a Controller and two agents:

Write yml

vim docker-compose.yml

ngrinder-controller-1:
 image: ngrinder/controller
 container_name: ngrinder-controller-1
 hostname: ngrinder-controller-1
 ports:
  - 8087:80
  - 16001:16001
  - 12000-12009:12000-12009
 volumes:
  - /data/ngrinder/controller-1:/opt/ngrinder-controller
ngrinder-agent-1:
 image: ngrinder/agent
 container_name: ngrinder-agent-1
 hostname: ngrinder-agent-1
 volumes:
  - /data/ngrinder/agent-1:/opt/ngrinder-agent
 command:
  - 10.255.254.25:8087
ngrinder-agent-2:
 image: ngrinder/agent
 container_name: ngrinder-agent-2
 hostname: ngrinder-agent-2
 volumes:
  - /data/ngrinder/agent-2:/opt/ngrinder-agent
 command:
  - 10.255.254.25:8087

start up

docker-compose -f docker-compose.yml -d up

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Analysis of the implementation process of Docker intranet penetration frp deployment
  • How to deploy MySQL and Redis services using Docker
  • How to install tomcat in docker and deploy the Springboot project war package
  • Steps to deploy multiple tomcat services using DockerFile on Docker container
  • Docker image creation, uploading, pulling and deployment operations (using Alibaba Cloud)
  • Detailed deployment of docker+gitlab+gitlab-runner
  • How to deploy stand-alone Pulsar and clustered Redis using Docker (development artifact)
  • Analysis of the Docker deployment Consul configuration process

<<:  uniapp implements date and time picker

>>:  MySQL database rename fast and safe method (3 kinds)

Recommend

Vue-Element-Admin integrates its own interface to realize login jump

1. First look at the request configuration file, ...

Use of Linux tr command

1. Introduction tr is used to convert or delete a...

jQuery achieves large-screen scrolling playback effect

This article shares the specific code of jQuery t...

Vue's vue.$set() method source code case detailed explanation

In the process of using Vue to develop projects, ...

Will the index be used in the MySQL query condition?

When an employer asks you whether an index will b...

Example of how to set div background transparent

There are two common ways to make div background ...

How to use libudev in Linux to get USB device VID and PID

In this article, we will use the libudev library ...

Mariadb remote login configuration and problem solving

Preface: The installation process will not be des...

Vue implements online preview of PDF files (using pdf.js/iframe/embed)

Preface I am currently working on a high-quality ...

jQuery realizes the scrolling effect of table row data

This article example shares the specific code of ...

CentOS6.9+Mysql5.7.18 source code installation detailed tutorial

CentOS6.9+Mysql5.7.18 source code installation, t...

Mybatis implements SQL query interception and modification details

Preface One of the functions of an interceptor is...

How to display small icons in the browser title bar of HTML webpage

Just like this effect, the method is also very si...

Realize breadcrumb function based on vue-router's matched

This article mainly introduces the breadcrumb fun...