4 ms·
We actually started with Node + redis, but when we were running load tests, we were having issues with memory consumption. I think, but I am not certain it was
by roder 16y ago
We actually started with Node + redis, but when we were running load tests, we were having issues with memory consumption. I think, but I am not certain it was due to garbage collection around JSON.parse[1].
We ended up re-writing it all in erlang and it solved our problem much better. Erlang is much better suited for multicore, binary, and seemingly memory handling. Frankly, I really enjoyed writing it in erlang as well, but prototyping in Node.js worked out really well.
Regarding redis, we're actually storing the base64 string (list in erlang) as binary. This sounds crazy since we could just store the binary file, but since we'd have to encode it as base64 for all the connected clients receiving the data. This actually lowers CPU usage in the long-run. The image is only cached in redis for a period of time then flushed (or in the future persisted elsewhere) anyhow.
If you're interested in using our server for your feature, just let me know @roder and I'll contact you. Maybe we can work something out.
[1] http://news.ycombinator.com/item?id=1739995 http://news.ycombinator.com/item?id=1739995