SlideShare a Scribd company logo
The pain and gains running
Docker in live @Pipedrive
Renno Reinurm
17.01.17
● Pipedrive helps small businesses control the complex
selling process
● Founded in 2010
● 30,000 paying customers worldwide
● 200+ employees
● Offices in Tallinn and Tartu
New York, NY
Pipedrive helps small businesses control the complex selling process
Why to use Docker?
● Growth pains with Chef
● New language + new tools = entry barrier
● You write recipes seldom enough and forget how it’s done
● But it runs fine in test!
Early docker platform started with
evaluating running docker inside
Vagrant box.
Instead we started to use custom built
docker-machine.
Lately moved to Docker4Mac
First use case for containers
Provision on demand test
environments per branch.
Was implemented only for test
coverage-suite execution
environment.
Lot of custom hacks to make it
work.
Docker infrastructure v1
The first Docker builds using Codeship Docker CI beta
The first usage of Tutum (Docker Cloud) as orchestration service
Yeah we were using Docker, but
CI processes with Codeship was slow, Docker build itself took ~15minutes
Deployment in Docker Tutum cluster took another ~10minutes
Sometimes it was so slow we wondered if it still works
Stability issues - we experienced “data loss” and “service downtime”
The Birth of Docker Infrastructure v2.0
Requirements:
Improve the speed of CI processes
Improve the reliability of Docker Infrastructure
Docker Infrastructure v2.0
Jenkins for automating processes
Docker image builds
Container deployment
Docker Swarm
Container Scheduler
Shipyard
Troubleshooting
Pain 1
You shall not build/test/deploy
Docker container
over 5 minutes
Based on: xkcd.com
Improved Docker builds
First iteration:
FROM node
ENV SERVICE_NAME=statistics
ENV SERVICE_DESC="Statistics"
ENV SERVICE_TAGS=statistics
ENV SERVICE_CHECK_HTTP=/health
ENV SERVICE_CHECK_INTERVAL=10s
ENV SERVICE_CHECK_TIMEOUT=5s
EXPOSE 8000
WORKDIR /src
COPY . /src/
RUN npm install
CMD ["node", "."]
Improved:
FROM node:6-alpine
ENV SERVICE_NAME=statistics 
SERVICE_DESC="Statistics" 
SERVICE_TAGS=statistics 
SERVICE_CHECK_HTTP=/health-statistics 
SERVICE_CHECK_INTERVAL=10s 
SERVICE_CHECK_TIMEOUT=5s
EXPOSE 8000
WORKDIR /src
USER node
CMD ["node", "."]
COPY libraries/ /src/
COPY src/ /src/
https://youtu.be/X_q2l8hotAc?t=365
Deployment process optimizations
NB! https://docs.docker.com/engine/userguide/storagedriver/selectadriver/
Replacement of Devicemapper to AUFS reduced deployment process time 10x.
There are still improvements possible:
● Handle Linux signals
● Parallel rolling updates
https://teespring.com/sigkill
Pain 2
Consumers shall connect
only to healthy services
Beware the service discovery corruption
● Always enable health checks
● Use unique health checks or validate output
SERVICE_CHECK_HTTP=/health
vs
SERVICE_CHECK_HTTP=/statistics-health
Pain 3 - Every day maintenance of Jenkins jobs
Pain 4
Container shall handle 10 000
connections and constant
high load.
https://youtu.be/PivpCKEiQOQ
We deployed Killer-Container to the cluster and
rescheduled it every time then it managed to crash the
Docker host
The pain and gains running Docker in live @Pipedrive
Issues
● Linux kernel 3.13
● Fluentd logging agent
● Graylog logging driver
● Kernel sysctl parameters
● Swap usage
● PEBKAC
○ "net.ipv4.ip_forward" => 0
● WARNING: No memory limit support
● WARNING: No swap limit support
● WARNING: No kernel memory limit support
● WARNING: No oom kill disable support
● WARNING: No cpu cfs quota support
● WARNING: No cpu cfs period support
Service risk mitigation
● Number of nodes in cluster
● Spreading policies
● Multiple instances
● Memory limitations
● Healing policies
○ Autorestart
○ Reschedule
Gains
Evolution of applications
generic enough to run in multiple regions, environments
Delivery time from idea to live
From 2 weeks to 1 day
Servers vs Services
those be managed asynchronously
Statistics
~ 70 inhouse built Dockerized services
~ 90 Docker images
~ 500 containers running
3200 container deploys since October
The pain and gains running Docker in live @Pipedrive
Remember - Every Day
1 new container borns to stay @Pipedrive
30 container deployments
Recommendations for going
Live with Docker
● You still need to take care of OS
● Read Github issues
● Read from the source
● Keep it up to date
● (Performance) Test it
Thank you!
Give me your feedback
@rreinurm

More Related Content

PDF
How application performance requirements impacted the (r)evolution of the Doc...
PPTX
DevOps Practices @Pipedrive
PDF
Containerizing Hardware Accelerated Applications
PPTX
Running Docker in Production - The Good, the Bad and The Ugly
PDF
Continuous Delivery Pipeline with Docker and Jenkins
PDF
DockerCon2017 - Skypilot
PDF
Docker Multi-arch All The Things
PDF
Docker for Mac and Windows: The Insider's Guide by Justin Cormack
How application performance requirements impacted the (r)evolution of the Doc...
DevOps Practices @Pipedrive
Containerizing Hardware Accelerated Applications
Running Docker in Production - The Good, the Bad and The Ugly
Continuous Delivery Pipeline with Docker and Jenkins
DockerCon2017 - Skypilot
Docker Multi-arch All The Things
Docker for Mac and Windows: The Insider's Guide by Justin Cormack

What's hot (20)

PDF
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
PPTX
Continuous Delivery With Selenium Grid And Docker
PDF
What’s New in Docker - Victor Vieux, Docker
PDF
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
PDF
Container orchestration from theory to practice
PDF
DockerCon EU 2015: Trading Bitcoin with Docker
PPTX
Docker and Windows: The State of the Union
PDF
2015 05-06-elias weingaertner-docker-intro
PPTX
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
PDF
Exploring Docker in CI/CD
PPTX
DockerCon EU 2015: Placing a container on a train at 200mph
PDF
Docker for Developers - Part 1 by David Gageot
PDF
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
PPTX
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
PPTX
Docker Meetup 08 03-2016
PDF
Android Meets Docker
PPTX
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
PDF
Modernizing .NET Apps
PDF
Jenkins & IaC
PDF
DCEU 18: Building Your Development Pipeline
Tales of Training: Scaling CodeLabs with Swarm Mode and Docker-Compose
Continuous Delivery With Selenium Grid And Docker
What’s New in Docker - Victor Vieux, Docker
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Container orchestration from theory to practice
DockerCon EU 2015: Trading Bitcoin with Docker
Docker and Windows: The State of the Union
2015 05-06-elias weingaertner-docker-intro
DockerCon EU 2015: Stop Being Lazy and Test Your Software!
Exploring Docker in CI/CD
DockerCon EU 2015: Placing a container on a train at 200mph
Docker for Developers - Part 1 by David Gageot
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
PuppetConf 2016: Scaling Puppet on AWS ECS with Terraform and Docker – Maxime...
Docker Meetup 08 03-2016
Android Meets Docker
Developer South Coast 2018: Docker on Windows - The Beginner's Guide
Modernizing .NET Apps
Jenkins & IaC
DCEU 18: Building Your Development Pipeline
Ad

Similar to The pain and gains running Docker in live @Pipedrive (20)

PDF
Perspectives on Docker
PDF
On-Demand Image Resizing Extended - External Meet-up
PPTX
How to be successful running Docker in Production
PDF
codemotion-docker-2014
PDF
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
PDF
Be a better developer with Docker (revision 3)
PDF
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
PPTX
DockerCon 15 Keynote - Day 2
PPTX
1 year with Docker
PDF
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
PDF
Real-World Docker: 10 Things We've Learned
PDF
Docker in Production: How RightScale Delivers Cloud Applications
PDF
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
PPTX
The Enterprise IT Checklist for Docker Operations
PDF
Containers and Nutanix - Acropolis Container Services
PDF
Docker in production: problems, fixes and beyond
PDF
Container Days
PDF
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
PDF
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Perspectives on Docker
On-Demand Image Resizing Extended - External Meet-up
How to be successful running Docker in Production
codemotion-docker-2014
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Be a better developer with Docker (revision 3)
OSDC 2014: Tobias Schwab - Continuous Delivery with Docker
DockerCon 15 Keynote - Day 2
1 year with Docker
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
Real-World Docker: 10 Things We've Learned
Docker in Production: How RightScale Delivers Cloud Applications
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
The Enterprise IT Checklist for Docker Operations
Containers and Nutanix - Acropolis Container Services
Docker in production: problems, fixes and beyond
Container Days
ContainerDays NYC 2015: "Easing Your Way Into Docker: Lessons From a Journey ...
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Ad

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
A Presentation on Artificial Intelligence
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Hybrid model detection and classification of lung cancer
PDF
Approach and Philosophy of On baking technology
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Encapsulation theory and applications.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Web App vs Mobile App What Should You Build First.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Assigned Numbers - 2025 - Bluetooth® Document
NewMind AI Weekly Chronicles - August'25-Week II
Encapsulation_ Review paper, used for researhc scholars
A Presentation on Artificial Intelligence
WOOl fibre morphology and structure.pdf for textiles
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative analysis of optical character recognition models for extracting...
Hybrid model detection and classification of lung cancer
Approach and Philosophy of On baking technology
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
cloud_computing_Infrastucture_as_cloud_p
Encapsulation theory and applications.pdf
Enhancing emotion recognition model for a student engagement use case through...
Web App vs Mobile App What Should You Build First.pdf
OMC Textile Division Presentation 2021.pptx
A novel scalable deep ensemble learning framework for big data classification...
Tartificialntelligence_presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf

The pain and gains running Docker in live @Pipedrive

  • 1. The pain and gains running Docker in live @Pipedrive Renno Reinurm 17.01.17
  • 2. ● Pipedrive helps small businesses control the complex selling process ● Founded in 2010 ● 30,000 paying customers worldwide ● 200+ employees ● Offices in Tallinn and Tartu New York, NY
  • 3. Pipedrive helps small businesses control the complex selling process
  • 4. Why to use Docker? ● Growth pains with Chef ● New language + new tools = entry barrier ● You write recipes seldom enough and forget how it’s done ● But it runs fine in test!
  • 5. Early docker platform started with evaluating running docker inside Vagrant box. Instead we started to use custom built docker-machine. Lately moved to Docker4Mac
  • 6. First use case for containers Provision on demand test environments per branch. Was implemented only for test coverage-suite execution environment. Lot of custom hacks to make it work.
  • 7. Docker infrastructure v1 The first Docker builds using Codeship Docker CI beta The first usage of Tutum (Docker Cloud) as orchestration service
  • 8. Yeah we were using Docker, but CI processes with Codeship was slow, Docker build itself took ~15minutes Deployment in Docker Tutum cluster took another ~10minutes Sometimes it was so slow we wondered if it still works Stability issues - we experienced “data loss” and “service downtime”
  • 9. The Birth of Docker Infrastructure v2.0 Requirements: Improve the speed of CI processes Improve the reliability of Docker Infrastructure
  • 10. Docker Infrastructure v2.0 Jenkins for automating processes Docker image builds Container deployment Docker Swarm Container Scheduler Shipyard Troubleshooting
  • 11. Pain 1 You shall not build/test/deploy Docker container over 5 minutes Based on: xkcd.com
  • 12. Improved Docker builds First iteration: FROM node ENV SERVICE_NAME=statistics ENV SERVICE_DESC="Statistics" ENV SERVICE_TAGS=statistics ENV SERVICE_CHECK_HTTP=/health ENV SERVICE_CHECK_INTERVAL=10s ENV SERVICE_CHECK_TIMEOUT=5s EXPOSE 8000 WORKDIR /src COPY . /src/ RUN npm install CMD ["node", "."] Improved: FROM node:6-alpine ENV SERVICE_NAME=statistics SERVICE_DESC="Statistics" SERVICE_TAGS=statistics SERVICE_CHECK_HTTP=/health-statistics SERVICE_CHECK_INTERVAL=10s SERVICE_CHECK_TIMEOUT=5s EXPOSE 8000 WORKDIR /src USER node CMD ["node", "."] COPY libraries/ /src/ COPY src/ /src/
  • 14. Deployment process optimizations NB! https://docs.docker.com/engine/userguide/storagedriver/selectadriver/ Replacement of Devicemapper to AUFS reduced deployment process time 10x. There are still improvements possible: ● Handle Linux signals ● Parallel rolling updates https://teespring.com/sigkill
  • 15. Pain 2 Consumers shall connect only to healthy services
  • 16. Beware the service discovery corruption ● Always enable health checks ● Use unique health checks or validate output SERVICE_CHECK_HTTP=/health vs SERVICE_CHECK_HTTP=/statistics-health
  • 17. Pain 3 - Every day maintenance of Jenkins jobs
  • 18. Pain 4 Container shall handle 10 000 connections and constant high load.
  • 19. https://youtu.be/PivpCKEiQOQ We deployed Killer-Container to the cluster and rescheduled it every time then it managed to crash the Docker host
  • 21. Issues ● Linux kernel 3.13 ● Fluentd logging agent ● Graylog logging driver ● Kernel sysctl parameters ● Swap usage ● PEBKAC ○ "net.ipv4.ip_forward" => 0 ● WARNING: No memory limit support ● WARNING: No swap limit support ● WARNING: No kernel memory limit support ● WARNING: No oom kill disable support ● WARNING: No cpu cfs quota support ● WARNING: No cpu cfs period support
  • 22. Service risk mitigation ● Number of nodes in cluster ● Spreading policies ● Multiple instances ● Memory limitations ● Healing policies ○ Autorestart ○ Reschedule
  • 23. Gains Evolution of applications generic enough to run in multiple regions, environments Delivery time from idea to live From 2 weeks to 1 day Servers vs Services those be managed asynchronously
  • 24. Statistics ~ 70 inhouse built Dockerized services ~ 90 Docker images ~ 500 containers running 3200 container deploys since October
  • 26. Remember - Every Day 1 new container borns to stay @Pipedrive 30 container deployments
  • 27. Recommendations for going Live with Docker ● You still need to take care of OS ● Read Github issues ● Read from the source ● Keep it up to date ● (Performance) Test it
  • 28. Thank you! Give me your feedback @rreinurm