HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
cirospaciari
socketify.py
Python2022–2023
cirospaciari / socketify.py

socketify.py

Bringing Http/Https and WebSockets High Performance servers for PyPy3 and Python3

4Distinct people
10Mentions
0Explicit recommenders
1.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Bringing Http/Https and WebSockets High Performance servers for PyPy3 and Python3

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week10 dated mentions

Observed mentions: 2022-11-08 20:08:45 UTC to 2023-01-10 16:44:05 UTC. Weeks start Monday, UTC.

0123452022-11-07 00:00:00 UTC to 2022-11-14 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 commentsNov 72022-11-14 00:00:00 UTC to 2022-11-21 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2022-11-21 00:00:00 UTC to 2022-11-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-11-28 00:00:00 UTC to 2022-12-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-05 00:00:00 UTC to 2022-12-12 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsDec 52022-12-12 00:00:00 UTC to 2022-12-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-19 00:00:00 UTC to 2022-12-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-26 00:00:00 UTC to 2023-01-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-02 00:00:00 UTC to 2023-01-09 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-09 00:00:00 UTC to 2023-01-16 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 commentsJan 9

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 72022-11-07 00:00:00 UTC2022-11-14 00:00:00 UTC220
Nov 142022-11-14 00:00:00 UTC2022-11-21 00:00:00 UTC110
Nov 212022-11-21 00:00:00 UTC2022-11-28 00:00:00 UTC000
Nov 282022-11-28 00:00:00 UTC2022-12-05 00:00:00 UTC000
Dec 52022-12-05 00:00:00 UTC2022-12-12 00:00:00 UTC110
Dec 122022-12-12 00:00:00 UTC2022-12-19 00:00:00 UTC000
Dec 192022-12-19 00:00:00 UTC2022-12-26 00:00:00 UTC000
Dec 262022-12-26 00:00:00 UTC2023-01-02 00:00:00 UTC000
Jan 22023-01-02 00:00:00 UTC2023-01-09 00:00:00 UTC101
Jan 92023-01-09 00:00:00 UTC2023-01-16 00:00:00 UTC514

What Hacker News says

10 sources
I'm reading some arguments and counter-arguments in this thread, and in my opinion it kinda boils down to what point of view you're having. If you look at it as a framework that minimises the networking overhead, then fine, it's an interesting piece of software. If on the other hand you look at it like a "fast" web framework then things start to change and the discussion gets a bit more complicated. So for example, you look at the source code of the applications being benchmarked (example: https://github.com/cirospaciari/socketify.py/blob/main/bench...) and you immediately see it's simply returning the string "hello world"). Which means that it's almost 100% of the time running in the fast path / best case. My guess is that as soon as you start doing any kind of computation in the request handler in normal non-super-optimized python (triv
Read the rest
al example: validating some headers and/or checking some signatures as you would do with jwt tokens for example) then the python-vs-golang gap will start to go back to favour golang. And then again, it boils down to what you're doing: anything io-intensive might benefit from the unetworking/uwebsocket beneath, anything cpu-intensive will benefit from the golang compiler producing native executable code. Nice work anyways.
In Show HN: Socketify.py: Http/Https and WebSockets servers for PyPy3 and Python3
After starting the project called socketify.py at https://github.com/cirospaciari/socketify.py, I got pretty good results and reviews, but many people asked if socketify.py could be used to create a WSGI and ASGI server. WSGI and ASGI have a lot of overhead, that's is why I choose not to use them in the first place, but adding an ASGI and WSGI server allows a lot of code already written to run faster! The focus of socketify is PyPy not because it allows for more CPU-intensive workloads, but because it also allows removing a lot of overhead of CPython itself! The performance targets for ASGI with CPython were the same as uvicorn for ASGI and meinheld for WSGI, and I am happy to say that we got it to be faster in most cases and at least on pair in the worst case! Socketify ASGI 541,645 vs uvicorn 337,265 in CPython every single framework go
Read the rest
t a performance boost in WSGI and/or ASGI. Falcon is the only one that is a little bit faster in WSGI with meinheld using CPython but socketify WSGI managed to get into the same ballpark of performance. Using with PyPy we are the fastest ASGI and WSGI in all scenarios with a HUGE margin. Falcon manage to pass the 1 million requests/s mark, and Flask and Django are faster than ever socketify WSGI, FastAPI from 165k using uvicorn + gunicorn goes to 423k using socketify ASGI with PyPy Emmett from 208k using uvicorn + gunicorn goes to 558k using socketify ASGI with PyPy Falcon is the ASGI champion in throughput with 625k requests/s
In Show HN: I started the development of the fastest ASGI and WSGI Server

Show HN: This is how i got more performance in WebSockets than Bun using Python

Bun is changing out the scenario for Node.js, with much more performance in HTTP and WebSockets, but how FAST it is compared with Python? In the Bun website https://bun.sh/, the source code of the WebSocket benchmark is available, so... let's try to run Falcon + uvicorn on it! I just simplified a little the benchmark, to remove a string concatenation, to measure more of the raw throughput with less impact other things, and runned using Falcon + uvicorn and socketify.py, when benchmarking i was talking with Vytautas Liuolia in the Falcon Gitter for tunning HTTP performance in other raw throughtput testing as well, and Falcon is not so much focused on WS performance, this also depends a lot of ASGI server too. For this test i choose uvicorn with gunicorn as ASGI server. Messages per second with Linux x64: https://raw.githubusercontent.com/c
Read the rest
irospaciari/socketify.py/... Socketify got almost 900k messages/s with PyPy3 and 860k with Python3 the same performance as Bun that also uses uWebSockets, Falcon at 35k messages/s and Falcon with PyPy3 improves into 56k messages/s, node.js manages 192k. You can see the source code for the benchmark here https://github.com/cirospaciari/socketify.py/tree/main/bench and if you have some time check out the github https://github.com/cirospaciari/socketify.py this project can be even better with some community love ;)
1 points · Open discussion

Show HN: Socketify.py – Maybe the fastest web framework for Python and PyPy

Hi i'm Ciro and I have been integration uWebSockets/uSockets with Python to delivery very fast Http, Http2, Http3 and WebSockets performance. Almost a year now working in my free time, is almost at the point from its first release. Support all major platforms Windows, Linux, macOS x64 & Silicon, and supporting PyPy are major goals. I now writting the documentation, and want some feedback on the project. Thanks!
1 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.