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

Html Select uses the selected attribute to set the default selection

Adding the attribute selected = "selected&quo...

Using js to achieve waterfall effect

This article example shares the specific code of ...

Specific use of pthread_create in linux to create threads

pthread_create function Function Introduction pth...

Code analysis of synchronous and asynchronous setState issues in React

React originated as an internal project at Facebo...

Vue.js Textbox with Dropdown component

A Textbox with Dropdown allows users to select an...

Analysis of MySQL multi-table joint query operation examples

This article describes the MySQL multi-table join...

How to use sed command to efficiently delete specific lines of a file

Preface Normally, if we want to delete certain li...

Introduction and use of Javascript generator

What is a generator? A generator is some code tha...

Detailed explanation of the 14 common HTTP status codes returned by the server

HTTP Status Codes The status code is composed of ...

Detailed explanation of Linx awk introductory tutorial

Awk is an application for processing text files, ...

Implementation of vue+drf+third-party sliding verification code access

Table of contents 1. Background 2. Verification p...

Docker container orchestration implementation process analysis

In actual development or production environments,...

Native JS realizes uniform motion of various sports

This article shares with you a uniform motion imp...

What are the benefits of using // instead of http:// (adaptive https)

//Default protocol /The use of the default protoc...

A brief discussion on how Tomcat breaks the parent delegation mechanism

Table of contents JVM Class Loader Tomcat class l...