Skip to content

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

Notifications You must be signed in to change notification settings

artur-shlyapnikov/grpc-service-benchmark

Repository files navigation

gRPC Performance Testing Lab

gRPC Version JMeter DSL k6

Prerequisites

  • Docker and Docker Compose
  • Make
  • Go
  • Java 21 (for JMeter DSL tests)

Quick start

  1. Initialize the project:
make init
  1. Start monitoring stack:
make docker/up
  1. Run tests:
# 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

make init              # Initialize project
make build             # Build all components
make proto             # Generate protobuf files

Testing

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

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 http://localhost:9090
Grafana 3000 http://localhost:3000
InfluxDB 8086 http://localhost:8086
cAdvisor 8080 http://localhost:8080
Node Exporter 9100 http://localhost:9100

Resource Limits

Service Memory CPU
gRPC Server 2G 2
Prometheus 1G -
InfluxDB 2G 1
cAdvisor 512M -
Node Exporter 128M -

Monitoring

Default Grafana credentials:

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

About

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

Topics

Resources

Stars

Watchers

Forks