
2/18/2009 · Chris Piro
What this post added
This post details specific engineering challenges and solutions for scaling Facebook Chat. It describes memory footprint optimizations in Erlang channel servers by using character arrays instead of linked lists and forcing garbage collection before sleep. It also addresses heap fragmentation issues in C++ chatloggers caused by lexical_cast within loops, resolved by moving allocations outside the loop. For presence servers, it highlights the trade-off of using zlib compression to manage high write traffic. Operational challenges with load balancers causing connection resets were resolved by adding more load balancers. The post also mentions the use of Scribe for log aggregation and fb303/Thrift for metrics export to monitor system health.