←back to thread

261 points tosh | 7 comments | | HN request time: 0.263s | source | bottom
1. OptionOfT ◴[] No.42068148[source]
Did they originally NOT run things on the same machine? Otherwise the WebSocket would be local and incur no cost.
replies(4): >>42068249 #>>42068326 #>>42068338 #>>42070889 #
2. jgauth ◴[] No.42068249[source]
Did you read the article? It is about the CPU cost of using WebSockets to transfer data over loopback.
replies(1): >>42068586 #
3. magamanlegends ◴[] No.42068326[source]
our websocket traffic is roughly 40% of recall.ai and our bill was $150 USD this month using a high memory VPS
4. nemothekid ◴[] No.42068338[source]
>WebSocket would be local and incur no cost.

The memcopys are the cost that they were paying, even if it was local.

5. kunwon1 ◴[] No.42068586[source]
I read the entire article and that wasn't my takeaway. After reading, I assumed that AWS was (somehow) billing for loopback bandwidth, it wasn't apparent (to me) from the article that CPU costs were the sticking point
replies(1): >>42069778 #
6. DrammBA ◴[] No.42069778{3}[source]
> We set a goal for ourselves to cut this CPU requirement in half, and thereby cut our cloud compute bill in half.

From the article intro before they dive into what exactly is using the CPU.

7. ted_dunning ◴[] No.42070889[source]
The article describes why this isn't the problem. You might enjoy reading it.

The basic point is that WebSockets requires that data move across channels that are too general and cause multiple unaligned memory copies. The CPU cost to do the copies was what cost the megabuck, not network transfer costs.