3 ms·
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
by herpderperator 4y ago
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 https://ntfy.sh/docs/subscribe/api/#subscribe-as-json-stream
[1] https://ntfy.sh/docs/subscribe/api/#subscribe-as-raw-stream https://ntfy.sh/docs/subscribe/api/#subscribe-as-raw-stream
[2] https://en.wikipedia.org/wiki/Slowloris_(computer_security) https://en.wikipedia.org/wiki/Slowloris_(computer_security)
- binwiederhier 4y agoYes, 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.