Fast asyncio and uvloop-replacement for Linux using multiprocess epoll and shared memory
Project description
Description
Fast epoll server for Python3 (asyncio and uvloop server replacement) w/ Linux and TCP-support only (for now).
HTTP benchmarks
Tools used: wrk with the parameters 120 connections over 6 threads. Hardware: server running on a 50% underclocked Intel Core Ultra 7 with 22 CPU threads.
| Name | Requests per second | Connection type |
|---|---|---|
| Asyncio | 14466 | close |
| Uvloop | 30608 | close |
| Fastepoll | 76072 | close |
| Asyncio | 109428 | keep-alive |
| Uvloop | 134465 | keep-alive |
| Nginx | 347217 | keep-alive |
| Fastepoll | 408639 | keep-alive |
Example code
Note: this code won't reach benchmark performance above due to wrk being picky about required missing HTTP headers such as the date field. For the exact benchmark code used above check out bench directory.
import fastepoll
class Test:
def connection_made(self, transport):
self.transport = transport
def data_received(self, data):
self.transport.send(b"HTTP/1.0 200 OK\r\n\r\nHello World")
self.transport.close()
def eof_received(self):
pass
fastepoll.run_forever(Test, ":::8080")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastepoll-1.0.0.tar.gz.
File metadata
- Download URL: fastepoll-1.0.0.tar.gz
- Upload date:
- Size: 71.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d6108beac436abea5ba4baa00f5bf9d077292e2217e01a50dc7366b91fb85b
|
|
| MD5 |
456917daf696aa9393f090e4628988f5
|
|
| BLAKE2b-256 |
3cdbc52e15c08b063993fcb031947c8f31147cdd342019d6afc1e3a3e0dff9ac
|
File details
Details for the file fastepoll-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fastepoll-1.0.0-py3-none-any.whl
- Upload date:
- Size: 70.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6320c7f85f1a7a90586077d1c39482a046ef8a4139f0edac6f77a473f1f8122
|
|
| MD5 |
14fcda4ded119fe090e7950679093e8e
|
|
| BLAKE2b-256 |
e450f0778a3842d6e564a2ab8d8050c42015c14b4c0c57e408c82d84b57a548c
|