Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artur-shlyapnikov/grpc-service-benchmark
gRPC service testing environment with Prometheus, Grafana, and InfluxDB monitoring stack. Features containerized deployment, JMeter DSL and k6 load testing integration, and automated metric collection
https://github.com/artur-shlyapnikov/grpc-service-benchmark
grpc jmeter-dsl k6 performance
Last synced: about 2 months ago
JSON representation
gRPC service testing environment with Prometheus, Grafana, and InfluxDB monitoring stack. Features containerized deployment, JMeter DSL and k6 load testing integration, and automated metric collection
- Host: GitHub
- URL: https://github.com/artur-shlyapnikov/grpc-service-benchmark
- Owner: artur-shlyapnikov
- Created: 2024-10-26T10:32:59.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T10:42:52.000Z (about 2 months ago)
- Last Synced: 2024-11-06T11:22:23.251Z (about 2 months ago)
- Topics: grpc, jmeter-dsl, k6, performance
- Language: Java
- Homepage:
- Size: 591 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gRPC Performance Testing Lab
[![gRPC Version](https://img.shields.io/badge/gRPC-v1.67.1-blue)](https://grpc.io/)
[![JMeter DSL](https://img.shields.io/badge/JMeter-DSL-blue)](https://github.com/abstracta/jmeter-java-dsl)
[![k6](https://img.shields.io/badge/k6-0.54.0-blue)](https://k6.io/)## Prerequisites
- Docker and Docker Compose
- Make
- Go
- Java 21 (for JMeter DSL tests)## Quick start
1. Initialize the project:
```bash
make init
```2. Start monitoring stack:
```bash
make docker/up
```3. Run tests:
```bash
# Maximum load test with JMeter DSL
make test/max-load/jmeter# Maximum load test with k6
make test/max-load/k6# Run complete test cycle
make test/full-cycle
```## Makefile commands
### Setup
```bash
make init # Initialize project
make build # Build all components
make proto # Generate protobuf files
```### Testing
```bash
make test/max-load/jmeter # Run max load test with JMeter
make test/max-load/k6 # Run max load test with k6
make test/reliability/jmeter # Run reliability test with JMeter
make test/reliability/k6 # Run reliability test with k6
make test/full-cycle # Run all tests
```### Infrastructure
```bash
make docker/up # Start all containers
make docker/down # Stop all containers
make clean # Clean build artifacts
make clean/docker # Clean docker resources
make clean/deep # Deep clean (artifacts + docker)
```## Service endpoints
| Service | Port | URL |
|---------|------|-----|
| gRPC Server | 50052 | localhost:50052 |
| Prometheus | 9090 | |
| Grafana | 3000 | |
| InfluxDB | 8086 | |
| cAdvisor | 8080 | |
| Node Exporter | 9100 | |## Resource Limits
| Service | Memory | CPU |
|---------|--------|-----|
| gRPC Server | 2G | 2 |
| Prometheus | 1G | - |
| InfluxDB | 2G | 1 |
| cAdvisor | 512M | - |
| Node Exporter | 128M | - |## Monitoring
Default Grafana credentials:
- URL:
- Username: admin
- Password: admin### Notes on monitoring
While the current monitoring setup provides core metrics for CPU, RAM, and gRPC-specific indicators, in a production environment, I would extend this with detailed network stack monitoring to better identify potential bottlenecks. For this demonstration, I focused on implementing the custom gRPC sampler for JMeter DSL and core performance metrics to meet the primary objectives while maintaining reasonable delivery timeframes.
## Project structure
```
.
├── config/ # Configuration files
│ ├── grafana/ # Grafana dashboards
│ ├── prometheus/ # Prometheus config
├── grpc-perf-lab/ # gRPC server
├── tests/ # Test files
│ ├── jmeter-dsl/ # JMeter DSL tests
│ └── k6/ # k6 test scripts
└── scripts/ # Utility scripts
```## JVM options
Default JVM options for test execution:
```
-Xmx2g -Xms2g
-XX:MaxMetaspaceSize=512m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-XX:+ParallelRefProcEnabled
```