[Devel] rand function in config file

Henning Westerholt henning.westerholt at 1und1.de
Wed Mar 21 14:54:21 CET 2007


On Wednesday 21 March 2007 13:42, Henning Westerholt wrote:
> Hello all,
>
> i need a function that return true or false, depending on a probability
> that can be changed on runtime, e.g. with a fifo command.
>
> The purpose of this function is simple load shedding, if for example to
> many clients register on a given time, then i could send a error message to
> e.g. 40% of them.
>
> Should i build a simple module for this function, or is this is a change
> that is more reasonable implemented in the core?
>
> I just want to ask, perhaps there is interest to later include this
> function in the trunk.

Bastian suggested on IRC the perl module for this problem, this is possible 
the easisest way. According to him this solution has probably a 2,5 times 
overhead to a native function call within openser.

But i need this for the older openser. So i'll probably hack a small module.

Cheers,

Henning



More information about the Devel mailing list