proxy.TestCaseunittest.TestCaseValueError: filedescriptor out of range in selectngrokFast & Scalable
Scale up by using all available cores on the system
Threadless executions using asyncio
Made to handle tens-of-thousands connections / sec
```console
❯ python --version Python 3.11.8 ❯ oha --version oha 1.4.3 ❯ ./benchmark/compare.sh CONCURRENCY: 100 workers, DURATION: 1m, TIMEOUT: 1sec ============================= Benchmarking Proxy.Py Server (pid:75969) running Summary: Success rate: 100.00% Total: 60.0006 secs Slowest: 0.2525 secs Fastest: 0.0002 secs Average: 0.0019 secs Requests/sec: 51667.3774
Total data: 56.17 MiB
Size/request: 19 B
Size/sec: 958.64 KiB
Response time histogram: 0.000 [1] | 0.025 [3073746] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.051 [10559] | 0.076 [4980] | 0.101 [2029] | 0.126 [5896] | 0.152 [2466] | 0.177 [116] | 0.202 [40] | 0.227 [52] | 0.253 [87] |
Response time distribution: 10.00% in 0.0005 secs 25.00% in 0.0007 secs 50.00% in 0.0009 secs 75.00% in 0.0014 secs 90.00% in 0.0021 secs 95.00% in 0.0035 secs 99.00% in 0.0198 secs 99.90% in 0.1262 secs 99.99% in 0.1479 secs
Details (average, fastest, slowest): DNS+dialup: 0.0018 secs, 0.0004 secs, 0.0031 secs DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0002 secs
Status code distribution: [200] 3099972 responses
Error distribution: [100] aborted due to deadline ============================= ```
Consult Threads vs Threadless and Threadless Remote vs Local Execution Mode to control number of CPU cores utilized.
See Benchmark for more details and for how to run benchmarks locally.
Lightweight
~5-20 MB RAM~25 MBNo external dependency other than standard Python library
Programmable
--plugins proxy.plugin.ProxyPoolPlugin--enable-web-server --plugins proxy.plugin.WebServerPlugin--enable-reverse-proxy --plugins proxy.plugin.ReverseProxyPluginPlugin API is currently in development phase. Expect breaking changes. See Deploying proxy.py in production on how to ensure reliability across code changes.
Can listen on multiple addresses and ports
--hostnames flag to provide additional addresses--ports flag to provide additional ports--port flag to override default port 8899Capable of serving multiple protocols over the same port
Real-time Dashboard
--enable-dashboardhttp://localhost:8899/dashboardproxy.py at runtimetypescript based pluginsDashboard is currently in development phase Expect breaking changes.
Secure
proxy.pyPrivate
$ claude mcp add proxy.py \
-- python -m otcore.mcp_server <graph>