Question:
Is there a way to use uWSGI as a proxy server?
More about the system:
- 6 load-balanced nginix/uWSGI servers
- Python
Requirements:
- Set up a few proxy servers that can:
- Accept requests from a client browser
- Read and modify request URL
- Read and modify request headers
- Forward request to another proxy server
The reason we would like to use uWSGI as the proxy server is because we are already using uWSGI with the application and all of our Python code will work it.
Right now, we use uWSGI to serve a RESTful http API with Python on the back end. As I understand it, a proxy server works differently than the REST API would.
Please forgive my ignorance, I know very little about proxy servers and how they work. I also realize that these requirements sound totally wacky, but I assure you, there is a rhyme and reason to it.
Thanks so much!
uWSGI has a meta-language for manipulating request and response:
http://uwsgi-docs.readthedocs.org/en/latest/InternalRouting.html
check the "http" instruction.
This system allows really funny things, like advanced caching:
https://github.com/unbit/uwsgi-docs/blob/master/tutorials/CachingCookbook.rst
In the newer versions lot of improvements have been added so you may want to check 1.9.x changelogs too here: https://github.com/unbit/uwsgi-docs/