13
Building Microservices with Docker Roman Melnyk

Building microservices with docker

Embed Size (px)

Citation preview

Page 1: Building microservices with docker

Building Microserviceswith Docker

Roman Melnyk

Page 2: Building microservices with docker

ContentIntroduction to microservices architecture

‘Docker container’ conceptsLimitations and pitfallsA short DEMO to start use Docker containers

Page 3: Building microservices with docker

What does microservice mean?Microservice is a software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system-building.

Page 4: Building microservices with docker

Monolithic vs Microservices Architecture

Page 5: Building microservices with docker

What is the value of Docker containers?Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.*

_____* https://www.docker.com/whatisdocker

Page 6: Building microservices with docker

How is this different from virtual machines?Containers have similar resource isolation and allocation benefits as virtual machines but a different architectural approach allows them to be much more portable and efficient.

Virtual MachinesEach virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.

ContainersContainers include the application and all of its dependencies, but share the kernel with other containers.

They run as an isolated process in userspace on the host operating system. They’re also not tied to any specific infrastructure – Docker containers run on any computer, on any infrastructure and in any cloud.

Page 7: Building microservices with docker

Docker features●Docker Engine●Docker Hub●Docker Trusted Registry●Docker Machine●Docker Swarm●Docker Compose

Page 8: Building microservices with docker

Practical usagesingle-service stateless host* continuous development and integration

for development or testing purposes

___* stateful service aren’t recommended without attached volumes

or volume plugins (Flocker, GlusterFS, Blockbridge)

Page 9: Building microservices with docker

Key concepts●Images●Containers●Volumes

Page 10: Building microservices with docker

Limitations and pitfalls 1.Single process run2.Performance3.Natively works only on Linux4.Security and safety usage base images

5.Client - Host incompatibility

Page 11: Building microservices with docker

Docker is native only to LinuxGood news for MS lovers - https://blog.docker.com/2015/08/tp-docker-engine-windows-server-2016/

Page 12: Building microservices with docker

Nearest Future of Docker●Windows Docker containers●Hosting docker containers●Security improvements●(Who knows?) Support docker on CPU level like virtual machines

Page 13: Building microservices with docker

References and linkshttps://github.com/docker http://microservices.io/patterns/microservices.html http://technologyconversations.com/2015/01/07/monolithic-servers-vs-microservices/ http://docs.docker.com/ https://coreos.com/using-coreos/containers/ http://www.pluralsight.com/courses/docker-deep-dive