How Recall.ai Saved $1M on AWS by Eliminating WebSockets
Briefly

"IPC is something that is rarely top-of-mind when it comes to optimising cloud costs. But it turns out that if you IPC 1TB of video per second on AWS it can result in enormous bills when done inefficiently."
"While profiling a sample of bots, the team expected the majority of CPU usage to come from video encoding and decoding. However, they discovered that the largest contributors by far were the Python WebSocket client, which was receiving the data, followed by Chromium's WebSocket implementation, which was sending the data."
"WebSocket seemed like a decent fit for our needs. It was 'fast' as far as web APIs go, convenient to access from within the JS runtime, supported binary data, and most importantly was already built-in to Chromium."
"Although there was no standard interface for transporting data over shared memory, both TCP/IP and Unix Domain Sockets would require, at a minimum, copying data between user-space and kernel-space. The team ultimately decided to design a custom transport to reduce their AWS costs, opting for a ring buffer as the high-level transport structure."
Read at InfoQ
[
|
]