19
Deploy microservices architecture through containers. 6th June 2016, Software Craftsmanship SouthTyrol Bozen Alessandro Martellone @a_martellone

Deploy microservices architecture through containers

Embed Size (px)

Citation preview

Page 1: Deploy microservices architecture through containers

Deploy microservices architecture through containers.

6th June 2016, Software Craftsmanship SouthTyrol Bozen

Alessandro Martellone @a_martellone

Page 2: Deploy microservices architecture through containers

Hello!I am Alessandro Martellone Senior Software Engineer@Wurth Phoenix.Technical [email protected] Cloud Computing Meetup Organizer.Italian Red Cross volunteer. Husband and father.I love soccer and the 4-3-3 module.

Page 3: Deploy microservices architecture through containers

Summary

▪ What are microservices?▪ Benefits and challenges▪ Deploy microservices through containers

Page 4: Deploy microservices architecture through containers
Page 5: Deploy microservices architecture through containers

Building microservices - Sam Newman - OReilly

▪ Author: technologist at ThoughtWorks

▪ http://samnewman.io/books/building_microservices/

Page 6: Deploy microservices architecture through containers

Software architecture evolution

Note: MSA = Micro Service Architecture

Page 7: Deploy microservices architecture through containers

A monolithic application as an house of cards

Page 8: Deploy microservices architecture through containers

“ Microservices are small, autonomous services which communicate by APIs. Each one implements a specific business goal.

Page 9: Deploy microservices architecture through containers

Monolithic vs service-oriented architecture

Page 10: Deploy microservices architecture through containers

Single Responsibility Principle

▪ A class should have one, and only one, reason to change.▪ Gather together those things that change for the same

reason, and separate those things that change for different reasons.

▪ http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

▪ How small is small?

Page 11: Deploy microservices architecture through containers

Key benefits

▪ Technology heterogeneity;▪ resilience

▫ if a component fails but it does not cascade, the problem can be isolated whereas the rest of the system still runs;

▪ scaling;▪ ease of deployment and updating

▫ Apply a change with a small impact;▪ composability.

Page 12: Deploy microservices architecture through containers

Main challenges

▪ Distributed systems▫ harder to program and remote calls are always at

risk of failure;▪ eventually consistency

▫ maintaining strong consistency is extremely difficult for a distributed system;

▫ CAP Theorem;▪ operational complexity

▫ services orchestrator;▫ health checks;▫ services monitoring.

Page 13: Deploy microservices architecture through containers

From virtualization to containerization

Page 14: Deploy microservices architecture through containers

From virtualization to containerization

▪ Containers are tools/components/blocks for delivering software.

▪ Focused on portability, distribution and interoperability.

▪ Whereas, VMs are focused on infrastructure resources virtualisation.

▪ Containers as VMs provide an isolated, discrete and separate space for applications (memory, storage, network resources) .

▪ Unlike a VM, in a container you are not running a complete instance or image of an operating system, with kernels, drivers, and shared libraries.

▪ “Deploy one service per container”

Page 15: Deploy microservices architecture through containers

The complexity must be managed

Page 16: Deploy microservices architecture through containers

Services orchestrator

▪ Kubernetes (by Google)▫ an open-source system for automating

deployment, scaling, and management of containerized applications.

▫ It groups containers that make up an application into logical units for easy management and discovery.

▪ Kubernetes can schedule and run application containers on clusters of physical or virtual machines.

Page 17: Deploy microservices architecture through containers

Kubernetes key functionalities

▪ Application health checking;▪ replicating application instances

▫ A replication controller ensures that a specified number of pod “replicas” are running at any one time. In other words, a replication controller makes sure that a pod or homogeneous set of pods are always up and available;

▪ horizontal auto-scaling;▪ naming and discovery;▪ load balancing;▪ rolling updates;▪ …...

Page 18: Deploy microservices architecture through containers

“ … this is a journey, not a destination. Go incrementally. Break your system apart piece by piece...change is inevitable. Embrace it.

Sam Newman

Page 19: Deploy microservices architecture through containers

Thanks!Any questions?You can find me at @a_martellone & [email protected]