
To facilitate end-to-end testing for such scenarios, I architected a proxy infrastructure; A stripped-down version of which was a Proxy.py - lightweight HTTP proxy server in Python. Blog post: https://abhinavsingh.com/proxy-py-a-lightweight-single-file-http-proxy-server-in-python/ Github page: https://github.com/abhinavsingh/proxy.py Features Fast & Scalable Scales by using all available cores on the system Threadless executions using coroutine Made to handle tens-of-thousands connections / sec # On Macbook Pro 2015 / 2.8 GHz Intel Core i7 ❯ hey -n 10000 -c 100 https://localhost:8899/ Summary: Total: 0.6157 secs Slowest: 0.1049 secs Fastest: 0.0007 secs Average: 0.0055 secs Requests/sec: 16240.5444 Total data: 800000 bytes Size/request: 80 bytes Response time histogram: 0.001 [1] | 0.011 [9565] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.022 [332] |■ Lightweight Uses only ~5-20MB RAM No external dependency other than standard Python library Programmable Optionally enable builtin Web Server Customize proxy and http routing via plugins Enable plugin using command line option e.g. --plugins proxy.plugin.CacheResponsesPlugin Plugin API is currently in development....