nomad
play

Nomad HASHICORP Armon Dadgar @armon HASHICORP HASHICORP Cluster - PowerPoint PPT Presentation

Nomad HASHICORP Armon Dadgar @armon HASHICORP HASHICORP Cluster Manager Scheduler Nomad HASHICORP Cluster Manager Scheduler Nomad HASHICORP Schedulers map a set of work to a set of resources HASHICORP Work (Input) Resources Web


  1. Nomad HASHICORP

  2. Armon Dadgar @armon HASHICORP

  3. HASHICORP

  4. Cluster Manager Scheduler Nomad HASHICORP

  5. Cluster Manager Scheduler Nomad HASHICORP

  6. Schedulers map a set of work to a set of resources HASHICORP

  7. Work (Input) Resources Web Server -Thread 1 CPU - Core 1 Web Server -Thread 2 CPU Scheduler Redis -Thread 1 CPU - Core 2 Kernel -Thread 1 HASHICORP CPU Scheduler

  8. Work (Input) Resources Web Server -Thread 1 CPU - Core 1 Web Server -Thread 2 CPU Scheduler Redis -Thread 1 CPU - Core 2 Kernel -Thread 1 HASHICORP CPU Scheduler

  9. Type Work Resources CPU Scheduler Threads Physical Cores AWS EC2 / OpenStack Nova Virtual Machines Hypervisors Hadoop YARN MapReduce Jobs Client Nodes Cluster Scheduler Applications Servers HASHICORP Schedulers In the Wild

  10. Higher Resource Utilization Decouple Work from Resources Better Quality of Service HASHICORP Advantages

  11. Higher Resource Utilization Bin Packing Decouple Work from Resources Over-Subscription Better Quality of Service Job Queueing HASHICORP Advantages

  12. Higher Resource Utilization Abstraction Decouple Work from Resources API Contracts Better Quality of Service Standardization HASHICORP Advantages

  13. Higher Resource Utilization Priorities Decouple Work from Resources Resource Isolation Better Quality of Service Pre-emption HASHICORP Advantages

  14. HASHICORP

  15. Nomad HASHICORP

  16. Cluster Scheduler Easily Deploy Applications Operationally Simple Built for Scale Nomad HASHICORP

  17. example.nomad job "redis" { datacenters = ["us-east-1"] task "redis" { driver = "docker" config { image = "redis:latest" } resources { cpu = 500 # Mhz memory = 256 # MB network { mbits = 10 dynamic_ports = ["redis"] } } } }

  18. Declares what to run HASHICORP Job Specification

  19. Nomad determines where and manages how to run HASHICORP Job Specification

  20. Nomad abstracts work from resources HASHICORP Job Specification

  21. Docker Containerized Rkt Windows Server Containers Qemu / KVM Virtualized Xen Hyper-V Java Jar Standalone Static Binaries C# HASHICORP

  22. Declarative Job Specification Infrastructure-As-Code Removes Imperative Logic External Dependencies? Nomad HASHICORP

  23. Service Discovery? Health Monitoring? Application Secrets? Stateful Applications? Nomad HASHICORP

  24. example.nomad job “my-app" { … task “my-app" { service { port = “http” check { type = “http” path = “/health” interval = “5s” } } } }

  25. Client Nomad Server Nomad Consul Consul Server Register Service Schedule App Monitor Health App 1 App N HASHICORP

  26. Secret Distribution: API Keys DB Credentials SSL/TLS Certificates Nomad HASHICORP

  27. example.nomad job “my-app" { … task “my-app" { env { DB_USERPASS = “foo:bar” } } }

  28. Secure secret storage Dynamic secrets Leasing, renewal, and revocation Auditing Rich ACLs Vault Multiple client authentication methods

  29. Login  Vault Token Vault Token + Operation  Op Response HASHICORP

  30. example.nomad job “my-app" { … task “my-app" { env { VAULT_TOKEN = “b6a10b96-9060-11e6-9c6f-67a52bc6b8d3” } } }

  31. example.nomad job “my-app" { … task “my-app" { vault { policies = [“my-app-role”] } } }

  32.  Submit Job + Vault Token Verify Vault Token Nomad Server Schedule App Client Generate + Renew Vault Token Nomad App 1 App N HASHICORP

  33. Native Vault Integration No Secrets in Jobs No Secrets on Client Disk Minimize Trust Nomad HASHICORP

  34. Stateless Stateful HASHICORP Stateful Applications

  35. Stateless Stateful API Web Cache HASHICORP Stateful Applications

  36. Stateless Stateful API HDFS Web Cassandra Cache MongoDB HASHICORP Stateful Applications

  37. Stateless Stateful API HDFS *SQL Web Cassandra Cache MongoDB HASHICORP Stateful Applications

  38. EASY MEDIUM HARD Stateless Stateful API HDFS *SQL Web Cassandra Cache MongoDB HASHICORP Stateful Applications

  39. example.nomad job “my-app" { … task “my-app" { ephemeral_disk { sticky = true } } }

  40. Moves data between tasks on the same machine HASHICORP

  41. Copies data between tasks on di ff erent machines HASHICORP

  42. Easily Deploy Apps: Declarative Jobs Flexible Workloads Consul Integration Vault Integration Sticky Volumes Nomad HASHICORP

  43. Operationally Simple HASHICORP

  44. Client Server HASHICORP

  45. Built on Experience GOSSIP CONSENSUS

  46. Cluster Management Gossip Based (P2P) Membership Failure Detection Serf Event System

  47. Large Scale Production Hardened Simple Clustering and Federation Serf

  48. Service Discovery Configuration Coordination (Locking) Central Servers + Distributed Clients Consul

  49. Multi-Datacenter Raft Consensus Large Scale Production Hardened Consul

  50. Operational Simplicity: Single Binary No Dependencies Highly Available Nomad HASHICORP

  51. Built for Scale HASHICORP

  52. Built on Experience Mature Libraries Proven Design Patterns GOSSIP CONSENSUS Lacking Scheduling Logic

  53. Built on Research GOSSIP CONSENSUS

  54. CLIENT CLIENT CLIENT DC1 DC2 DC3 RPC RPC RPC SERVER SERVER SERVER REPLICATION REPLICATION FORWARDING FORWARDING FOLLOWER LEADER FOLLOWER HASHICORP Single Region Architecture

  55.  REGION A SERVER SERVER SERVER REPLICATION REPLICATION FORWARDING FOLLOWER LEADER FOLLOWER  GOSSIP REGION FORWARDING REGION B SERVER SERVER SERVER REPLICATION REPLICATION FORWARDING FOLLOWER LEADER FOLLOWER HASHICORP Multi Region Architecture

  56. Region is Isolation Domain 1-N Datacenters Per Region Flexibility to do 1:1 (Consul) Scheduling Boundary Nomad HASHICORP

  57. Hundreds of regions Tens of thousands of clients per region Thousands of jobs per region HASHICORP

  58. Inspired by Google Omega Optimistic Concurrency State Coordination Service & Batch workloads Nomad Pluggable Architecture

  59. Data Model NODE EVALUATION ALLOCATION JOB

  60. Evaluation ~= State Change

  61. Evaluations Create / Update / Delete Job Node Up / Node Down Allocation Failed / Finished

  62. Evaluations SCHEDULER func(Evaluation) => []AllocationUpdates

  63. Evaluations SCHEDULER func(Evaluation) => []AllocationUpdates Service, Batch, System

  64. External Event EvaluaBon CreaBon EvaluaBon Queuing EvaluaBon Processing OpBmisBc CoordinaBon State Updates HASHICORP

  65. Omega Architecture Optimistically Schedule 100’s of Jobs in Parallel Controls for Correctness Nomad HASHICORP

  66. Nomad Million Container Challenge 1,000 Jobs 1,000 Tasks per Job 5,000 Hosts on GCE 1,000,000 Containers

  67. “ 640 KB ought to be enough for anybody. – Bill Gates

  68. 2nd Largest Hedge Fund 18K Cores 5 Hours 2,200 Containers/second

  69. Cluster Scheduler Easily Deploy Applications Operationally Simple Built for Scale Nomad HASHICORP

  70. Thanks! Q/A HASHICORP

  71. HASHICORP

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend