SlideShare a Scribd company logo
State of the Art in Microservices
Microservices architecture and docker
Alexander Ivanichev
November 2015
AGENDA
• Evolution of Software Architecture
• Docker concepts
• Creating docker hosts with docker-machine
• Running docker
• Running an Application Server in Docker
• Image vs. Container
• Changing container behaviour
• 3 ways to deploy an application
• How to link multiple containers
• Introduction to microservices
EVOLUTION OF SOFTWARE
ARCHITECTURE
Methodology
Process
Patterns
Platform
Waterfall Agile Lean Engineering
Continuous Delivery
Microservice Architecture
Cloud
Scrum
3-Tier Layered
Windows / Linux
Gated
2-Tier Monolithic
Windows
Device Any DeviceBrowserDesktop
MARKET EVOLUTION
Thick, client – server app
On thick client
1995
Well-defined stack:
• O/S
• Runtime
• Middleware
Monolithic
Physical
Infrastructure
2015
Thick, app on
any device
Assembled by
developers using best
available services
Running on any available
set of physical resources
Microservices
WHAT IS A SERVICE?
The service is peace of software which provides functionality to other peace's of software.
Service provides functionality to application for example:
Service that provides CRUD orders from database , communicated over network.
DB
Service
Website
Mobile app
Desktop app
APP
WHAT IS MICROSERVICE ?
An architecture of designing a software in a set of independent services
loosely coupled via lightweight communication.
Recommenda
tion Service
(MongoDB)
Rating
Service
(Neo4j)
Analysis
Service
(Spark)
Movie Service
(MySQL)
User Service
(MySQL)
Discovery
Service
• Application that is spilt into small pieces(suite of small services)
• Each service built around business capabilities (1 piece = 1 responsibility) and independently deployable
• Each service running in its own process
• loosely coupled : Inter-process communication mechanism, e.g. HTTP, Message Queue
• Bare minimum centralized management service
• Each service can be in different programming language and use different data storage technologies
Microservice formal definition:
Loosely coupled service oriented
architecture with bounded contexts
If every service has to be
updated at the same time it’s
not loosely coupled
Microservice formal definition
Loosely coupled service oriented architecture
with bounded contexts
If every service has to be updated
at the same time it’s not loosely
coupled
A Microservice formal definition
Loosely coupled service oriented architecture
with bounded contexts
If you have to know too much about surrounding services you don’t
have a bounded context. See the Domain Driven Design book by
Eric Evans.
WE HAVE SOA , WHY DOING A
MICROSERVICES
SOA problems:
• How to size a service - traditional resulted in monolithic services
• Service failure – takes all application offline
• Scale specific part of a service
Why Microservices:
• Efficiently scalable applications
• Flexible applications
• High performance applications
SOA VS MICROSERVICES
Microservices are the kind of SOA we have been talking about for the last decade. Microservices
must be independently deployable, whereas SOA services are often implemented in deployment
monoliths. Classic SOA is more platform driven, so microservices offer more choices in all
dimensions.
SOA is an architectural pattern in which application components provide services
to other components. However, in SOA those components can belong to the same
application. On the other hand, in microservices these components are suites of
independently deployable services.
SOA THE MONOLITHIC
Accounts
Products
Inventory
Promotions
Internet
Shopping
website
Orders
Internal
Support
website
Data
Access
Service DB
Customer
• No restriction on size
• Longer development times
• Inaccessible features
• High levels of coupling
• Scaling requires duplication of the
whole
• Minor change could result in
complete rebuild
MICROSERVICES
SYSTEM EXAMPLE
Accounts
Service
Products
Service
Inventory
Service
Promotions
Service
Account Orders
BasketOffers
APIGateway
Internet
Client
Shopping
website
Orders
Service
Internal
Support
website
WHY MICROSERVICES
• Need to respond to change quickly
• Need for reliability
• Business domain-driven design
• Automated test tools
• Release and deployment tools
• On-demand hosting technology
• On-line cloud services
• Need to embrace new technology
• Asynchronous communication technology
• Simpler server side and client side technology
• Shorter development times
• Reliable and faster deployment
• Enables frequent updates
• Decouple the changeable parts
• Security
• Increased uptime
• Fast issue resolution
• Highly scalable and better performance
• Better ownership and knowledge
• Right technology
• Enables distributed teams
MICROSERVICES
DESIGN PRINCIPLES
High Cohesion
Single thing done well
Single focus
Approach:
Keeps splitting service until it only has
one reason to change
Autonomous
Independently changeable
Independently deployable
Approach:
Loosely coupled system, versioning strategy,
microservice ownership by team
Business Domain Centric
Represent business function or
represent a business domain
Approach:
Business domain specific
Subgroup into functions and areas
Resilience
Embrace Failure
Default or degrade functionality
Approach:
Design for known failures
Fail fast and recover fast
Observable
See system health
Centralized logging and monitoring
Approach:
Tools for real-time centralized
monitoring and centralized logging
Automation
Tools for testing and feedback
Tools for deployment
Approach:
Continuous integration tools
Continuous deployment tools
MICROSERVICES
COMMUNICATION
Synchronous vs Asynchronous
SYNCHRONOUS
COMMUNICATION
Remote procedure call (RPC)
• Sensitive to change
HTTP
• Work across the internet
• Firewall friendly
REST
• CRUD using HTTP verbs
• Natural decoupling
• Open communication protocol
• REST with HATEOS
Service One ServiceTwo
http://Service/Account/23
HTTP Verbs:
POST
PUT
GET
DELETE
JSON/XML
1. Make call
2. Wait…
3. Response received
Synchronous issues
• Both parties have to be available
• Performance subject to network quality
• Clients must know location of service (hostport)
ASYNCHRONOUS
COMMUNICATION
Event based
• Mitigates the need of client and service availability
• Decouples client and service
Message queueing protocol
• Message Brokers
• Subscriber and publisher are decoupled
• Microsoft message queuing (MSMQ)
• RabbitMQ
• ATOM (HTTP to propagate events)
Asynchronous challenge
• Complicated
• Reliance on message broker
• Visibility of the transaction
• Managing the messaging queue
Real world systems
• Would use both synchronous and asynchronous
Accounts
Service
Products
Service
Inventory
Service
Promotions
Service
API
Gateway
Internet
Client
Shopping
website
Orders
Service
Internal
Support
website
Message
Broker
API GATEWAY
• Request routing
• Bundling multiple calls (Composition)
• Protocol translation
• Authentication
• Caching
• Versioning
• Monitoring
• Load balancing
API Gateway is a server that is the single entry point into the system. The API Gateway
encapsulates the internal system architecture and provides an API that is tailored to each
client.
.NET STACK TOOLS FOR
MICROSERVICES
CI/ CD
TeamCity
Docker
Testing
xUnit.net
NUnit
Moq
FsCheck
Communication
REST
Protocol Buffers
RabbitMQ
Particular
MassTransit
Persistence
MongoDB
RavenDB
MySQL
Cassandra
Redis*
Memcached*
Logging and monitoring
Serilog
Seq
StatsD
Graphite
Grafana
Cabot - monitor and alert
Technology freedom, use the best tools available.
Demo
Docker
WHAT IS DOCKER?
“ DOCKER IS AN OPEN PLATFORM FOR BUILDING, SHIPPING
AND RUNNING DISTRIBUTED APPLICATIONS.
docker.io
Docker engine Docker Hub
APPLICATION DEPLOYMENT
HISTORY
MY APP
+
A REAL SERVER
=
But wait just a moment !
Shouldn't it be all about applications?
Best practice is:
Server application
1 : 1
WHAT IF WE WANT RUN
MULTIPLE APPS?
[1] [2] [3] [4]
…………...…….…..
[10]
[+] [+] [+] [+]
100%
50%
15%
10GB disk space
4GB RAM
5% CPU
100GB disk space
40GB RAM
50% CPU
x 10 =
DOCKER VS VM
App A
Bins/Libs
Guest OS
App A
Bins/Libs
Guest OS
Hypervisor
Host OS
Server Infrastructure
Virtual Machine
• REUSABLE IMAGES
• SNAPSHOTS
• SIMPLIFY CLUSTERS CREATION
Problems?
YES!!
"TOO HEAVY"
App A
Bins/Libs
App A
Bins/Libs
Docker Engine
Host OS
Server Infrastructure
Docker
WHAT IS A CONTAINER?
Host OS
Server Infrastructure
Physical Machine
APP
User
Space
APP
User
Space
APP
User
Space
/
dev var proc
sda sda1 lib
/
dev etc lib
sda sda1 systemd
proc
udev
/
dev etc lib
sda sda1 systemd
proc
udev
Container 1
(mnt namespace 1)
Container 2
(mnt namespace2)
Docker Engine
Containers
Container ~ VM but lightweight
HOW CONTAINERS WORK?
Physical or Virtual Server
Docker Engine
libcontainer LXC
Host OS
Namespaces cgroups Capabilities
Linux Kernel
LXC = "LINUX CONTAINERS"
OS-LEVEL VIRTUALIZATION FOR RUNNING
MULTIPLE ISOLATED LINUX SYSTEMS
CGROUPS = "CONTROL GROUPS"
LINUX KERNEL FEATURE THAT LIMITS AND ISOLATES
THE RESOURCE USAGE
(CPU, DISK I/O, NETWORK, ETC.)
AUFS= "ADV. MULTI LAYERED
UNIFICATION FS"
FILESYSTEM WHICH IS BASED ON IMAGES
WHERE EVERY MODIFICATION IS A DIFF FROM
THE PREVIOUS ONE (LIKE COMMITS IN GIT)
HOW TO INSTALL ?
Linux:
$ wget -qO- https://get.docker.com/ | sh
Mac OSX:
https://github.com/docker/toolbox/releases/download/v1.9.1c/DockerToolbox-
1.9.1c.pkg
Windows:
https://github.com/docker/toolbox/releases/download/v1.9.1c/DockerToolbox-
1.9.1c.exe
http://docs.docker.com/engine/installation/
To use docker it's necessary a linux machine.
But.. for Windows and Mac OS X there are some tools to run docker in these OS
with a Virtual Machine”.
DOCKER HUB
“The Docker Hub is a cloud-based registry service for building and
shipping application or service containers”
5.6M
Pulls per Day
240K
Repositories on
Docker Hub
65
Pulls per Second
https://hub.docker.com/
DOCKER ARCHITECTURE
Docker client
docker search
docker run
docker start
docker pull
Local / Remote
Docker daemon
Container 1
Container 2
Host OS
…
DOCKER CLIENT
• binds to daemon via unix socket
• can access if user is in docker group
can
• bind to TCP or other UNIX socket
DOCKER DAEMON
• runs as root user
• creates UNIX socket for client
Demo time! #1
Docker hello world
Docker
Client
docker run hello-world
Docker
Host
docker run <image x>
Image 1
Image 2
Image 3
Docker
Hub
Container 1
Container 2
Image 1
Image 2
Image 3
DOCKER DEMO
OVERVIEW
Daemon
DOCKER BASICS
To show all docker commands just run docker binary
docker
Get command help
docker pull --help
Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]
Pull an image or a repository from a registry
-a, --all-tags=false Download all tagged images in the repository
--disable-content-trust=true Skip image verification
--help=false Print usage
DOCKER BASICS
To show installed docker version
docker -v
Download a docker Ubuntu image
docker pull ubuntu
Interact with a container
docker run -it ubuntu bash
Show containers
docker ps
Show container run history
docker ps -a
HOW DOES IT
WORK?
Image RegistryContainer
Build DistributeDeploy
DOCKER IMAGES
Docker images are the basis of containers.
Previously we’ve used Docker images that already exist, for example the ubuntu image.
• Immutable templates
• Used to create containers
• Used to create other images
• Images built in layers
• Uses union filesystems to glue layers together
• Layer are cached when build
• Can be uploaded to registry
docker images # To view all images available
docker run --rm -ti somecontainer bash
Basic images commands:
• Built from instructions in Dockerfile
• Built FROM base image
• Each instruction in Dockerfile creates new layer
DOCKER LAYERS
• AUFS - AnotherUnionFS/advanced multi layered unification filesystem
• Each layer has its own hash
• Layer can be tagged
• Layers are shared
docker images --tree
2 WAYS TO CREATE
DOCKER IMAGES
1.COMMIT WAY
docker commit -m "<menssage>" <image name>
docker history <image name>
2.DOCKERFILE WAY
docker build -t <tag> <dockerfile path>
DOCKERFILE REFERENCE
FROM
MAINTAINER
WORKDIR
ENV
RUN
COPY
ADD
EXPOSE
VOLUME
USER
CMD
Dockerfile example:
And then we can build it
docker build -t somecontainer somecontainer/
FROM ubuntu
RUN apt-get update && apt-get install -y 
python 
telnet
ENTRYPOINT ["/bin/bash"]
IMAGES COMMANDS
// Build new image based on Dockerfile
> docker build -t neueda/myimage:tag ./path/to/Dockerfile
// List containers (-a to print also intermediate layers)
> docker images
// Create container based on ubuntu image, create pseudo-TTY, run command in interactive mode
> docker run -t -i ubuntu:14.04 rm -rf /etc
// Create new image based on mutations made by container
> docker commit -m "Removed /etc directory" -a "Nikolajs Arhipovs" $CONTAINER neueda/ubuntu
// Add tag to untagged image
> docker tag 5db5f8471261 neueda/ubuntu:broken
// Push to repository (Docker Hub)
> docker push neueda/ubuntu:broken
// Remove image with all intermediate layers on host
> docker rmi neueda/ubuntu:broken
Example commands
Demo time! #2
Building custom
image
DOCKER CONTAINER
• Built on top of image
• Adds RW layer using union fs
Launch
(build-time) (runtime)
Image
Container
511136ea3c5a (rootfs)
6170bb7b0ad1
9cd978db300e
87026dcb0044
coreos/apache
Metadata
Image layering
3) 87026dcb0044
2) 9cd978db300e
1) 6170bb7b0ad1
0) 511136ea3c5a
etc…..
Docker Image
One per
container
Can be
shared by
many
containers
Thin writable layer
CONTAINERS COMMANDS
Example commands
// List containers (-a to print also stopped containers)
> docker ps
// Show stdout of a container (works as `cat`)
> docker logs $CONTAINER_ID
// Attaches to currently running container (like `tail -f`), same as `docker logs -f` > docker attach $CONTAINER_ID
// Stop running containers
> docker stop $CONTAINER_ID1 $CONTAINER_ID2
// Start stopped containers
> docker start $CONTAINER_ID
// Show running processes
> docker top $CONTAINER_ID
// Show all docker-related meta info like net interfaces, port forwarding, volumes
> docker inspect $CONTAINER_ID
DOCKER REGISTRY
• Images can be pushed to registry
• Images can pulled from it
• Images can be built on FROM other images
pulled from repository
~ $ docker push -h
Usage: docker push NAME[:TAG]
Push an image or a repository to the registry
--disable-content-trust=true Skip image signing
~ $ docker push alexiv/hello
The push refers to a repository [alexiv/hello] (len: 1)
b88f9422f14d: Image push failed
Please login prior to push:
Username: alexiv
Password:
Email: alexiv@gmail.com WARNING: login credentials saved in /Users/alex/.dockercfg. Login
Succeeded The push refers to a repository [alexiv/hello] (len: 1)
b88f9422f14d: Image already exists 91e54dfb1179:
Image successfully pushed d74508fb6632:
Image successfully pushed c22013c84729:
Image successfully pushed d3a1f33e8a5a:
Image successfully pushed
Digest: sha256:d659f9011eab6d04b3d9fd9f6324e23505bd1299c52d295c4b04ebe3e58878ce ~ $
Publish image to registry:
Demo time! #3
Publishing custom
to HUB
DOCKER VOLUME
A data volume is a specially-designated directory
within one or more containers that bypasses
the Union File System.
~ $ ls /Users/baptou/myDirectory file1 file2 file3
~ $ docker run -it -v /Users/baptou/myDirectory:/opt ubuntu:latest /bin/bash
root@29088b02f260:/# ls /opt
file1 file2 file3
root@29088b02f260:/# rm /opt/file2
root@29088b02f260:/# ls /opt file1 file3
root@29088b02f260:/# exit
exit
~ $ ls /Users/baptou/myDirectory file1 file3
~ $
DOCKER KITEMATIC
Run containers through a simple, yet powerful graphical user
interface.
DOCKER FOR
WINDOWS / .NET STACK
• Visual Studio 2015 Tools for Docker
• Docker Toolbox
• Windows server 2016
DOCKER NEXT
STEPS
Tutum
Build, deploy, and
manage your apps
across any cloud
Docker Universal Control
On-premises management solution
for Docker apps - regardless of
where they run
Docker Swarm
Docker Swarm is
native clustering for
Docker.
Kubernetes
Manage a cluster of
Linux containers as a
single system
THANK YOU!
Ad

