Deploy microservices architecture through containers
1. Deploy microservices architecture through
containers.
6th June 2016, Software Craftsmanship SouthTyrol
Bozen
Alessandro Martellone @a_martellone
2. Hello!I am Alessandro Martellone
Senior Software Engineer@Wurth Phoenix.
Technical Advisor@Elastico.
Trentino Cloud Computing Meetup Organizer.
Italian Red Cross volunteer. Husband and father.
I love soccer and the 4-3-3 module.
3. Summary
▪ What are microservices?
▪ Benefits and challenges
▪ Deploy microservices through containers
4.
5. Building microservices - Sam
Newman - OReilly
▪ Author: technologist at
ThoughtWorks
▪ http://samnewman.
io/books/building_microservice
s/
10. 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?
11. 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.
12. 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.
14. 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”
16. 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.
17. 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;
▪ …...
18. “ … this is a journey, not a
destination. Go incrementally.
Break your system apart piece by
piece...change is inevitable.
Embrace it.
Sam Newman