Answer the question
In order to leave comments, you need to log in
What simple web servers do you know for testing the balancer?
We need a server under Linux that would randomly display information about the request and about its instance (hostname, url, ip) or an error. Preferably without external dependencies (for example, node.js) and with a simple config
If there is nothing like this out of the box, please write how to do it in Python, nginx, bash or something else to compare which is easier. Perhaps there is test software designed for this. Which?
Answer the question
In order to leave comments, you need to log in
For example, a simple bash server that returns the server ip for any request
body=$(hostname -I)
while true
do printf 'HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n%s' "${#body}" "${body}\r\n" | nc -l 8080
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question