More Related Content

What's hot (20)

Microservices
MicroservicesMicroservices
Microservices
Meysam Javadi
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
Sanjoy Kumar Roy
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Simplilearn
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
The Software House
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
Guido Schmutz
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
Araf Karsh Hamid
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
Araf Karsh Hamid
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
Vinci Rufus
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Introduction to devops
Introduction to devopsIntroduction to devops
Introduction to devops
UtpalenduChakrobortt1
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Paulo Gandra de Sousa
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
balaji257
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Joshua Costa
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
Chris Richardson
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
Lilia Sfaxi
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
Sanjoy Kumar Roy
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Simplilearn
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
The Software House
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
Guido Schmutz
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
Araf Karsh Hamid
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
Araf Karsh Hamid
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Microfrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased basedMicrofrontends Monoreops & Trunkbased based
Microfrontends Monoreops & Trunkbased based
Vinci Rufus
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
Miki Lombardi
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Joshua Costa
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
Chris Richardson
 
Software Engineering - chp4- design patterns
Software Engineering - chp4- design patternsSoftware Engineering - chp4- design patterns
Software Engineering - chp4- design patterns
Lilia Sfaxi
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 

Viewers also liked (10)

Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Libcontainer: joining forces under one roof
Libcontainer: joining forces under one roofLibcontainer: joining forces under one roof
Libcontainer: joining forces under one roof
Mirantis IT Russia
 
