Troubleshooting a high-load scenario

Joel Reymont <>
Tue Jan 17 14:50:54 CET 2006


On Jan 17, 2006, at 1:18 PM, Roger Larsson wrote:

> Do you simulate decision time? If not you can easily create an  
> overload
> by only a few bots.

What do you mean by simulating decision time? My goal is to respond  
as fast as possible within the limits given by the server. I'm given  
5, 15 or 30 seconds to responde, for example.

> Use tcpdump to see when the messages actually arrives.

I'll try this indeed.

> Why selective receive here? Shouldn't all received messages be  
> processed?

Yes, they should be processed. It's natural, though, to write

receive
  {tcp, ... } -> ...;
  {script, ...} -> ...;
  {timeout, ...} -> ...;
end

as opposed to

receive
   X -> process(X)
end
...
process({tcp, ...}) -> ...;
process({script, ...}) -> ...;
etc

There seems to be a clear benefit to the latter approach when your  
queues start getting large. Is this correct?

	Thanks, Joel

--
http://wagerlabs.com/








More information about the erlang-questions mailing list