https://github.com/tf63/wsgi-exp
wsgiで遊ぶだけ
https://github.com/tf63/wsgi-exp
Last synced: 3 months ago
JSON representation
wsgiで遊ぶだけ
- Host: GitHub
- URL: https://github.com/tf63/wsgi-exp
- Owner: tf63
- Created: 2024-06-01T07:28:21.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-01T17:47:53.000Z (about 1 year ago)
- Last Synced: 2025-01-27T05:39:18.320Z (5 months ago)
- Language: Python
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wsgiで遊ぶ
### aiohttp
- ノンブロッキングI/OCPUバウンドな処理
```
received
cpu bound task start
cpu bound task end
send response
received
cpu bound task start
cpu bound task end
send response
```
IOバウンドな処理
```
received
io bound task start
received
io bound task start
io bound task end
send response
io bound task end
send response
```### flask
- ノンブロッキングI/O?
- flaskの開発サーバーであるWerkzeugがスレッドプールを作成してリクエストを並行して処理するらしいCPUバウンドな処理
```
received request
cpu bound task start
received request
cpu bound task start
cpu bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:45:02] "GET /cpu HTTP/1.1" 200 -
cpu bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:45:02] "GET /cpu HTTP/1.1" 200 -
```IOバウンドな処理
```
received request
io bound task start
received request
io bound task start
io bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:43:52] "GET /io HTTP/1.1" 200 -
io bound task end
send response
```### falcon
- ブロッキングI/OCPUバウンドな処理
```
received request
cpu bound task start
cpu bound task end
send response
/usr/local/lib/python3.8/wsgiref/handlers.py:137: DeprecatedWarning: Call to deprecated property body. Please use text instead.
self.result = application(self.environ, self.start_response)
172.22.0.1 - - [01/Jun/2024 17:45:54] "GET /cpu HTTP/1.1" 200 36
received request
cpu bound task start
cpu bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:46:02] "GET /cpu HTTP/1.1" 200 36
```IOバウンドな処理
```
received request
io bound task start
io bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:46:35] "GET /io HTTP/1.1" 200 36
received request
io bound task start
io bound task end
send response
172.22.0.1 - - [01/Jun/2024 17:46:45] "GET /io HTTP/1.1" 200 36
```