Microservices with Docker
Microservices with Docker Microservices with Docker
Microservices with Docker
Venkata Naga Ravi
 
Microservices and docker
Microservices and dockerMicroservices and docker
Microservices and docker
Võ Duy Tuấn
 
A microservice approach for legacy modernisation
A microservice approach for legacy modernisationA microservice approach for legacy modernisation
A microservice approach for legacy modernisation
luisw19
 
Chatbot in Sale Management
Chatbot in Sale ManagementChatbot in Sale Management
Chatbot in Sale Management
Võ Duy Tuấn
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Eduards Sizovs
 
Microservices and SOA
Microservices and SOAMicroservices and SOA
Microservices and SOA
Capgemini
 
Scaling Docker Registry
Scaling Docker RegistryScaling Docker Registry
Scaling Docker Registry
Mirantis IT Russia
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
Docker, Inc.
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Libcontainer: joining forces under one roof
Libcontainer: joining forces under one roofLibcontainer: joining forces under one roof
Libcontainer: joining forces under one roof
Mirantis IT Russia
 
Microservices and docker
Microservices and dockerMicroservices and docker
Microservices and docker
Võ Duy Tuấn
 
A microservice approach for legacy modernisation
A microservice approach for legacy modernisationA microservice approach for legacy modernisation
A microservice approach for legacy modernisation
luisw19
 
