test Mini cluster to execute parallel jobs using go lang. Jobs can be either:
- HTTP/ API requests
- Terminal commands
Currently supports HTTP GET requests only.
An output file containing jobs results.
Execute go cluster by running the command:
go run src/bootstrap.go (input file path) (output file path) (error file path) (log file path)
Example:
go run src/bootstrap.go /www/input/input.txt /www/output/output.txt /www/output/output_error.txt /www/logs/
Example input file:
URL|http://www.google.com|GET|?gws_rd=cr,ssl&ei=KhM9VdKAIMvnuQTv3oDwAg URL|http://www.yahoo.com|GET|/wajrcs URL|http://www.facebook.com|GET|/waqar.alamgir
Example output file:
http://www.google.com|GET|?gws_rd=cr,ssl&ei=KhM9VdKAIMvnuQTv3oDwAg|{"glossary":{"title":"example glossary"}}
You can modify the following config for number of jobs to execute parallel
var MAX_CONCURRENT_CONNECTION = 10
As mentioned currently it supports HTTP GET requests. Later it is going to support POST, PUT and DELETE requests. Terminal commands will also be supported by system.
Check out the URLs bellow to find out how its done:
Go Lang Documentation and instalation
If you wanna add more features and user options then just fork this repo from the link bellow: https://github.com/waqar-alamgir/mini-go-cluster/fork
mini-go-cluster by Waqar Alamgir
Web
Twitter