This project offers a "playground" where users can run performance experiments.
It implements a very simple ad exchange like system with a complete observability stack already set.
The app and stack are kept simple on purpose; some known inefficiencies are intentional so that changes show up clearly in metrics.
The whole system is deployed with the docker-compose.yml at the project root.
To run everything, execute the following command:
make up
To stop everything, execute:
make down
Check the Makefile for all the commands available.
The docker-compose.yml will deploy everything inter-connected and ready to be used.
The project comes with a basic load testing script based on k6.
Check it out at load-testing.
To run the load test, execute:
make k6
A simple cURL to run an HTTP request against the ad exchange, through the load balancer:
curl -sS -X POST 'http://localhost:9999/ad' -H 'Content-Type: application/json' -H 'Content-Encoding: gzip' --data-binary @<(printf '%s' '{"id":"1","imp":[{"id":"1","banner":{"w":300,"h":250}}],"app":{"id":"1250","publisher":{"id":"1"}}}' | gzip -c)
The project contains scripts to generate data for the ad exchange experiment application. Check the scripts in the tools directory.
The data will be saved at the directory d, at the project root.
The very basic ad exchange is implemented with Go. You can find it at flavors/adtech.
The entrypoint for the system is a Load Balancer implemented with Nginx. Check it out at lb.
Observability is heavily based on VictoriaMetrics stack, with Grafana being used for metrics visualization.
For continuous-profiling, Pyroscope is used.
The observability stack is configured in the directory o11y, and deployed using this docker-compose.
Here is the list of the whole stack:
- Go (basic ad exchange).
- Nginx (Load Balancer).
- VictoriaMetrics.
- VictoriaLogs.
- VM Alerts.
- Alertmanager.
- Grafana.
- Pyroscope.
This project is MIT licensed.