Skip to content

graphhopper/graphhopper-load-test-fake-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Java

Currently only the async vrp endpoint is mocked: https://docs.graphhopper.com/#operation/asyncVRP

Build

mvn clean package

Run with Java

java -jar target/fake-server.jar [-conf vertx.json]

Run with Docker

docker run -p 8080:8080 graphhopper/graphhopper-load-test-fake-backend

Run with Docker Compose

docker-compose up

Example Configuration

Default port 8080 can be overwritten in the configuration:

{
  "http.port" : 4321
}

Node.js

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.

About

Always the same JSON response to load test the load balancer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published