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

Apache Aurora at Twitter

37b0fbbdf3dc2d989e8082708d50a939?s=47 dlester
April 14, 2015

Apache Aurora at Twitter

Presented at the Austin Mesos User Group, April 14, 2015.

37b0fbbdf3dc2d989e8082708d50a939?s=128

dlester

April 14, 2015
Tweet

Transcript

  1. Apache Aurora at Twitter @davelester, OSS Advocate @ Twitter Apache

    Mesos and Aurora PMC Member Austin Mesos User Group, April 2015
  2. None
  3. • During the World Cup, ran on a large Ruby

    on Rails codebase. At that time, approximately 200 engineers pushing code • Needed a solution to isolate failure and isolate feature development Previously at Twitter
  4. https://twitter.com/raffi/status/488437255346741249

  5. Common pattern among companies; see Groupon talk, “Breaking up the

    monolith” http://vimeo.com/105880150
  6. Apache Aurora Apache Mesos Node Node Node Node Node Node

    Node Node Apache Aurora Framework(s) Machines aurora.incubator.apache.org
  7. Aurora’s Approach • “One scheduler to rule them all” •

    Runs both long-running services and cron • Can mark production and non-production jobs; production jobs can pre-empt non-prod jobs • Additional priority system within each role
  8. Key Aurora Features • “run 200 of these, forever” •

    Key features Aurora provides: • Deployment and scheduling of jobs • Rich DSL for defining services • Health checking • Battle-tested in production at Twitter for several years
  9. • Scheduling Diversity Constraints • Host and rack diversity •

    Job abstraction to bundle tasks • Ability to run multiple applications that are replicas of one another, and manage through a single point • Rolling Deploys • SLA Monitoring Key Aurora Features
  10. Mesos framework = scheduler + executor 1. Mesos offers resources

    to the scheduler 2. The scheduler submits tasks to Mesos 3. Mesos launches the executor on some slaves to run the tasks 4. The executor instances report the status of each task
  11. Jobs, tasks, and processes Job definition

  12. Jobs, tasks, and processes (2) Who manages what

  13. Aurora’s Executor, Thermos • Executes on each worker node of

    the cluster. • Necessary to do preemption of tasks in the, including cases production jobs need to be run instead of non-production jobs
  14. Example .aurora File import os hello_world_process = Process(name = 'hello_world',

    cmdline = 'echo hello world') hello_world_task = Task( resources = Resources(cpu = 0.1, ram = 16 * MB, disk = 16 * MB), processes = [hello_world_process]) hello_world_job = Job( cluster = 'cluster1', role = os.getenv('USER'), task = hello_world_task) jobs = [hello_world_job] hello_world.aurora aurora.incubator.apache.org/documentation/latest/tutorial/
  15. Example .aurora File include(‘hello_world.aurora') production_resources = Resources(cpu = 1.0, ram

    = 512 * MB, disk = 2 * GB) staging_resources = Resources(cpu = 0.1, ram = 32 * MB, disk = 512 * MB) hello_world_template = hello_world( name = "hello_world-{{cluster}}" task = hello_world(resources=production_resources)) jobs = [ # production jobs hello_world_template(cluster = 'cluster1', instances = 25), hello_world_template(cluster = 'cluster2', instances = 15), # staging jobs hello_world_template( cluster = 'local', instances = 1, task = hello_world(resources=staging_resources)), ] hello_world_productionized.aurora
  16. • Weekly IRC meetings • 11am PST, every Monday —

    #aurora in irc.freenode.net • http://aurora.apache.org Get Involved
  17. Thank You Dave Lester @davelester dlester@twitter.com