Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastepoll-1.0.0.tar.gz (71.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastepoll-1.0.0-py3-none-any.whl (70.7 kB view details)

Uploaded Python 3

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

Hashes for fastepoll-1.0.0.tar.gz
Algorithm Hash digest
SHA256 38d6108beac436abea5ba4baa00f5bf9d077292e2217e01a50dc7366b91fb85b
MD5 456917daf696aa9393f090e4628988f5
BLAKE2b-256 3cdbc52e15c08b063993fcb031947c8f31147cdd342019d6afc1e3a3e0dff9ac

See more details on using hashes here.

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

Hashes for fastepoll-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6320c7f85f1a7a90586077d1c39482a046ef8a4139f0edac6f77a473f1f8122
MD5 14fcda4ded119fe090e7950679093e8e
BLAKE2b-256 e450f0778a3842d6e564a2ab8d8050c42015c14b4c0c57e408c82d84b57a548c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page