cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Brooks <sc...@beamdog.com>
Subject Re: Introduce Random latency
Date Wed, 06 Apr 2011 17:27:11 GMT
I'm not sure of your exact requirements for why you would do that
there, but have you thought about putting the delay in the network
instead?
http://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux

That SO page has a pretty good description of how you can do it on the
network level without having to modify any source(assuming you are on
linux).

Scott

On Wed, Apr 6, 2011 at 11:20 AM, A J <s5alye@gmail.com> wrote:
> I want to run some tests where I incorporate random latency in some of
> the nodes (that varies over time). I think the best place is to place
> a 'sleep (random(10 to 50 seconds)) function' somewhere in the source
> code of cassandra.
> Or maybe the sleep is not random but the seconds to sleep are read
> from an external file on that node. (that I will modify as the tests
> are going on)
>
> What would be a good spot in the source code to include this sleep function ?
>
> Thanks.
>

Mime
View raw message