README.md in nutcracker-web-0.0.9 vs README.md in nutcracker-web-0.0.10

- old
+ new

@@ -4,25 +4,15 @@ Web interface plugin for [nutcracker-ruby](https://github.com/kontera-technologies/nutcracker)<br/> <img src="https://github.com/kontera-technologies/nutcracker-web/raw/master/pics/pic3.png"/></br> -## Disclaimer -this project is still in its early stages so things could be a little bit buggy, if you find one feel free to report it @ our issue [tracker](https://github.com/kontera-technologies/nutcracker-web/issues).<br/> -Also nutcracker-web only supports Redis instances for now. - ## Dependencies - Ruby 1.9+ -- [nutcracker-ruby](https://github.com/kontera-technologies/nutcracker) ## Installation -with `bundler` just add this line to your `Gemfile` and then execute `bundle install` ``` -gem 'nutcracker-web' -``` -else you can manually install it by running -``` gem install nutcracker-web ``` ## Usage ``` @@ -55,39 +45,44 @@ -p, --pid-file=S : set pid file (default: off) -m, --mbuf-size=N : set size of mbuf chunk in bytes (default: 16384 bytes) ``` -conneting to a running instance of Nutcracker and running the web interface on port 22122 +conneting to a running instance of [twemproxy](https://github.com/twitter/twemproxy) and running the web interface on port 22122 ``` $ nutcracker-web --config /etc/nutcracker/cluster.yml --port 22122 [2014-03-02 17:26:40] INFO WEBrick 1.3.1 [2014-03-02 17:26:40] INFO ruby 2.0.0 (2013-05-14) [x86_64-darwin11.4.2] [2014-03-02 17:26:40] INFO WEBrick::HTTPServer#start: pid=84800 port=22122 ``` -launching Nutcracker and nutcracker-web +launching twemproxy and nutcracker-web ``` -$ nutcracker-web --config /etc/nutcracker/cluster.yml --port 22122 --launch +$ nutcracker-web --config example-cluster.yml --port 22122 --launch [Sun Mar 2 17:26:37 2014] nc.c:187 nutcracker-0.3.0 built for Darwin 13.0.0 x86_64 started on pid 84801 [Sun Mar 2 17:26:37 2014] nc.c:192 run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one [2014-03-02 17:26:40] INFO WEBrick 1.3.1 [2014-03-02 17:26:40] INFO ruby 2.0.0 (2013-05-14) [x86_64-darwin11.4.2] [2014-03-02 17:26:40] INFO WEBrick::HTTPServer#start: pid=84800 p ``` +if you use `ElastiCache` you will need to specify `maxmemory` for each node in your cluster +``` +$ nutcracker-web --config example-cluster.yml --port 22122 --launch --max-memory 674963865666 +``` + ## Usage via code -After starting the nutcracker service via [nutcracker-ruby](https://github.com/kontera-technologies/nutcracker) just activate the `nutcracker-web` plugin: +After starting the twemproxy service via [nutcracker-ruby](https://github.com/kontera-technologies/nutcracker) just activate the `nutcracker-web` plugin: ```ruby require 'nutcracker' require 'nutcracker/web' # Start nutcracker -nutcracker = Nutcracker.start(config_file: 'cluster.conf') +nutcracker = Nutcracker.start config_file: 'cluster.conf' # Start the web service on port 1234 using Webrick -nutcracker.use(:web, Port: 1234) +nutcracker.use :web, Port: 1234 # Sleeping.... nutcracker.join ``` @@ -99,12 +94,12 @@ ```ruby require 'nutcracker' require 'nutcracker/web' require 'thin' -nutcracker = Nutcracker.start(config_file: 'cluster.conf') -nutcracker.use(:web, Port: 1234, server: :thin) +nutcracker = Nutcracker.start config_file: 'cluster.conf' +nutcracker.use :web, Port: 1234, server: :thin nutcracker.join ``` ## Gotchas - `redis.conf` : don't forget to configure the `maxmemory` attribute for each Redis instance @@ -128,5 +123,9 @@ <hr> <img src="https://github.com/kontera-technologies/nutcracker-web/raw/master/pics/pic4.png"/></br> ## Warranty This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantability and fitness for a particular purpose. + +## Disclaimer +this project is still in its early stages so things could be a little bit buggy, if you find one feel free to report it @ our issue [tracker](https://github.com/kontera-technologies/nutcracker-web/issues).<br/> +Also nutcracker-web only supports Redis instances for now.