Top Banner
Microservices Eric Lehman, Chief Architect, eMedNY, CSRA Renjith Nair, Principal Solution Architect, eMedNY, CSRA
53

Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

May 05, 2018

Download

Documents

buithien
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices

Eric Lehman, Chief Architect, eMedNY, CSRA

Renjith Nair, Principal Solution Architect, eMedNY, CSRA

Page 2: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

But first, some context

Page 3: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

New York State Medicaid System - eMedNY

100% up-time Data Center

Peak 1.7 Million

Claims per Hour

80,000 Active

Users a Month

7 Million

1 out of 3

New Yorkers$50+ Billion in 2016

Paid 31,088

Providers in 2016

117 Million Txn’s

per Month

2 Second

Response

Page 4: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices
Page 5: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

AgendaTechnology

What are Microservices?

Characteristics of Microservices

Microservices and SOA

Challenges

Strategy

Adoption – Microservices @ eMedNY

Mircroservices and your Technology Strategy

Microservices Adoption Strategies for Government

Page 6: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

What are Microservices?

1. Web Services without the bloat

2. An architectural pattern

3. Deployment Pattern

4. All of the above

Page 7: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

All of the above

Page 8: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

The Microservice architectural style is an approach to

developing a single application as a suite of small

services, each running in its own process and

communicating with lightweight mechanisms,

often an HTTP resource API.

- Martin Fowler

Page 9: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Traditional Monolith

Multiple functions are bundled into one

single application. Functions get

developed, tested and deployed

together!

Page 10: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices

Multiple Independent services

Page 11: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Monolith Architecture

Citizen

Provider

Enrollment

HTML

Templating

Engine

Services Data Access

Layer

Load Balancer &

Other stuff

One Database to rule the world

HTML/JS Payload

Page 12: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Client Side Javascript MVC or

native Apps

Microservices Architecture

Citizen Services

Independent single purpose services

composed together to create apps

Provider Services

Enrollment Services

API

Gateway

Java

Nodejs

Golang

Page 13: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Characteristics of

Microservices

Page 14: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

What Microservices is and is not

Is

• A Label

• Bounded Scope/Context

• Organized around Business

Capabilities

• Deployed Independently

• Smart endpoints and dumb

pipes

• Hide Implementation details

• Culture of Automation

• Design for failure

Isn’t

• A Description

• Language

• Lines of code

• Team size

• Number of API endpoints

Credit James Lewis ,Martin Fowler , Sam Newman

Page 15: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Bounded Context

Use Single Responsibility and Domain

Driven Design principles to design the

boundaries of your services

Page 16: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Business Centric

Database

Middleware

UI

Organized around business domain, not technology

Enrollment

Provider

Citizen Programming

Page 17: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Deploy Independently

Citizen Services Provider Services Enrollment Services

Deploy

Ability to deploy services without impacting other allows rapid

change within your organization

Page 18: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Scale Independently

Citizen Services Enrollment Services

Citizen Services

Citizen Services

Scale only what you need to

Provider Services

Page 19: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Smart Endpoints and Dumb Pipes

Mediation/Transformation/Workflow and what not?

Endpoints should have all the intelligence not the pipe

Page 20: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Hide Implementation Details - Service Abstraction

Service is the unit of sharing your data and capabilities for the domain

Citizen Services

Provider Services メ✔

Citizen

Datastore

Page 21: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Hide Implementation details - Data Architecture

Services are responsible for its own data and governance of data

Citizen Services

Provider Services

SQL

NOSQL

Page 22: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Culture of Automation

Exponential complexity makes automation a necessity

Page 23: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Culture of Automation

Automated build,test and deploy cycles

Automated consumer driven contract testing

Dynamic infrastructure

Page 24: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Design for failure

Distributed systems are super difficult to debug, you

need to consider resilience , visibility and network failures

in your design from the get go

Page 25: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Design for failure

Proactive failure testing in production

Page 26: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices

vs

“SOA”

Page 27: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices vs Service Oriented Architecture

Service oriented

architecture