Chatbot in Sale Management
Chatbot in Sale ManagementChatbot in Sale Management
Chatbot in Sale Management
Võ Duy Tuấn
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
Eduards Sizovs
 
Microservices and SOA
Microservices and SOAMicroservices and SOA
Microservices and SOA
Capgemini
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
Docker, Inc.
 
Ad

Similar to Microservices and docker (20)

Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
Karthik Gaekwad
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
David Chou
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
Inho Kang
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
Lucas Jellema
 
Newt global meetup microservices
Newt global meetup microservicesNewt global meetup microservices
Newt global meetup microservices
Venkatnadhan Thirunalai
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015
Ken Owens
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Lightbend
 
This will show docker history details Ppt.pptx
This will show docker history details Ppt.pptxThis will show docker history details Ppt.pptx
This will show docker history details Ppt.pptx
KumarPalanisamy8
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
Amazon Web Services Korea
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
Karmanjay Verma
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
Rick Hightower
 
Evolving your Architecture to MicroServices
Evolving your Architecture to MicroServicesEvolving your Architecture to MicroServices
Evolving your Architecture to MicroServices
Hector Tapia
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics
sbbabu
 
Moving Applications into Azure Kubernetes
Moving Applications into Azure KubernetesMoving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
Hussein Salman
 
