Stuff Goes Bad:Erlang In Anger

Discarding Data


When nothing can slow down outside of your Erlang system and things can’t be scaled up, you must either drop data or crash (which drops data that was in flight, for most cases, but with more violence).
It’s a sad reality that nobody really wants to deal with. Programmers, software engineers, and computer scientists are trained to purge the useless data, and keep everything that’s useful. Success comes through optimization, not giving up.
However, there’s a point that can be reached where the data that comes in does so at a rate faster than it goes out, even if the Erlang system on its own is able to do everything fast enough. In some cases, It’s the component after it that blocks.
If you don’t have the option of limiting how much data you receive, you then have to drop messages to avoid crashing.

 当没有什么可以减缓从外界输入到Erlang系统的数据时,并且系统也不能按比例扩大时,你就必须要丢弃一些数据,不然就会崩溃掉。(丢弃运行中的数据(data that was in flight),对于大多数的场合,可能会更加粗暴)。