https://github.com/graphhopper/graphhopper-load-test-fake-backend
Always the same JSON response to load test the load balancer
https://github.com/graphhopper/graphhopper-load-test-fake-backend
Last synced: 21 days ago
JSON representation
Always the same JSON response to load test the load balancer
- Host: GitHub
- URL: https://github.com/graphhopper/graphhopper-load-test-fake-backend
- Owner: graphhopper
- Created: 2020-04-09T14:54:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T16:22:49.000Z (over 4 years ago)
- Last Synced: 2025-01-11T11:36:51.422Z (over 1 year ago)
- Language: Java
- Size: 30.3 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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
```bash
java -jar target/fake-server.jar [-conf vertx.json]
```
### Run with Docker
```bash
docker run -p 8080:8080 graphhopper/graphhopper-load-test-fake-backend
```
### Run with Docker Compose
```bash
docker-compose up
```
### Example Configuration
Default port 8080 can be overwritten in the configuration:
```json
{
"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.