Introduction to micro-services @DevOps pune Meetup

Post on 24-Jan-2017

312 views 1 download

Transcript of Introduction to micro-services @DevOps pune Meetup

INTRODUCTION TO MICROSERVICE

@DevOps Pune 13th March 2016

AGENDA Service Oriented Architectures Micro-services Architecture Why it is helpful Insights about Docker and MEAN Stack Role of Docker Demo (Micro-services based MEAN stack application on DOCKER)

WHO AM I? Cloud and DevOps Engineer DevOps by Profession and developer by Heart Blogger (oss-world.blogspot.in) Linkedin: https://in.linkedin.com/in/rahulkhengare

TARGET AUDIENCE Knowledge about web based applications Basics of Docker

SERVICE ORIENTED ARCHITECTURES

MONOLITHIC APPLICATION

UI Components

Business Logic

Database

User

Shopping Application

OS

MONOLITHIC All functionality is in single process Macro or single tier application Resides on single machine Front end, business logic and data access merged in single code

BENEFITS OF MONOLITHIC Easy to Develop Easy to Test Easy to Scale: Just run multiple instances of application on different servers Easy Deployment Process (just one war file in case of JAVA)

DRAWBACKS OF MONOLITHIC Manageability of code Difficult to deploy or rebuild Stuck with same technology stacks Scaling of Application Rigorous testing after change deployment Application Downtime

MICRO-SERVICES Composed of small, independent, narrowly-focused processes communicating with each other using language independent APIs Like UNIX commands, which are designed to do one single thing but can be piped together to perform some complex operations Loosely coupled, fine-grained, follows the Single Responsibility Principle Resource Independent Netflix, Amazon, LinkedIn, Groupon, PayPal, Airbnb, The Guardian are using already

MICRO-SERVICE APPLICATION

UI Component

sBusiness Logic

Inventory

User

Shopping Application

OS

UI Component

sBusiness Logic

OS

UI Component

sBusiness Logic

Cart/checkout

OS

UI Component

sBusiness Logic

Users

OS

LOAD BALANCER

Orders/shipping

WHY TO USE MICRO-SERVICES Technology agnostic Independent Rapid Deployment Helps replacing individual services using API Failure Isolation Scalability Flexibility

LETS BUILD MICRO-SERVICES

LO AD

BAL A N CER

1 MONOLITHIC APP ~ 100 MICRO-SERVICES

QUESTIONS?? How to architect my application? How to manage micro-services locally? How to ensure latest version of application? How to deploy them to production? What technology should I use?

TECHNOLOGY INSIGHTS

WHAT IS DOCKER Open Source Container Framework Helps developer or sysadmin to develop, ship, and run distributed applications Operating system level virtualization Container uses kernel features such as CGROUPS, NAMESPACES, SELINUX, AUFS Docker images are IMMUTABLE

VIRTUAL MACHINE VS DOCKER CONTAINER

DOCKER FLOW

HOW DOCKER HELP Docker Mission: Build, ship, run any application anywhere Use as platform for management of application containers Create a Docker container of your micro-services Run each micro-service in separate container Scaling is fun with Docker Use of Docker compose will stack your micro-service application as single application

MEAN STACK

DEMO

ONLINE TEST APP Docker Host

SERVERNGINX Docker

Test functionalitycontainer

MongoDB container

Security functionality

containerCLIENT APP Container

PORT 5000

PORT 80PORT 5002

PORT 5001

PORT 27017

TARGET APPLICATIONS Not suitable for simple applications Highly scalable applications Distributed functionality

CHALLENGES How to break application in micro-services Unmanageability Performance about series of dependent services Learning curve for new developer

ANY QUESTIONS??

THANK YOU!!