Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs
-
Upload
meet-magento-italy -
Category
Presentations & Public Speaking
-
view
232 -
download
0
Transcript of Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs
![Page 1: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/1.jpg)
1
![Page 2: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/2.jpg)
Di cosa parleremo?
• Come partire in cloud con costi infrastrutturali contenuti
• Riservarsi la possibilità di crescere a seconda dei volumi di traffico
• Mitigare il costo di cambiamento da cloud a “on-premise” oppure tradiversi cloud vendor
• Scalare in maniera mirata rispetto alla tipologia di carico
2
![Page 3: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/3.jpg)
Costi di un progetto in Cloud
• Risorse computazionali (CPU, Ram)
• Traffico in ingresso / uscita
• Manutenzione e configurazione (gestione sistemistica delle macchinevirtuali)
• Costi di downtime (anche durante un deploy)
3
![Page 4: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/4.jpg)
Microservices
4
Source: http://martinfowler.com/articles/microservices.html
![Page 5: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/5.jpg)
Perchè parliamo di Microservices
• Ci abilitano a ragionare da subito in ottica di un sistema scalabile
• Consentono l’utilizzo di tecnologie diverse per ogni microservice
• Ogni microservice idealmente è capace di scalare con il minimo impatto sulresto dell’infrastruttura
• Incrementando cosi la stabilità dell’intero sistema e diminuendo il costo di cambiamento del singolo servizio.
5
![Page 6: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/6.jpg)
Microservices e Costi
• I microservices ci consentono di ottimizzare costi e risorse in modo piùmirato
• Bisogna fare attenzione a non esagerare perchè inducono un costooperativo e di manutenzione (aumenta la complessita dell’intero sistema)
6
![Page 7: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/7.jpg)
7
![Page 8: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/8.jpg)
Docker® che cos’è?
• Docker® è uno strumento che può pacchettizzare un'applicazione e le sue dipendenze in un container virtuale che può essere eseguito su qualsiasi server Linux.
8
![Page 9: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/9.jpg)
VM classica vs Docker®
9
![Page 10: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/10.jpg)
Docker® come “enabler” per i Microservices
• Docker® consente di ragionare da subito in un’ottica di un sistemadistribuito
• Più microservices istanziabili anche sulla stessa macchina grazie all’isolamento dei processi
• Permette di controllare le risorse allocate per un container sulla stessamacchina
• Di conseguenza permette di combinare opportunamente scaling orizzontale e verticale
10
![Page 11: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/11.jpg)
“Micro-costi”: si tratta di granularità
• Traffico in/out: si può pagare a consumo (MB, GB)
• Risorse computazionali in ambito VirtualMachine di solito è 1 CPU e 1 GB di RAM
• Containers (Docker®) ci abilitano ad un approcio pay-per-use anche sullerisorse computazionali
11
![Page 12: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/12.jpg)
12
![Page 13: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/13.jpg)
Costo VM vs Costo Container
• Graficomicrocosti
13
![Page 14: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/14.jpg)
Magento & Microservices
• Web/Frontend
• Database
• Sessioni
• Caching
• Ricerca
• Catalogo
• Carrello
14
![Page 15: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/15.jpg)
Magento+
Docker®
15
![Page 16: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/16.jpg)
Docker®Compose
16
![Page 17: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/17.jpg)
Problematiche di un sistema distribuito
• Bilanciamento web
• Bilanciamento containers sui nodi fisici / vm
• High Availability
• Service Discovery
• Autoscaling
17
![Page 18: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/18.jpg)
Soluzioni
• AutoDiscovery: Etcd, Consul
• Piattaforme di Orchestration: Jelastic, Docker Cloud
18
![Page 19: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/19.jpg)
Conclusioni
• Le soluzioni a Containers/Docker rappresentano l’evoluzione dei concetti delleVirtualMachine perchè rispondono in modo più efficente alle esigenze di scaling verticale / pay-per-use
• Partire fin da subito con la costruzione di un sistema distribuito e scalabilecomporta la riduzione dei costi delle risorse e di gestione, anche quando si trattadi sviluppi futuri
• Docker/Containers è una tecnologia che ci abilita a ragionare in quest’ottica con costi potenzialmente contenuti, lasciandoci liberi di fare nuove scelteinfrastrutturali (cambiare I vendor cloud, o passare a soluzioni on-premise)
19
![Page 20: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/20.jpg)
Follow us
20
facebook.com/neen.datacenter
@neendatacenter
youtube.com/neendatacenter
linkedin.com/company/1732369
neen s.r.l
Via Mecenate 76/20A - 20138 Milano
T: (+39) 02.45485420
Web: www.neen.it
![Page 21: Mikhail Zakharenko - Super-scaling Magento with Docker, micro-services and micro-costs](https://reader030.fdocumenti.com/reader030/viewer/2022020119/5872b2a41a28ab523c8b5de9/html5/thumbnails/21.jpg)
21