[erlang-questions] On selective receive (Re: eep: multiple patterns)

Sean Hinde sean.hinde@REDACTED
Tue Jun 3 15:14:57 CEST 2008


On 3 Jun 2008, at 13:49, Chandru wrote:

>
> 2008/6/3 Sean Hinde <sean.hinde@REDACTED>:
>
>
> Well, I guess, mostly you need to have a design that doesn't lead to  
> massive queue build up under sustained overload :-). This might mean  
> input load regulation, or tweaking the process structure (the logger  
> process problem).
>
> Ofcourse :-) But  as you say, sometimes it is hard to predict it so  
> the design probably didn't cater for it.

All telecom systems are soak tested at X times overload on all  
external interfaces before going into service right :-)

Although not all web systems perhaps !!

> Another option - fix the system so that it doesn't get into that  
> state.
>
> I'm all for fixing the system - all I'm asking for is facilities to  
> detect this with less pain.

If it is just detection you are after then have a process that calls  
process_info to get the queue length of all processes in the system  
once per minute and raise an alarm if any are above a threshold. That  
is not much overhead at all, and can be done without introducing new  
features.

> Exactly my point. I guess we both agree that it should crash. The  
> disagreement seems to be about *when and how* it should crash.I  
> would prefer that the process in question crash because in all  
> probability, it's callers have timedout and not expecting a response  
> any way.

Either way in all likelihood the same fault will manifest itself again  
within a few seconds. I can't help but imagine the proposed feature  
misused in all sorts of quite disgusting ways. Shudder!

Sean




More information about the erlang-questions mailing list