Live data from Hacker News

Soketi: Simple, fast and resilient open-source WebSockets server

soketi.app

31–40 of 40 posts

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#31

What can I use it for? What is it?

Given the comparison to Pusher and Ably, it looks like it’s an HTTPWebSocket bridge. Deploying WebSockets in production systems is tough because they use long-lived connections. Companies like Pusher solve this by serving the long-lived connections on their infrastructure, and relaying messages to your server over webhooks.

It’s used for things like notifying users when they get a DM, or displaying live sports scores.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#32
post #15

Earlier quoted context omitted.

That 5$ instance will cover 90% of the needs of 90% of the businesses out there. You. Are. Not. Google/Facebook/Netflix/TikTok.

> You. Are. Not. Google/Facebook/Netflix/TikTok. That cannot be repeated enough. 90% of the tech flaunted here on HN is interesting only on a technical level, never in a business setting. I suspect Google released Kubernetes to hamstring all competition. You do not need it. Unless you're Google.

I agree with the “you are not FAANG” sentiment and I think HN could use the frequent reminder, but I’ve come around on Kubernetes. As soon as you have multiple services that need to talk to each other in multiple environments (staging, prod, etc), infrastructure-as-code is immensely useful. Kubernetes lets you do IAC without tying yourself to a particular cloud.

So it’s overkill for a CRUD app, but you certainly don’t need the scale of Google to find it useful.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#33

> Written on top of C, ported to Node.js. I think what they mean is it uses uWebSockets.js, a Node.js module wrapping a C++ implementation. https://github.com/uNetworking/uWebSockets.js

If you want a really fast cheap websockets server that scales to 250,000 cc on a single node, I wrote xtomp.tp23.org using nginx as a base.

Its a STOMP protocol server written in non-blocking C. +web sockets.

There is no code required in the nginx part because it implements stomp topics and queues. If you want code, it plugs into a rust based stomp server talking reverse STOMP protocol, so you can code all you like in rust and scale out with n x nginx servers.

It is very very low on cpu use. I wrote it because rabbitmq used 5% cpu while idle. Xtomp uses close to 0% cpu when idle because nginx.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#35

I'm a php & mysql -dev and still can't understand these websockets. What if I have a cron job that sends messages to this websocket server and it pushes them to web-app (vue front, added to home screen on mobile phone, not an installed app) push notification. How this can be done ? and how can the server even keep up with the websocket connections to thousands of clients ? does the websocket re-open if user restarts…

Try https://channelstream.org/ - you can talk via rest calls to it - it scales up to thousands of connections on a single small machine. You have tiny JS WS/long pool clients available with reconnection logic or you can roll your own if you like.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#36

Oof Ably not looking so good suddenly..

Ably is solid and generally much cheaper than the alternatives like pubnub.

Also they come with reliable message delivery built in (pusher doesn’t I think). Not really sure how it compares to this project.

Anyways just a happy user of ably, used it at work.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#37

Earlier quoted context omitted.

The creator of Soketi here. Even if I have 50-100 concurrent connections on most of the projects, I don't wanna be throttled by how many messages I can distribute to my end users - I might have < 100 users, but maybe I have to distribute fresh updates each 5 seconds, what do I do?

You use a stack which supports it. Elixir and Erlang support millions of concurrent websocket connections on a single, albeit beefy, server. https://phoenixframework.org/blog/the-road-to-2-million-webs...

I can't believe this article is 7 years old.

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#38

> Written on top of C, ported to Node.js. I think what they mean is it uses uWebSockets.js, a Node.js module wrapping a C++ implementation. https://github.com/uNetworking/uWebSockets.js

If you want a really fast cheap websockets server that scales to 250,000 cc on a single node, I wrote xtomp.tp23.org using nginx as a base. Its a STOMP protocol server written in non-blocking C. +web sockets. There is no code required in the nginx part because it implements stomp topics and queues. If you want code, it plugs into a rust based stomp server talking reverse STOMP protocol, so you can code all you like i…

Long time since the last commit. I saw the reference to Ubuntu 16.04. Does it work on current distributions?

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#39
post #27

Earlier quoted context omitted.

The library is built on top of uWebsockets which is fairly well-known as being highly optimised and performant, especially if you skip the Node.js wrapper and use the underlying C/C++ lib directly. Does anyone know what tradeoffs or different performance characteristics one would expect to see from e.g. Elixir/Erlang vs uWebsockets?

Elixir/Erlang are surely slower but the BEAM is a fantastic runtime and compensates with fault-tolerance and predictable performance. I know I prefer my server to be as responsive at 1 million connections as at 1 hundred.

How much slower though, I think we’re talking everyone getting the message in a Phoenix channel in < 100ms?

Re: Soketi: Simple, fast and resilient open-source WebSockets server

#40
post #15

Earlier quoted context omitted.

That 5$ instance will cover 90% of the needs of 90% of the businesses out there. You. Are. Not. Google/Facebook/Netflix/TikTok.

> You. Are. Not. Google/Facebook/Netflix/TikTok. That cannot be repeated enough. 90% of the tech flaunted here on HN is interesting only on a technical level, never in a business setting. I suspect Google released Kubernetes to hamstring all competition. You do not need it. Unless you're Google.

I would state this as "you'd be surprised by what you can do with a monolith on a single server"
Post reply on HN