TLDR: avoid using python and golang for millions of websocket requests, according to this research paper from 2021.

I know benchmarks aren't reality but this worth a look, or debate this if you think its wrong. NodeJS stands up pretty well. relevant, I suppose for #nostr relays. #research #computing

If anyone has more recent papers they like to share, please post them in the comments below!

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3778525

Reply to this note

Please Login to reply.

Discussion

languages and libraries are as follows:

• C / Libwebsockets

• C++ / uWebSockets

• C# / Fleck

• Go / Gorilla

• Java / Java-WebSocket

• NodeJS / uWebsSocket

• PHP / Ratchet

• Python / websockets

• Rust / rust-websocket

They did not test boost::beast. uWebsSocket on the other hand appears twice 👎

I thought Go was web/cloud native google God and would help with that? Hmm

JVM still kicking it with response times (before GC sweeep 🤣🤙)

Old Gen New Gen, bye bye..... ⏳🤣 jk GC1 🤣

Why no erlang? 🤔

Is there a reason golang goes so slow?

it looks like they benchmarked go using gorilla, which afaik is abandoned/unmaintained

Doesn't go have a stdlib implementation of websockets? Wouldn't that be faster

last I checked no, surprisingly.

Interesting. I wonder how v's stdlib would hold up? It's similar to get yet just as fast as c.

cuz it doesn't 'go' 😂 (j/k)

That C line suggests they're doing something seriously wrong

What might be the seriously wrong part? It does seem weird that C would do worse thatn C++ or C#

It's bouncing all over the graph