Dark caven free chat
Cache misses and database failure can be detected by the non-database layers and either reported to the user or worked around using replication.
Both subsystems are clustered and partitioned for reliability and efficient failover. In short, because the problem domain fits Erlang like a glove.
Even without accounting for the sizeable overhead of spawning an OS process that, on average, twiddles its thumbs for a minute before reporting that no one has sent the user a message, the waiting time could be spent servicing 60-some requests for regular Facebook pages.
The result of running out of Apache processes over the entire Facebook web tier is not pretty, nor is the dynamic configuration of the Apache process limits enjoyable.
The way this is typically accomplished in a web application is by separating the model and the view: data is persisted in a database (perhaps with a separate in-memory cache), with each short-lived request retrieving only the parts relevant to that request.
Because the data is persisted, a failed read request can be re-attempted.