worker_factory
but I don't know how to pass arguments to the service class constructor
worker_factory
is for providing alternative dependencies when creating a service worker.
pip install --pre nameko
. more prerelease users are always appreciated
nameko
is our benchmarking project => the-benchmarker/web-frameworks#1269nameko
perform really badly | Language | Framework | Average | 50th percentile | 90th percentile | Standard deviation | Requests / s | Throughput |
|----|----|--------:|------------:|--------:|---------:|-------:|----|
| python (3.7)| japronto (0.1) | **4.74** ms | 4.15 ms | 9.58 ms | 3801.00 | 191383.33 | 15.18 Mb |
| python (3.7)| falcon (2.0) | **11.74** ms | 10.05 ms | 19.82 ms | 6678.33 | 79730.67 | 12.38 Mb |
| python (3.7)| bottle (0.12) | **15.21** ms | 12.60 ms | 24.85 ms | 8697.00 | 62003.67 | 10.13 Mb |
| python (3.7)| asgineer (0.7) | **17.72** ms | 15.48 ms | 29.57 ms | 9034.00 | 52988.33 | 6.27 Mb |
| python (3.7)| blacksheep (0.2) | **18.58** ms | 16.81 ms | 29.41 ms | 8565.33 | 49853.67 | 6.65 Mb |
| python (3.7)| hug (2.6) | **18.62** ms | 14.86 ms | 31.37 ms | 11104.33 | 50375.33 | 8.28 Mb |
| python (3.7)| starlette (0.12) | **19.34** ms | 17.18 ms | 32.22 ms | 9976.00 | 48439.67 | 6.92 Mb |
| python (3.7)| clastic (19.9) | **35.16** ms | 30.26 ms | 54.82 ms | 14244.67 | 26162.00 | 4.30 Mb |
| python (3.7)| fastapi (0.42) | **35.41** ms | 30.42 ms | 60.55 ms | 19508.33 | 27154.33 | 3.89 Mb |
| python (3.7)| molten (0.27) | **38.26** ms | 32.04 ms | 56.36 ms | 18283.33 | 24758.33 | 3.05 Mb |
| python (3.7)| aiohttp (3.6) | **38.96** ms | 35.55 ms | 58.91 ms | 14442.33 | 23819.67 | 3.58 Mb |
| python (3.7)| flask (1.1) | **42.25** ms | 37.08 ms | 64.19 ms | 20112.67 | 21772.67 | 3.56 Mb |
| python (3.7)| sanic (19.9) | **44.89** ms | 40.75 ms | 71.11 ms | 20225.33 | 20474.00 | 2.42 Mb |
| python (3.7)| bocadillo (0.18) | **46.12** ms | 40.05 ms | 78.93 ms | 24297.00 | 20486.33 | 2.62 Mb |
| python (3.7)| quart (0.10) | **77.16** ms | 64.68 ms | 131.77 ms | 35262.00 | 12008.00 | 1.59 Mb |
| python (3.7)| responder (1.3) | **92.84** ms | 84.83 ms | 153.63 ms | 35912.67 | 9883.33 | 1.43 Mb |
| python (3.7)| tornado (5.1) | **102.96** ms | 96.28 ms | 142.19 ms | 37102.00 | 8784.00 | 1.73 Mb |
| python (3.7)| django (2.2) | **104.97** ms | 89.79 ms | 166.26 ms | 44089.67 | 8669.00 | 1.67 Mb |
| python (3.7)| masonite (2.2) | **124.16** ms | 109.88 ms | 208.84 ms | 47032.00 | 7241.00 | 1.18 Mb |
| python (3.7)| cyclone (1.3) | **364.58** ms | 314.85 ms | 391.55 ms | 459904.00 | 2264.33 | 0.38 Mb |
| python (3.7)| nameko (2.11) | **658.48** ms | 646.13 ms | 675.69 ms | 488592.33 | 1221.67 | 0.17 Mb |
max_workers
to 5000 since the concurrency is 1000