https://github.com/kellyjonbrazil/microtest
simple microservice simulator to test load balancers and WAFs
https://github.com/kellyjonbrazil/microtest
Last synced: 3 months ago
JSON representation
simple microservice simulator to test load balancers and WAFs
- Host: GitHub
- URL: https://github.com/kellyjonbrazil/microtest
- Owner: kellyjonbrazil
- License: mit
- Created: 2019-08-09T17:07:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-29T20:08:10.000Z (almost 6 years ago)
- Last Synced: 2025-02-06T08:28:39.824Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: LICENSE
Awesome Lists containing this project
README
# microtest
Also available on Docker Hub: https://hub.docker.com/r/kellybrazil/microtest
This is a very simple web server that simulates a microservice running on port 8080. It replies with the server's hostname, server's IP address, the remote IP address, local server time, and the URI path from the client:
```
hostname: 04909ed3d467 ip: 172.17.0.3 remote: 172.17.0.1 time: Fri Aug 9 16:17:39 2019 path: /request_number_65
```If the client request uses the `POST` method instead of `GET`, the output will be `Content-Type: application/json` and serialized in JSON:
```
{"hostname": "04909ed3d467", "ip": "172.17.0.3", "remote": "172.17.0.1", "time": "Fri Aug 9 16:19:13 2019", "path": "/request_number_100"}
```This allows you to simply test load balancer and WAF configurations in microservices environments.
Client requests:
```
curl 1.2.3.4:8080/request_number_1
```
or
```
curl -X POST 1.2.3.4:8080/request_number_2
```An example client shell script is included to show how you can increment the path to see which servers are getting which requests.