Dispatch is an API Gateway written in Java which aims to be simple, lightweight, and extensible.
Dispatch uses Jetty and Virtual Threads.
mvn clean compile exec:java
You can build a single JAR executable with
mvn package
Dispatch uses a YAML-based configuration format based on routes, backends, and policies.
routes:
method: 'GET'
path: '/v1/hello/{name}'
backend:
- type: static
responseCode: 200
responseBody: 'Hello, World!'
policies:
- name: rate-limit
echo "GET http://localhost:8080/" | vegeta attack -duration=30s -rate=1000 -output=results.bin && cat results.bin | vegeta plot --title="Load Test Results" > load-test