Follow along

Enterprise level scaling

Presented by Eddie Ballisty

Standing on the shoulders of giants

Who am I?

Eddie Ballisty

Lead Architect at Blue River

What I do at Blue River

Help create technology-based solutions

Create consistency in our workflow

Define standard tooling and process

Reduce developer friction

Why does that matter?

Docker hits all of the previous requirements

Flexible, but powerful technology

Infrastructure as code - consistency

Can utilize standard pre-defined images

Seamless onboarding of new developers

docker-compose up; do code

The history

15+ years in web dev

Industry is progressing

More activity in the last 3 compared to the previous 12

Walk down memory lane

Stone Age

Local development meant editing directly on server via FTP

Got it done, but room for improvement

Not conducive to team development

One copy of code could be overwritten by team member

Middle Ages

Add structure, git, a local dev environments

Better, but not perfect

Each dev needed to configure his or her local environment

No guaranteed consistency between local and review or production

Even no guarantee of consistency between team members (works for me!)

Modern Age

Smart people hard at work to create better tooling and better automation

Vagrant for local dev consistency

Git as the point of truth for deployments and other automation

Modern Age (continued)

Much better, but still not perfect

Still a divide between local dev and production enviornment

Minor version differences could cause unintended consequences or failures

Divide between ops and dev teams

Ops team needed to be fully aware of each app and its dependencies

To the future

Enter Docker

What is Docker?

Docker allows you to package your application in a standardized unit for software development and deployment.

It enables running applications in software defined containers.

Docker containers are the bucket that hold a docker image, which contains system tools, libraries and runtimes.

Essentially, everything it needs to run.

How does that benefit me?

What runs on my laptop is also what runs on production

A docker image is a byte by byte representation of my code and infastructure

The time invested in getting local running is then applied to production

How does that benefit the team?

Reduced spin-up and ramp-up time

In the middle ages, we relied on Vagrant (3+ minute spin-up time)

Docker takes 10-20 seconds to spin-up and load

This is due to the container architecture

Not a full VM, just an image in a container

Ease of local installation

Native options for Mac and Windows

Blueriver is mostly a Mac shop, but cross platform support is paramount

Microsoft (and other large companies) are actively engaged with the Docker team

Original Goal

The entire focus was to reduce developer friction

I want my team to read the readme, get up and running in seconds

As the services wing of Blue River, we need to be agile and not bogged down in the small details

Docker has helped by creating a consistent, repeatable process

Other benefits - think git for your docker images

Docker Store - security scanned images

Docker Cloud - bring your own infastructure (on prem) or run in any major Cloud provider (or a combo)

Docker helps you design systems to be good at one thing

Change in reponsibility

Docker reduces the overhead to the Ops team by increasing responsibility of engineering team

Self service mentality

Docker becomes the contract for deployment

You break, you fix


Automate everything from testing to deployment

Manual access to systems is a bandaid that prevents automation

Treat your services like cattle, not pets

Enables multiple deployments per day or even minute

Amazon has over 4000 deployments a day

The Evolution

Docker in Production

Maturity in Docker and Tooling

First class support by AWS, DigialOcean, Google

Docker 1.12 integrated swarm

What is Swarm?

Built in orchestration and Scheduling

Competing products include Apache Mesos, Kubernetes

However, a all-in-one is hard to beat


Orchestrates Manager and Worker Nodes

A Manager node can run containers as well

Needs 3 Manager nodes to maintain a raft consensus

What makes Swarm special?

Built-in mesh overlay routing

Access any service port no matter where the container is placed

Automatic key generation and signing to enable TLS communication between all nodes

Built-in Scaling

Literally one command can scale from 1 to 100

Scale the important or heavily hit service indepantantly

Continuted Evolution

Docker 1.12 released in June of 2016

Docker 1.13 just was released in Janurary or 2017

1.13 Intoduces docker-compose version 3

Enables docker Stacks as a first class feature

Think docker-compose meant for production

Enables multi-tier, complext deployments

Incremental Revolution

Docker Secrets intoduced yesterday

Secrets management is critical

Database / Key credentials can be limited to specified services

Transmitted over TLS, and automatically removed upon deletion

Play With Docker

Sounds complicated!

Docker Swarm abstracts much underlying plumbing away

Lets see how complicated it really is


see if docker is running:
docker run hello-world

init your swarm:
docker swarm init --advertise-addr [IP_OF_CURRENT_INSTANCE]

To add a worker:
docker swarm join --token SWMTKN-1-1vupovz2l6ygz50x58k4iwyuu5y280wrffixno3jmnkucjbw8j-8vuq0lrf37g6zlfjvry5ur6nq

add visualizer:
docker service create --name=viz --publish=5000:8080/tcp --constraint=node.role==manager --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock manomarks/visualizer


add service:
docker service create --name web --replicas 1 -p 8080:80 nginx

add another service:
docker service create --name lucee --replicas 1 -p 8888:8888 lucee/lucee5:5.1.0

see the progress:
docker service ls

scale the service:
docker service scale web=3

Our Configuration

Flagship Produdction Demo

Docker for AWS - CloudFormation

AWS - RDS, S3, EC2, ELB, Route53, CloudWatch




Mura / Environment Variables

Learn More

Docker Newsletter

Docker YouTube Channel

Web Operations Weekly Newsletter