Skip to content

Commit

Permalink
added network conditons to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jujhars13 committed Dec 10, 2014
1 parent 89bbb2f commit bf9e3e8
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Comcast
Comcast
=======

Testing distributed systems under hard failures like network partitions and instance termination is critical, but it's also important we test them under [less catastrophic conditions](https://www.bravenewgeek.com/sometimes-kill-9-isnt-enough/) because this is what they most often experience. Comcast is a tool designed to simulate common network problems like latency, bandwidth restrictions, and dropped/reordered/corrupted packets.

It works by wrapping up some system tools in a portable(ish) way. On BSD-derived systems such as OSX, we use tools like `ipfw` and `pfctl` to inject failure. On Linux, we use `iptables` and `tc`. Comcast is merely a thin wrapper around these controls.

## Installation
Installation
------------

```
$ go get github.com/tylertreat/comcast
```

## Usage
Usage
-----

Currently, Comcast supports just four options: device, latency, bandwidth, and packet loss.

Expand All @@ -24,7 +27,8 @@ This will add 250ms of latency, limit bandwidth to 1Mbps, and drop 10% of packet
$ comcast --mode stop
```

## I don't trust you, this code sucks, I hate Go, etc.
I don't trust you, this code sucks, I hate Go, etc.
---------------------------------------------------

If you don't like running code that executes shell commands for you (despite it being open source, so you can read it and change the code) or want finer-grained control, you can run them directly instead. Read the man pages on these things for more details.

Expand Down Expand Up @@ -67,3 +71,17 @@ $ ipfw delete 1
```

*Note: `ipfw` was removed in OSX Yosemite in favor of `pfctl`.*

Network Condition Profiles
--------------------------

Here's a rough list of network conditions to that you can plug into Comcast. Please add any more that you may come across.

name | latency | bandwidth | packet-loss
:- | -: | -: | -:
GPRS good | 500 | 50 | 2
EDGE good | 300 | 250 | 1.5
3G(HSDPA) good | 250 | 750 | 1.5
DSL (poor) | 70 | 2000 | 2
DSL (good) | 40 | 8000 | 0.5
WIFI (good) | 40 | 30000 | 0.5

0 comments on commit bf9e3e8

Please sign in to comment.