This server mocks some of the back end servers to load test our load balancer without the need for expensive backend servers. We have two implementations currently: Java and Node.js.
Currently only the async vrp endpoint is mocked: https://docs.graphhopper.com/#operation/asyncVRP
mvn clean package
java -jar target/fake-server.jar [-conf vertx.json]
docker run -p 8080:8080 graphhopper/graphhopper-load-test-fake-backend
docker-compose up
Default port 8080 can be overwritten in the configuration:
{
"http.port" : 4321
}
To run the server in Node.js, run the following:
docker run -d --rm --network host --name vrp-fake -v "$PWD"/node:/usr/src/app -w /usr/src/app node:8 node server.js [port]
This will run a Node 8 Docker container, pass in the node/server.js
file and run that on the selected port.