Git Product home page Git Product logo

talk-resilience-dfm-tc's Introduction

Resilience Testing with Docker for Mac & tc

Synopsis

This repository contains a macOS Keynote presentation about how to perform resilience tests under Docker for Mac with tc. It focuses on delaying the (isolated) service and client network in order to test and detect connection and R/W timeout problems.

Guide

  1. Run the following command from the project root. This will install all dependencies.

    script/bootstrap
    
  2. Checkout the commit tagged start

  3. Demonstration:

    docker-compose up
    
  4. Run the presentation from apps/resilience-talk/res/

  5. Stop demo

    Ctrl + C
    docker-compose down -v
    
  6. Accompany presentation with commits starting with "ACT-"

How to...

...add / delete a delay on the slownet network?

While running the demo, screen into Docker for Mac VM and investigate the networks:

Note: > denote output examples.

# show id of network "slownet"
(host) docker network ls | grep slownet
(host) > f5c43d88f2b6        playground_slownet      bridge              local

# screen tunnel into the xhyve VM
(vm) screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

# find network
(vm) ifconfig | grep <id from first command>
(vm) > br-f5c43d88f2b6 Link encap:Ethernet  HWaddr 02:42:E7:82:DF:BA

# add a delay rule to the network interface
(vm) tc qdisc add dev br-c0aca63f9c15 root netem delay 500ms
    
# remove delay rule from the network interface
(vm) tc qdisc del dev br-f5c43d88f2b6 root netem

...manage screen sessions?

# disconnect from session but leave it open in the background
Ctrl-a d
# list sessions still running in the background
screen -ls
# reconnect to a session
screen -r <session id>
# kill the current active session
Ctrl-a k

Links

talk-resilience-dfm-tc's People

Contributors

dependabot[bot] avatar dreadwarrior avatar

Stargazers

 avatar

Watchers

 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.