Масштабирование сервисов с помощью Apache Mesos

Click here to load reader

Embed Size (px)

Transcript of Масштабирование сервисов с помощью Apache Mesos

  • Apache Mesos Mesos Marathon, Chronos, Singularity

    : . mailto: kudryavtsev_ia@bw-sw.comwww: http://bw-sw.com/

    mailto:kudryavtsev_ia@bw-sw.com

  • 1. ?

    2. (, , , )?

  • (1)

    1. a. 2

    1 4:i. Supermicro 4xXeon E7530 / 256 GB RAM = 927 000

    ii. Supermicro 2xE5-2603v3 / 128 GB RAM = 220 000iii. 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 000ii. Supermicro 2xE5-2603v3 / 128 GB RAM = 220 000

    :

  • (2)

    1. ,

    2. :a.

    b. (Cloud) ( API)

  • 1. 2. 3. 4. 5. 6. (Discovery)7.

  • 1.

    a. IPMI (IaaS) - b. Amazon EC2 API (IaaS) - Amazonc. Openstack/Cloudstack API -

    (, Rackspace)2.

    a. Chefb. Puppetc. Ansible

    3. :a. Apache Mesos (generic resource planner) - matureb. Hadoop YARN (batch resource planner) - maturec. Docker Swarm (docker specific) - rookie

  • 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/

    http://mesos.apache.org/documentation/latest/mesos-frameworks/http://mesos.apache.org/documentation/latest/mesos-frameworks/

  • Marathon Framework

    Mesos:

    Mesos native containerizer Mesos docker containerizer

    SPA UI REST API

    (production-ready) : Java

  • Chronos Framework

    Mesos (Cron-like):

    Mesos native containerizer Mesos docker containerizer

    SPA UI REST API

    (production-ready) : Java

  • 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": 326. }27. ]28. }

  • Mesos run command via REST

    $ curl -i -H 'Content-Type: application/json' -d "@Docker.json" localhost:5052/v2/apps

  • 1. , . tag- tag- .

    2. . , (Zookeeper, Etcd, Consul)a. ( API Mesos, Marathon)b. ( )

  • Whats next

    1. Singularity HubSpot - all-in-one framework Marathon:a. Marathon + Chronos b. :

    i. serviceii. workeriii. CRON-typeiv. on-demand

    c. embedded load-balancing (using Baragon + HAProxy + Nginx)

  • Bitworks Ltd., 2015