More overhead, and it doesn't scale. My nodejs websockets server can handle thousands of connections without a problem, but my rails api server allocates a thread per connection so I'm limited to <16 unless I start horizontal scaling.
For infrequent requests everything goes through the api, but for stuff like chat and live-document-editing, nodejs is the better solution.
> You didn't cite bidi as your reason for choosing WS in your last comment, you cited scaling and node vs ruby.
Because I was answering this question: "What's wrong with normal HTTP requests for client->server streams?"
> You can have bidi without WS.
Only by combining HTTP (which doesn't scale because my api server runs rails) and SSE (which does scale). If I want scaling bidirectional communication, I need websockets.
For infrequent requests everything goes through the api, but for stuff like chat and live-document-editing, nodejs is the better solution.