Hacker News new | past | comments | ask | show | jobs | submit login

How do the JSON[0] and raw text[1] streams work? Doesn't that require there to be a thread running on the server for every connected client?

How does that not become a slowloris attack? [2]

[0] https://ntfy.sh/docs/subscribe/api/#subscribe-as-json-stream

[1] https://ntfy.sh/docs/subscribe/api/#subscribe-as-raw-stream

[2] https://en.wikipedia.org/wiki/Slowloris_(computer_security)




Yes, subscribing requires connected clients to keep a connection open. I've tested this with many many thousand sockets and it seems to scale so far.

Additionally I limit the number of subscriptions per IP address.

So far so good.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: