Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Patterns in Containerizing Workloads

Patterns in Containerizing Workloads

I presented this talk at StackWorld 2016 in SanFrancisco about Migrating Workloads to Containers. I try to answer the following questions in this talk:
- Are containers just a new hype for companies to spend money on?
- How do we decide which applications to migrate to containers?
- Moving to containers mean rewriting existing apps. That is a very costly upfront.

Avatar for Zohaib Khan

Zohaib Khan

June 27, 2016
Tweet

More Decks by Zohaib Khan

Other Decks in Programming

Transcript

  1. CONTAINERIZATION: MIGRATING EXISTING WORKLOADS Stackworld 2016 Zohaib Khan (@zeebluejay) Practice

    Lead and Manager PaaS Community of Practice at Red Hat June 2016
  2. CONTAINERIZING: MIGRATING EXISTING WORKLOADS 3 LIFT AND SHIFT • Containerize

    existing components • Deploy them on a PaaS • Keep external integrations and data on legacy • Legacy applications have to be well written and suited AUGMENT WITH NEW LAYERS COMPLETE REWRITE PATTERNS IN MIGRATING WORKLOADS 3 MAIN PATTERNS • Legacy remains intact • New layer enables new capabilities • Deploy on PaaS • New integration points between legacy and new layers • Legacy is totally replaced • New interfaces and data • Use PaaS to run • Some data and features can be re-wrapped, but mostly are retired.
  3. CONTAINERIZING: MIGRATING EXISTING WORKLOADS 9 PATTERNS IN MIGRATING WORKLOADS Cost

    of Migration Time Lift and Shift Complete ReWrite Augment with New Layers Generally the most expensive and longest
  4. CONTAINERIZING: MIGRATING EXISTING WORKLOADS #1: Large Scale Web Application 11

    SOLUTION PROBLEM • Content Management + ECommerce needed at large scale • VM based servers did not scale under load • Multi-server states hard to synchronize • Development environment difficult to replicate • Containerized tiered components • Small containers deployed at scale • OpenShift PaaS to manage and orchestrate containers • Development & Prod have zero drift THE RESULT • Handled Black Friday loads at scale: ~2500+ concurrent sessions without breaking a sweat • Quickly scale up and down. Burstable. • Interchangeable front-end containers = automated sites with custom DNS and HTTPS • Developers have taken ownership of deployment, can update, roll-back, clone w/o sysadmins
  5. CONTAINERIZING: MIGRATING EXISTING WORKLOADS #2: Legacy Middleware with Huge Data

    12 SOLUTION PROBLEM • Data and functionality were close coupled • User session = DB connection • Database choked during the day • Hard to add new features • New microservices layer as only entry point • Data caching to avoid expensive hits to DB • Containerized microservices talk to legacy • Messaging backbone THE RESULT • From < 50 concurrent requests to > 5000 concurrent requests. • Exposed data and functionality to Mobile, Salesforce and partner channels. • No big bang rewrite upfront. Retiring legacy incrementally. • Enabled DevOps
  6. CONTAINERIZING: MIGRATING EXISTING WORKLOADS 16 APPLICATION CONTAINERS • Code: mysqld

    • Configuration: /etc/my.cnf • Data: /var/lib/mysql • Other stuff :-)
  7. CONTAINERIZING: MIGRATING EXISTING WORKLOADS 17 LEVEL OF EFFORT Easy Moderate

    Difficult Code Completely Isolated (single process) Somewhat Isolated (multiple processes) Self Modifying (e.g. Actor Model) Configuration One Configuration File Several Configuration Files Configuration Anywhere in Filesystem Data Data Saved in Single Place Data Saved in Several Places Data Anywhere in Filesystem Secrets Static Files Network Dynamic Generation of Certificates Network HTTP, HTTPS TCP, UDP IPSEC, Highly Isolated Installation Packages, Source Packages and Understood Configuration Installers (install.sh) Licensing Open Source Proprietary Restrictive & Proprietary