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

How we learned to love the Data Center Operating System

How we learned to love the Data Center Operating System

by Saulius Valatka
DevOps Pro Vilnius 2016

DevOps Pro

June 01, 2016
Tweet

More Decks by DevOps Pro

Other Decks in Technology

Transcript

  1. HOW WE LEARNED TO LOVE
    THE DATA CENTER OPERATING SYSTEM
    SAULIUS VALATKA / ADFORM

    View full-size slide

  2. Online Advertising Full Stack Platform

    View full-size slide

  3. Online Advertising Full Stack Platform
    Realtime “smart“ ads
    Forecasting, fraud detection, etc.

    View full-size slide

  4. Online Advertising Full Stack Platform
    Realtime “smart“ ads
    Forecasting, fraud detection, etc.
    1mln QPS under 100ms
    1TB daily data

    View full-size slide

  5. MIDDLE AGES
    ctrtrain.ec2-aws.com test2.ec2-aws.com modelling.ec2-aws.com

    View full-size slide

  6. THE TORTURE
    # yum install python R libboost-3.12
    $ scp script.R test.aws.com:/script.R
    # crontab -e

    View full-size slide

  7. THE TORTURE
    # yum install python R libboost-3.12
    $ scp script.R test.aws.com:/script.R
    # crontab -e
    “strange, worked on my machine …”

    View full-size slide

  8. RENAISSANCE
    ctrtrain.ec2-aws.com test2.ec2-aws.com worker-1.adform.com worker-2.adform.com
    ab34na3n ar2afga3n

    View full-size slide

  9. CONTAINERIZE !
    self contained artifacts
    isolated runtime
    basically no overhead
    unified deployment

    View full-size slide

  10. BUT WAIT …
    what about configuration ?

    View full-size slide

  11. The twelve-factor app stores config in environment variables
    Env vars are easy to change between deploys without changing any code
    There is little chance of them being checked into the code repo accidentally
    They are a language- and OS-agnostic standard

    View full-size slide

  12. BUT WAIT …
    where do I log ?
    and what about metrics ?

    View full-size slide

  13. MODERN ERA
    e34sadf
    ab34na3n
    af4f5a4r
    aafde33a
    fa45daws
    faes4fa3
    aaf444a2
    fas3rfa4

    View full-size slide

  14. MARATHON
    the init of the DCOS
    constraints
    deployment
    {
    "id": “my-nginx",
    "container": {
    "type": "DOCKER",
    "docker": {
    "image": "nginx:1.7.7",
    "network": "BRIDGE",
    }
    },
    "instances": 1,
    "cpus": 0.5,
    "mem": 128
    }

    View full-size slide

  15. SPRINT
    the exec of he DCOS
    will be open sourced
    scheduler to follow!

    View full-size slide

  16. MANAGING RESOURCES
    how much memory do I really need ?

    View full-size slide

  17. MANAGING RESOURCES
    how much memory do I really need ?
    and CPUs ?
    what does 0.5 CPUs mean anyway ?

    View full-size slide

  18. MANAGING RESOURCES
    how much memory do I really need ?
    and CPUs ?
    what does 0.5 CPUs mean anyway ?
    and what happens with the network ?

    View full-size slide

  19. ISOLATION
    cgroups:
    cpu
    cpuset
    memory
    blkio
    net_cls

    View full-size slide

  20. NETWORK ISOLATION
    Layer 3 routing software defined networks

    View full-size slide

  21. ATOMIC AGE
    a4faw3f
    4afsdgg
    asdf4faf
    se4faw
    aw3d3ff
    g4aefgsd
    5gsdgr54s
    a4rff4afa 4f4qaf4

    View full-size slide

  22. SERVICE DISCOVERY
    where is my app ? how do I reach it ?
    won’t containers conflict about ports ?

    View full-size slide

  23. PERSISTENCE
    so .. where do I store my data ?
    on the host ? won’t it disappear ?

    View full-size slide

  24. PERSISTENCE
    / /opt/app/cache
    /var/lib/docker/devicemapper
    /var/lib/mesos/slave/volumes

    View full-size slide

  25. PERSISTENCE
    / /opt/app/cache /opt/app/profile
    /var/lib/docker/devicemapper
    /var/lib/mesos/slave/volumes
    /mnt/sdc
    network block storage

    View full-size slide

  26. FUTURE PLANS
    DC/OS
    IP per container
    Containerize all the things

    View full-size slide

  27. @adforminsider

    View full-size slide