Skip to content

nenych/nats-test

Repository files navigation

Test NATS

Steps to run

  1. Build the docker image:
docker build -t test/nats:latest .
  1. Install NATS cli: https://docs.nats.io/using-nats/nats-tools/nats_cli
  2. Run docker-compose (will start NATS, prometheus and 2 consumers):
docker-compose -f ./docker-compose.yaml up -d
  1. Start NATS benchmark:
nats bench updates --pub=4 --msgs 1000000000 --size=1000
  1. Wait a little and start the slow consumer:
docker run --rm -it --network=nats-test_default test/nats:latest python3 slow-consumer.py

Explore metrics

  1. Open prometheus: http://localhost:9091/graph
  2. Insert query:
sum by (job) (rate(nats_varz_in_msgs[30s]))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published