Sign inSign up

petechua/python-webapp

By petechua

•Updated about 4 years ago

The python_webapp is useful for performing HTTP load-balancing tests to a cluster of nodes.

Image
0

143

petechua/python-webapp repository overview

The python_webapp is useful for performing HTTP load-balancing tests to a cluster of nodes. For example, to test a kubernetes cluster. The web app displays a couple of outputs based on a simple Python Flask app:

  • Server DateTime
  • Server Hostname
  • Server IP
  • Client IP
  • Client IP(XFF)

Components version: python:3.10.5-slim-buster flask==2.1.2

*Flask listens on TCP Port 8080

⁠To start the application

Step 1: Docker run

docker run -it -p 5000:8080 petechua/python-webapp:1.0

Step 2: Run HTTP GET to python-webapp

Example
#######
curl --header "X-Forwarded-For: 192.168.0.2" http://172.16.1.71:5000

Output
######
Server DateTime:2022-07-06 09:55:16.842094
Server Hostname:2c03861afa63
Server IP:172.17.0.8
Client IP:172.16.1.208
Client IP(XFF):192.168.0.2

Tag summary

Content type

Image

Digest

Size

47.2 MB

Last updated

about 4 years ago

docker pull petechua/python-webapp:1.0