Microservices

Credits : Martin Fowler Devoxx Talk

Page 28: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices vs. SOA

Microservices

• Application Composition

• Fine grain

• Lightweight (HTTP)

• ESB is an anti-pattern

• Service First

• Fully Independent

Traditional SOA

• Integration problem

• Coarse grain

• Heavyweight (WS*/SOAP)

• ESB is the pattern

• Service when needed

• Interdependent

Microservices is SOA done right. It embraces the same ideas of SOA

but offers a fresh approach to architect distributed systems

Page 29: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

What changed from SOA days?

• Extensive automation /DevOps

• Infrastructure as code

• Containerization

• Mobile• Serverless Architecture

• JavaScript MVC and Single Page

Applications

• Cloud

• SOA’s overpromise and under delivery

• Universal adoption of HTTP/Restful

Page 30: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

That is all good!

What are the

challenges?

Page 31: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Any guess on the challenges with Microservices?

a) Complexity

b) Administration Overhead

c) Transaction Management

d) Logging /Error/Failure Management

e) All of the above

Page 32: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

It can be overwhelming

Credits Youtube, njalakomboya

Page 33: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Death Star Architecture

Page 34: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices Challenges

• Microservices are not for everyone

• All new tooling, mindset and process

• Security

• Infrastructure agility

• Logging (lots and lots of logging)

• Monitoring (lots and lots of monitoring)

• Transaction Management

• Automation a must

• Rapid innovation & pace

Page 35: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices Security Challenges

• More varied attack surfaces

• Harder to track events

• Secret Management

• Dynamic transport level encryption

• Authentication and Authorization

Page 36: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Adoption -

Microservices @

eMedNY

Page 37: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices Journey @ eMedNY

• 3 Patterns so far

– Extend a legacy monolith using Microservices

– JavaScript MVC and “Microservices” but single deployable

– JavaScript MVC and Microservices backend with independent deployment

• Limited separation at persistence level

• Framework - To reduce bootstrapping

• Actively Integrating software driven infrastructure components into the ecosystem

• Actively pursuing a Docker strategy

Page 38: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices Technology Stack

Develop a MicroservicesTechnology

stack for the Enterprise. Here’s

some of key concerns we had to

address

• API Gateway

• Service Discovery

• Service Proxy

• Security

• Deployment Pattern

• Metrics & Monitoring

• Log Aggregation

Page 39: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices

&

Technology Strategy

Page 40: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Conways Law

organizations which design systems ... are

constrained to produce designs which are copies of

the communication structures of these

organizations

Page 41: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Organizational Change

Microservices needs underlying organizational change

Page 42: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Application Architecture Evolution

MICROSERVICESTRADITIONAL SOAPRE-SOA (Monolithic)

Page 43: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices and your IT Strategy

• Modernization

• Efficiencies/Reuse

• Faster Requirement/idea → Production cycles

• Increase parallelism

• Introduce modern development practices

• Performance and Scaling

• Availability

• Open Source Software

• Attract Talent

Page 44: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Technology innovation is driven by users

Adoption Strategies for Government

Page 45: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Adoption Strategies for Government

Know your security controls and risks

Page 46: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

REST in peace

Game Changer = JavaScript MVC + Restful Service

backend

Adoption Strategies for Government

Page 47: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Microservices needs Automation (DevOps)

Adoption Strategies for Government

Page 48: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Develop a Microservices Tech Stack

Develop Bootstrap kits (Batch, Real time, Web )

Adoption Strategies for Government

Page 49: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Adoption Strategies for Government

Skills Retooling

(Change Manager → Build Engineer )

Page 50: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Not everything is a nail!

Page 51: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices
Page 52: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Eric Lehman,

Chief Architect, eMedNY

[email protected]

Renjith Nair,

Principal Solution Architect, eMedNY

[email protected]

Page 53: Microservices - NYS Forum Home cb..1.pdf · Agenda Technology What are Microservices? Characteristics of Microservices Microservices and SOA Challenges Strategy Adoption –Microservices

Thank You