GithubHelp home page GithubHelp logo

isabella232 / shovel-example-with-network-shaping Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rabbitmq/shovel-example-with-network-shaping

0.0 0.0 0.0 18 KB

License: Apache License 2.0

Shell 56.05% Groovy 43.95%

shovel-example-with-network-shaping's Introduction

Large Messages Shovelling

Shovel large messages in a low-bandwidth network (e.g. 50 MB messages, network 750 kbps).

Original thread: https://groups.google.com/forum/#!topic/rabbitmq-users/rv0vj30dnY8

Pre-requisites

VirtualBox and Vagrant (2.x+).

Setup

$ git clone [email protected]:rabbitmq/shovel-large-messages.git
$ cd shovel-large-messages
$ vagrant up
$ vagrant ssh node1
node1 $ /vagrant/install.sh
node1 $ exit
$ vagrant ssh node2
node2 $ /vagrant/install.sh
node2 $ exit
$ vagrant ssh node1
node1 $ /vagrant/declare-shovel.sh

Management plugin is available on http://192.168.33.11:15672 and http://192.168.33.12:15672 (user / password is admin / admin).

Sending messages

The send-messages.groovy script can publish large messages periodically. Launch it from node1 with groovy /vagrant/send-messages.groovy.

Shovelling

The default configured shovel is on node1 and shovels from node1#shovel-source to node2#shovel-destination. The send-messages.groovy script can be used to send large messages to node1#shovel-source to start the shovelling.

Useful commands

# same as above but with hard throughput limit
sudo tc qdisc add dev eth1 root tbf rate 750Kbit burst 32kbit latency 200ms peakrate 1mbit minburst 1520
# list default queuing disciplines
sudo tc qdisc show
# delete limiting disciplines
sudo tc qdisc del dev eth1 root
# combine network latency, reordering, and loss with throughput limit
sudo tc qdisc add dev eth1 root handle 1: netem delay 10ms reorder 25% 50% loss 0.2%
sudo tc qdisc add dev eth1 parent 1: handle 2: tbf rate 750Kbit burst 32kbit latency 200ms peakrate 1mbit minburst 1520

groovy /vagrant/send-messages.groovy
tail -n 50 -f /var/log/rabbitmq/[email protected]
tail -n 50 -f /var/log/rabbitmq/[email protected]

shovel-example-with-network-shaping's People

Contributors

acogoluegnes avatar michaelklishin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.