my understanding is that if the requests are less than 3, or are distributed over minutes, than http.

Else websocket.

wdyt?

Reply to this note

Please Login to reply.

Discussion

Yep. Good old https rest api does the job for 95% of the functionality. However, when you need async event driven stuff, websockets is the way to go. For example, when I am waiting for a Lightning payment, I prefer to use a websockets to push the event through when it comes rather than poll for it. A lot less stress on the server.

If you're going for raw performance and you don't care about backwards-compatibility or about breaking the openness and simplicity of the protocol there are ways to do things that are much better than JSON over WebSockets or HTTP.

gr8"ways" t y/