building microservices with docker
TRANSCRIPT
Building Microserviceswith Docker
Roman Melnyk
ContentIntroduction to microservices architecture
‘Docker container’ conceptsLimitations and pitfallsA short DEMO to start use Docker containers
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.
Monolithic vs Microservices Architecture
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
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.
Docker features●Docker Engine●Docker Hub●Docker Trusted Registry●Docker Machine●Docker Swarm●Docker Compose
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)
Key concepts●Images●Containers●Volumes
Limitations and pitfalls 1.Single process run2.Performance3.Natively works only on Linux4.Security and safety usage base images
5.Client - Host incompatibility
Docker is native only to LinuxGood news for MS lovers - https://blog.docker.com/2015/08/tp-docker-engine-windows-server-2016/
Nearest Future of Docker●Windows Docker containers●Hosting docker containers●Security improvements●(Who knows?) Support docker on CPU level like virtual machines
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