benschmaus / nodeload

HTTP load/traffic generator and benchmark tool built on Node.js
MIT License
399 stars 73 forks source link

suggest remote to support redis to synchronize request. #8

Open fabware opened 13 years ago

fabware commented 13 years ago

I'm very new to nodeload. I'm impressed with nodeload to perform single process benchmark of my application. Then, I want to do a clustered test. I read about the doc, which suggest me to have remote to work.

I gave it a try and found it's hard to splitting the benchmark requests which read from a single file line by line to the target nodes. Especially make them to synchronize. So I think a central redis database can be put to use, to serve benchmark request one after another, eg: use rpop to pop out the request from a list. Basically to make requestGenerator() to return request stored in a redis instance.

I managed to changed requestGenerator() to do it, but it requires redis to be imported on the slave nodes. Mind to point me where to add this redis import? Or, do you have any better idea to do the same?

Samuel29 commented 12 years ago

Hi, I had the same kind of problem : I use AWS EC2 instances as slaves, with minimal setup. I wanted to use a randomly picked URL from a list. the problem is to send data from the master to the slaves...

I think the only thing we would need is an "Init" or "startup" function to be sent to the slaves before starting tests. the function would contain the needed requires, or download any useful data from the nodeload master or another central repository (ie. Redis or anything else).

Samuel29 commented 12 years ago

the "startup" function would also have its opposite : "teardown" (to release ressources etc)