Scaling services with apache mesos (and docker)

Download Scaling services with apache mesos (and docker)

Post on 22-Jan-2018

270 views

Category:

Software

10 download

Embed Size (px)

TRANSCRIPT

  1. 1. Apache Mesos Mesos Marathon, Chronos, Singularity : . mailto: kudryavtsev_ia@bw-sw.com www: http://bw-sw.com/
  2. 2. 1. ? 2. (, , , )?
  3. 3. (1) 1. a. 2 1 4: i. Supermicro 4xXeon E7530 / 256 GB RAM = 927 000 ii. Supermicro 2xE5-2603v3 / 128 GB RAM = 220 000 iii. Supermicro 1xE3-1231v3 / 32 GB RAM = 131 000 b. 10 Supermicro 5 HP (STSS.ru): i. HP ProLiant DL60 Gen9 2xE5-2603v3 / 128 GB RAM = 425 000 ii. Supermicro 2xE5-2603v3 / 128 GB RAM = 220 000 :
  4. 4. (2) 1. , 2. : a. b. (Cloud) ( API)
  5. 5. 1. 2. 3. 4. 5. 6. (Discovery) 7.
  6. 6. 1. a. IPMI (IaaS) - b. Amazon EC2 API (IaaS) - Amazon c. Openstack/Cloudstack API - (, Rackspace) 2. a. Chef b. Puppet c. Ansible 3. : a. Apache Mesos (generic resource planner) - mature b. Hadoop YARN (batch resource planner) - mature c. Docker Swarm (docker specific) - rookie
  7. 7. Apache Mesos: 1. Apache Zookeeper: 1-N (DLM, ). 2. Apache Mesos Master: 1 - M ( ) 3. Apache Mesos Slave: M+ ( ) 4. Mesos: Marathon, Chronos, Singularity, etc. a. http://mesos.apache.org/documentation/latest/mesos-frameworks/
  8. 8. Marathon Framework Mesos: Mesos native containerizer Mesos docker containerizer SPA UI REST API (production-ready) : Java
  9. 9. Chronos Framework Mesos (Cron-like): Mesos native containerizer Mesos docker containerizer SPA UI REST API (production-ready) : Java
  10. 10. 1. { 2. "id": "bridged-webapp", 3. "cmd": "python3 -m http.server 8080", 4. "cpus": 0.5, 5. "mem": 64.0, 6. "instances": 2, 7. "container": { 8. "type": "DOCKER", 9. "docker": { 10. "image": "python:3", 11. "network": "BRIDGE", 12. "portMappings": [ 13. { "containerPort": 8080, "hostPort": 0, "servicePort": 9000, "protocol": "tcp" }, 14. { "containerPort": 161, "hostPort": 0, "protocol": "udp"} 15. ] 16. } 17. }, 18. "healthChecks": [ 19. { 20. "protocol": "HTTP", 21. "portIndex": 0, 22. "path": "/", 23. "gracePeriodSeconds": 5, 24. "intervalSeconds": 20, 25. "maxConsecutiveFailures": 3 26. } 27. ] 28. }
  11. 11. Mesos run command via REST $ curl -i -H 'Content-Type: application/json' -d "@Docker.json" localhost: 5052/v2/apps
  12. 12. 1. , . tag- tag- . 2. . , (Zookeeper, Etcd, Consul) a. ( API Mesos, Marathon) b. ( )
  13. 13. Whats next 1. Singularity HubSpot - all-in-one framework Marathon: a. Marathon + Chronos b. : i. service ii. worker iii. CRON-type iv. on-demand c. embedded load-balancing (using Baragon + HAProxy + Nginx)
  14. 14. Bitworks Ltd., 2015