Cloud Foundry Technical Overview at IBM Interconnect 2016
Cloud Foundry Technical Overview at IBM Interconnect 2016Cloud Foundry Technical Overview at IBM Interconnect 2016
Cloud Foundry Technical Overview at IBM Interconnect 2016
Stormy Peters
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
Inho Kang
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
WaveMaker, Inc.
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native Meetup
Matt Ray
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
Pooyan Jamshidi
 
Microservices and Best Practices
Microservices and Best Practices Microservices and Best Practices
Microservices and Best Practices
Weaveworks
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
Karthik Gaekwad
 
Designing Microservices
Designing MicroservicesDesigning Microservices
Designing Microservices
David Chou
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
Inho Kang
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
Lucas Jellema
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015
Ken Owens
 
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Modernizing Applications with Microservices and DC/OS (Lightbend/Mesosphere c...
Lightbend
 
This will show docker history details Ppt.pptx
This will show docker history details Ppt.pptxThis will show docker history details Ppt.pptx
This will show docker history details Ppt.pptx
KumarPalanisamy8
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
Amazon Web Services Korea
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
Karmanjay Verma
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
Rick Hightower
 
Evolving your Architecture to MicroServices
Evolving your Architecture to MicroServicesEvolving your Architecture to MicroServices
Evolving your Architecture to MicroServices
Hector Tapia
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics
sbbabu
 
Moving Applications into Azure Kubernetes
Moving Applications into Azure KubernetesMoving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
Hussein Salman
 
Cloud Foundry Technical Overview at IBM Interconnect 2016
Cloud Foundry Technical Overview at IBM Interconnect 2016Cloud Foundry Technical Overview at IBM Interconnect 2016
Cloud Foundry Technical Overview at IBM Interconnect 2016
Stormy Peters
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
Inho Kang
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
WaveMaker, Inc.
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native Meetup
Matt Ray
 
Microservices and Best Practices
Microservices and Best Practices Microservices and Best Practices
Microservices and Best Practices
Weaveworks
 
Ad

Recently uploaded (20)

Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 

Microservices and docker

  • 1. State of the Art in Microservices Microservices architecture and docker Alexander Ivanichev November 2015
  • 2. AGENDA • Evolution of Software Architecture • Docker concepts • Creating docker hosts with docker-machine • Running docker • Running an Application Server in Docker • Image vs. Container • Changing container behaviour • 3 ways to deploy an application • How to link multiple containers • Introduction to microservices
  • 3. EVOLUTION OF SOFTWARE ARCHITECTURE Methodology Process Patterns Platform Waterfall Agile Lean Engineering Continuous Delivery Microservice Architecture Cloud Scrum 3-Tier Layered Windows / Linux Gated 2-Tier Monolithic Windows Device Any DeviceBrowserDesktop
  • 4. MARKET EVOLUTION Thick, client – server app On thick client 1995 Well-defined stack: • O/S • Runtime • Middleware Monolithic Physical Infrastructure 2015 Thick, app on any device Assembled by developers using best available services Running on any available set of physical resources
  • 6. WHAT IS A SERVICE? The service is peace of software which provides functionality to other peace's of software. Service provides functionality to application for example: Service that provides CRUD orders from database , communicated over network. DB Service Website Mobile app Desktop app APP
  • 7. WHAT IS MICROSERVICE ? An architecture of designing a software in a set of independent services loosely coupled via lightweight communication. Recommenda tion Service (MongoDB) Rating Service (Neo4j) Analysis Service (Spark) Movie Service (MySQL) User Service (MySQL) Discovery Service • Application that is spilt into small pieces(suite of small services) • Each service built around business capabilities (1 piece = 1 responsibility) and independently deployable • Each service running in its own process • loosely coupled : Inter-process communication mechanism, e.g. HTTP, Message Queue • Bare minimum centralized management service • Each service can be in different programming language and use different data storage technologies
  • 8. Microservice formal definition: Loosely coupled service oriented architecture with bounded contexts
  • 9. If every service has to be updated at the same time it’s not loosely coupled Microservice formal definition Loosely coupled service oriented architecture with bounded contexts
  • 10. If every service has to be updated at the same time it’s not loosely coupled A Microservice formal definition Loosely coupled service oriented architecture with bounded contexts If you have to know too much about surrounding services you don’t have a bounded context. See the Domain Driven Design book by Eric Evans.
  • 11. WE HAVE SOA , WHY DOING A MICROSERVICES SOA problems: • How to size a service - traditional resulted in monolithic services • Service failure – takes all application offline • Scale specific part of a service Why Microservices: • Efficiently scalable applications • Flexible applications • High performance applications
  • 12. SOA VS MICROSERVICES Microservices are the kind of SOA we have been talking about for the last decade. Microservices must be independently deployable, whereas SOA services are often implemented in deployment monoliths. Classic SOA is more platform driven, so microservices offer more choices in all dimensions. SOA is an architectural pattern in which application components provide services to other components. However, in SOA those components can belong to the same application. On the other hand, in microservices these components are suites of independently deployable services.
  • 13. SOA THE MONOLITHIC Accounts Products Inventory Promotions Internet Shopping website Orders Internal Support website Data Access Service DB Customer • No restriction on size • Longer development times • Inaccessible features • High levels of coupling • Scaling requires duplication of the whole • Minor change could result in complete rebuild
  • 15. WHY MICROSERVICES • Need to respond to change quickly • Need for reliability • Business domain-driven design • Automated test tools • Release and deployment tools • On-demand hosting technology • On-line cloud services • Need to embrace new technology • Asynchronous communication technology • Simpler server side and client side technology • Shorter development times • Reliable and faster deployment • Enables frequent updates • Decouple the changeable parts • Security • Increased uptime • Fast issue resolution • Highly scalable and better performance • Better ownership and knowledge • Right technology • Enables distributed teams
  • 16. MICROSERVICES DESIGN PRINCIPLES High Cohesion Single thing done well Single focus Approach: Keeps splitting service until it only has one reason to change Autonomous Independently changeable Independently deployable Approach: Loosely coupled system, versioning strategy, microservice ownership by team Business Domain Centric Represent business function or represent a business domain Approach: Business domain specific Subgroup into functions and areas Resilience Embrace Failure Default or degrade functionality Approach: Design for known failures Fail fast and recover fast Observable See system health Centralized logging and monitoring Approach: Tools for real-time centralized monitoring and centralized logging Automation Tools for testing and feedback Tools for deployment Approach: Continuous integration tools Continuous deployment tools
  • 18. SYNCHRONOUS COMMUNICATION Remote procedure call (RPC) • Sensitive to change HTTP • Work across the internet • Firewall friendly REST • CRUD using HTTP verbs • Natural decoupling • Open communication protocol • REST with HATEOS Service One ServiceTwo http://Service/Account/23 HTTP Verbs: POST PUT GET DELETE JSON/XML 1. Make call 2. Wait… 3. Response received Synchronous issues • Both parties have to be available • Performance subject to network quality • Clients must know location of service (hostport)
  • 19. ASYNCHRONOUS COMMUNICATION Event based • Mitigates the need of client and service availability • Decouples client and service Message queueing protocol • Message Brokers • Subscriber and publisher are decoupled • Microsoft message queuing (MSMQ) • RabbitMQ • ATOM (HTTP to propagate events) Asynchronous challenge • Complicated • Reliance on message broker • Visibility of the transaction • Managing the messaging queue Real world systems • Would use both synchronous and asynchronous Accounts Service Products Service Inventory Service Promotions Service API Gateway Internet Client Shopping website Orders Service Internal Support website Message Broker
  • 20. API GATEWAY • Request routing • Bundling multiple calls (Composition) • Protocol translation • Authentication • Caching • Versioning • Monitoring • Load balancing API Gateway is a server that is the single entry point into the system. The API Gateway encapsulates the internal system architecture and provides an API that is tailored to each client.
  • 21. .NET STACK TOOLS FOR MICROSERVICES CI/ CD TeamCity Docker Testing xUnit.net NUnit Moq FsCheck Communication REST Protocol Buffers RabbitMQ Particular MassTransit Persistence MongoDB RavenDB MySQL Cassandra Redis* Memcached* Logging and monitoring Serilog Seq StatsD Graphite Grafana Cabot - monitor and alert Technology freedom, use the best tools available.
  • 22. Demo
  • 24. WHAT IS DOCKER? “ DOCKER IS AN OPEN PLATFORM FOR BUILDING, SHIPPING AND RUNNING DISTRIBUTED APPLICATIONS. docker.io Docker engine Docker Hub
  • 25. APPLICATION DEPLOYMENT HISTORY MY APP + A REAL SERVER = But wait just a moment ! Shouldn't it be all about applications? Best practice is: Server application 1 : 1
  • 26. WHAT IF WE WANT RUN MULTIPLE APPS? [1] [2] [3] [4] …………...…….….. [10] [+] [+] [+] [+] 100% 50% 15% 10GB disk space 4GB RAM 5% CPU 100GB disk space 40GB RAM 50% CPU x 10 =
  • 27. DOCKER VS VM App A Bins/Libs Guest OS App A Bins/Libs Guest OS Hypervisor Host OS Server Infrastructure Virtual Machine • REUSABLE IMAGES • SNAPSHOTS • SIMPLIFY CLUSTERS CREATION Problems? YES!! "TOO HEAVY" App A Bins/Libs App A Bins/Libs Docker Engine Host OS Server Infrastructure Docker
  • 28. WHAT IS A CONTAINER? Host OS Server Infrastructure Physical Machine APP User Space APP User Space APP User Space / dev var proc sda sda1 lib / dev etc lib sda sda1 systemd proc udev / dev etc lib sda sda1 systemd proc udev Container 1 (mnt namespace 1) Container 2 (mnt namespace2) Docker Engine Containers Container ~ VM but lightweight
  • 29. HOW CONTAINERS WORK? Physical or Virtual Server Docker Engine libcontainer LXC Host OS Namespaces cgroups Capabilities Linux Kernel LXC = "LINUX CONTAINERS" OS-LEVEL VIRTUALIZATION FOR RUNNING MULTIPLE ISOLATED LINUX SYSTEMS CGROUPS = "CONTROL GROUPS" LINUX KERNEL FEATURE THAT LIMITS AND ISOLATES THE RESOURCE USAGE (CPU, DISK I/O, NETWORK, ETC.) AUFS= "ADV. MULTI LAYERED UNIFICATION FS" FILESYSTEM WHICH IS BASED ON IMAGES WHERE EVERY MODIFICATION IS A DIFF FROM THE PREVIOUS ONE (LIKE COMMITS IN GIT)
  • 30. HOW TO INSTALL ? Linux: $ wget -qO- https://get.docker.com/ | sh Mac OSX: https://github.com/docker/toolbox/releases/download/v1.9.1c/DockerToolbox- 1.9.1c.pkg Windows: https://github.com/docker/toolbox/releases/download/v1.9.1c/DockerToolbox- 1.9.1c.exe http://docs.docker.com/engine/installation/ To use docker it's necessary a linux machine. But.. for Windows and Mac OS X there are some tools to run docker in these OS with a Virtual Machine”.
  • 31. DOCKER HUB “The Docker Hub is a cloud-based registry service for building and shipping application or service containers” 5.6M Pulls per Day 240K Repositories on Docker Hub 65 Pulls per Second https://hub.docker.com/
  • 32. DOCKER ARCHITECTURE Docker client docker search docker run docker start docker pull Local / Remote Docker daemon Container 1 Container 2 Host OS … DOCKER CLIENT • binds to daemon via unix socket • can access if user is in docker group can • bind to TCP or other UNIX socket DOCKER DAEMON • runs as root user • creates UNIX socket for client
  • 33. Demo time! #1 Docker hello world
  • 34. Docker Client docker run hello-world Docker Host docker run <image x> Image 1 Image 2 Image 3 Docker Hub Container 1 Container 2 Image 1 Image 2 Image 3 DOCKER DEMO OVERVIEW Daemon
  • 35. DOCKER BASICS To show all docker commands just run docker binary docker Get command help docker pull --help Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST] Pull an image or a repository from a registry -a, --all-tags=false Download all tagged images in the repository --disable-content-trust=true Skip image verification --help=false Print usage
  • 36. DOCKER BASICS To show installed docker version docker -v Download a docker Ubuntu image docker pull ubuntu Interact with a container docker run -it ubuntu bash Show containers docker ps Show container run history docker ps -a
  • 37. HOW DOES IT WORK? Image RegistryContainer Build DistributeDeploy
  • 38. DOCKER IMAGES Docker images are the basis of containers. Previously we’ve used Docker images that already exist, for example the ubuntu image. • Immutable templates • Used to create containers • Used to create other images • Images built in layers • Uses union filesystems to glue layers together • Layer are cached when build • Can be uploaded to registry docker images # To view all images available docker run --rm -ti somecontainer bash Basic images commands: • Built from instructions in Dockerfile • Built FROM base image • Each instruction in Dockerfile creates new layer
  • 39. DOCKER LAYERS • AUFS - AnotherUnionFS/advanced multi layered unification filesystem • Each layer has its own hash • Layer can be tagged • Layers are shared docker images --tree
  • 40. 2 WAYS TO CREATE DOCKER IMAGES 1.COMMIT WAY docker commit -m "<menssage>" <image name> docker history <image name> 2.DOCKERFILE WAY docker build -t <tag> <dockerfile path> DOCKERFILE REFERENCE FROM MAINTAINER WORKDIR ENV RUN COPY ADD EXPOSE VOLUME USER CMD Dockerfile example: And then we can build it docker build -t somecontainer somecontainer/ FROM ubuntu RUN apt-get update && apt-get install -y python telnet ENTRYPOINT ["/bin/bash"]
  • 41. IMAGES COMMANDS // Build new image based on Dockerfile > docker build -t neueda/myimage:tag ./path/to/Dockerfile // List containers (-a to print also intermediate layers) > docker images // Create container based on ubuntu image, create pseudo-TTY, run command in interactive mode > docker run -t -i ubuntu:14.04 rm -rf /etc // Create new image based on mutations made by container > docker commit -m "Removed /etc directory" -a "Nikolajs Arhipovs" $CONTAINER neueda/ubuntu // Add tag to untagged image > docker tag 5db5f8471261 neueda/ubuntu:broken // Push to repository (Docker Hub) > docker push neueda/ubuntu:broken // Remove image with all intermediate layers on host > docker rmi neueda/ubuntu:broken Example commands
  • 42. Demo time! #2 Building custom image
  • 43. DOCKER CONTAINER • Built on top of image • Adds RW layer using union fs Launch (build-time) (runtime) Image Container 511136ea3c5a (rootfs) 6170bb7b0ad1 9cd978db300e 87026dcb0044 coreos/apache Metadata Image layering 3) 87026dcb0044 2) 9cd978db300e 1) 6170bb7b0ad1 0) 511136ea3c5a etc….. Docker Image One per container Can be shared by many containers Thin writable layer
  • 44. CONTAINERS COMMANDS Example commands // List containers (-a to print also stopped containers) > docker ps // Show stdout of a container (works as `cat`) > docker logs $CONTAINER_ID // Attaches to currently running container (like `tail -f`), same as `docker logs -f` > docker attach $CONTAINER_ID // Stop running containers > docker stop $CONTAINER_ID1 $CONTAINER_ID2 // Start stopped containers > docker start $CONTAINER_ID // Show running processes > docker top $CONTAINER_ID // Show all docker-related meta info like net interfaces, port forwarding, volumes > docker inspect $CONTAINER_ID
  • 45. DOCKER REGISTRY • Images can be pushed to registry • Images can pulled from it • Images can be built on FROM other images pulled from repository ~ $ docker push -h Usage: docker push NAME[:TAG] Push an image or a repository to the registry --disable-content-trust=true Skip image signing ~ $ docker push alexiv/hello The push refers to a repository [alexiv/hello] (len: 1) b88f9422f14d: Image push failed Please login prior to push: Username: alexiv Password: Email: [email protected] WARNING: login credentials saved in /Users/alex/.dockercfg. Login Succeeded The push refers to a repository [alexiv/hello] (len: 1) b88f9422f14d: Image already exists 91e54dfb1179: Image successfully pushed d74508fb6632: Image successfully pushed c22013c84729: Image successfully pushed d3a1f33e8a5a: Image successfully pushed Digest: sha256:d659f9011eab6d04b3d9fd9f6324e23505bd1299c52d295c4b04ebe3e58878ce ~ $ Publish image to registry:
  • 46. Demo time! #3 Publishing custom to HUB
  • 47. DOCKER VOLUME A data volume is a specially-designated directory within one or more containers that bypasses the Union File System. ~ $ ls /Users/baptou/myDirectory file1 file2 file3 ~ $ docker run -it -v /Users/baptou/myDirectory:/opt ubuntu:latest /bin/bash root@29088b02f260:/# ls /opt file1 file2 file3 root@29088b02f260:/# rm /opt/file2 root@29088b02f260:/# ls /opt file1 file3 root@29088b02f260:/# exit exit ~ $ ls /Users/baptou/myDirectory file1 file3 ~ $
  • 48. DOCKER KITEMATIC Run containers through a simple, yet powerful graphical user interface.
  • 49. DOCKER FOR WINDOWS / .NET STACK • Visual Studio 2015 Tools for Docker • Docker Toolbox • Windows server 2016
  • 50. DOCKER NEXT STEPS Tutum Build, deploy, and manage your apps across any cloud Docker Universal Control On-premises management solution for Docker apps - regardless of where they run Docker Swarm Docker Swarm is native clustering for Docker. Kubernetes Manage a cluster of Linux containers as a single system