in reply to Re: Non-linear sub-routine launching
in thread Non-linear sub-routine launching

  
One word of warning - spawning too many children too fast can saturate your network so don't write a Denial of Service hack on your own servers!

Are you sure? I seriously doubt that a server could fork off processes at a rate fast enough to saturate a decent network, assuming that all each process does is send normal pings once every few seconds.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print
  • Comment on (MeowChow) Re2: Non-linear sub-routine launching

Replies are listed 'Best First'.
Re: (MeowChow) Re2: Non-linear sub-routine launching
by tachyon (Chancellor) on Apr 04, 2002 at 05:56 UTC

    As you correctly note with a ping of 512 bits (32 bytes each way) I agree it would seem very unlikely that you could spawn processes fast enough to cause problems (even on a narrow 10Mbps network you expect a good 3Mbps before you get collision problems so you would need to spawn over 6,000 processes in a second if they all made a single ping). However once someone discovers the awesome power of fork() it is necessary to consider the potential problems. For instance if you used the default 4 x 32 byte ping instead of a single ping you only need 1,250 odd processes.... I have some vague recollection of bringing a network to a standstill with an ill considered forking script - admittedly each process was sending more data than a simple ping. Another consideration is how many processes you spawn. You certainly can potentially spawn enough to bring a server to a grinding halt.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print