

Let's spin up a container that pings 8.8.8. I highly recommend looking at Pumba a project that lets you pause services, kill them, but also add network delay, loss, corruption etc.įully describing pumba would take lots of time, so let's just have a look at a very simple network delay simulation. What will happen if some packets are dropped, or the latency goes up? Maybe a service goes offline?Ĭhaos testing is all about getting prepared for this. In general I would like to remove this limitation that to connect to external network in docker-compose file the network has to be compliant with scope 'swarm' Steps to reproduce the issue: Create docker-compose.yml file with. It's always better to prepare for such scenarios and test how the system behaves in case of different issues. Additionally it's not possible to attach to networks with Macvlan driver which also creates network with scope local. Chaos testingĪs you know, when it comes to an outage, the question is not if it will happen, but when.

Scope can be deployed in any infrastructure, and works well in all cloud and bare-metal environments. Both can also be developed in separate repositories.Īs an extension to the above, you can take a look at container aliases to make routing easier, or internal to even more isolate services. While Weave Scope works brilliantly with Docker and the Weave network, neither is required. Articles Related Driver built-in network drivers:bridge, overlay and. A container is created in the (docker0) network by default. Service1 and 2 web containers can reach each other, but their databases are separated. After the docker installation you have 3 networks by default.

This means, docker-compose won't try to create it and will fail if it is not available. External: true #needs to be created by other fileĪs you can see in lines 20-21, in this case we configure an external network.
