understanding microservice architecture wso2con asia 2016

26
Understanding Microservice Architecture (MSA) Sagara Gunathunga Software Architect WSO2

Upload: sagara-gunathunga

Post on 11-Apr-2017

638 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Understanding Microservice Architecture WSO2Con Asia 2016

Understanding Microservice Architecture (MSA)

Sagara GunathungaSoftware ArchitectWSO2

Page 2: Understanding Microservice Architecture WSO2Con Asia 2016

Monolithic Applications

Built as a single unit, so they are responsible for every possible functionality:

handling HTTP requests, UIs, executing domain logic, database operations,

communication with the browser/client, handling authentication and so on.

Page 3: Understanding Microservice Architecture WSO2Con Asia 2016

Drawbacks of Monolithic Even smallest changes involves building and deploying the whole

application.

Scalability issues : have to run multiple instances, even if you know that bottlenecks are lay on one component.

One technical stack is defined for whole solution, without considering most suitable technology for each components.

High coupling among project teams.

Can’t evolve or replace part of the application easily.

Page 4: Understanding Microservice Architecture WSO2Con Asia 2016

What is ‘MSA’ ?

An architectural style to developing a single application

as a suite of small services

- Martin Fowler

Page 5: Understanding Microservice Architecture WSO2Con Asia 2016

Monolithic Vs Microservice

Page 6: Understanding Microservice Architecture WSO2Con Asia 2016

‘MSA’ - Two Architecture Viewpoints

The Inner Architecture - Architecture of an individual Microservice.

The Outer Architecture - Architecture of the ecosystem in which Microservices will

be built, deployed and executed.

Inner

Architecture

Outer

Architecture

Page 7: Understanding Microservice Architecture WSO2Con Asia 2016

‘MSA’ - Inner Architecture

Inner

Architecture

Page 8: Understanding Microservice Architecture WSO2Con Asia 2016

Characteristics of Microservice

1. “Micro" is a concept of scope rather than size. A microservice

must have a single purpose and be loosely coupled in design

• NOT a service implemented with a small amount

of code.

• NOT a simple API to a more complex service implemented as part of a monolithic application.

• NOT a service exposed via API by another party

Page 9: Understanding Microservice Architecture WSO2Con Asia 2016

2. Microservices should be independently deployable and

independently disposable

Characteristics Microservice

• Microservices must to be disposable. If a microservice fails or is superseded a better service, then simply dispose of the old one.

• Require lot of support from deployment architecture and operational environment in which microservices will be built, deployed and executed.

Page 10: Understanding Microservice Architecture WSO2Con Asia 2016

3. Organized around Business Capabilities not around

management focused teams such as UI ,server-side, DB

Characteristics of Microservice

Page 11: Understanding Microservice Architecture WSO2Con Asia 2016

4. Decentralized Data Management

Characteristics of Microservice

Page 12: Understanding Microservice Architecture WSO2Con Asia 2016

5. Supports Technology Heterogeneity among services

Characteristics of Microservice

Page 13: Understanding Microservice Architecture WSO2Con Asia 2016

MSA and SOA

MSA is not based on all-new architectural principle; It combines SOA best practices with modern application delivery tooling and organizational disciplines.

+

Page 14: Understanding Microservice Architecture WSO2Con Asia 2016

‘MSA’ - Outer Architecture

Outer

Architecture

Page 15: Understanding Microservice Architecture WSO2Con Asia 2016

‘MSA’ - Outer Architecture

• Service Gateway • Expose services as managed APIs• Provides traffic and policy (security) management

• Service Routing• Route message to right service based on clients and service polices

• Load Balancing• Support service scalability

• Service Discovery• Register and find services and endpoints dynamically

Page 16: Understanding Microservice Architecture WSO2Con Asia 2016

‘MSA’ - Outer Architecture

• Shared configuration• Sharing configuration details among new nodes.

• Dependency management • Track and manage dependencies among services

• Messaging channels• Support asynchronous communication based on publish/subscribe

and event sourcing patterns.

Page 17: Understanding Microservice Architecture WSO2Con Asia 2016

MSA challenges – End to end Monitoring 1. Service level (APM) & deployment level dashboards

2. Transaction tracing, replay and log analysis

3. Service Instrumentation

Page 18: Understanding Microservice Architecture WSO2Con Asia 2016

MSA challenges – Security

1. Authentication and Authorization

2. Security context propagation among services

Page 19: Understanding Microservice Architecture WSO2Con Asia 2016

MSA challenges – Service Discovery

• Client-side Service Discovery • Server-Side Service Discovery

Page 20: Understanding Microservice Architecture WSO2Con Asia 2016

MSA challenges – Deployment Scalability

• Application platform as a service (aPaaS)• WSO2 AppCloud

• OS container management systems • Google Kubernetes• Apache Mesos

• Lightweight server OS• CoreOS• Atomic

Page 21: Understanding Microservice Architecture WSO2Con Asia 2016

MSA and WSO2

Although aPaaS platforms come closest, they are still general-purpose platforms, and there is currently no such thing as a holistic, commercially supported "microservice platform" that brings together all of the necessary capabilities.

- Gartner (January 2015)

WSO2 offer ….

① A competitive Microservice framework to support “Inner Architecture” (WSO2 MSF4J)

②A complete platform to support “Outer Architecture “ ( Analytics, Security, discovery , gateways, MQ etc.)

Page 22: Understanding Microservice Architecture WSO2Con Asia 2016

MSA and WSO2Service Gateway

Service Routing

Service DiscoveryShared ConfigurationDependency Management

Messaging

Monitoring

Security

Page 23: Understanding Microservice Architecture WSO2Con Asia 2016

WSO2 MSF4J

2.30 PM

Page 24: Understanding Microservice Architecture WSO2Con Asia 2016

MSA Drawbacks

• Complexity Is Moved Not Removed - Understanding, managing and testing dependencies is difficult.

• Centralized governance is not possible - Large numbers of Microservices are difficult to orchestrate

• Increase Network communication - Independently running component interact with each other using N/W calls. Such system require reliable and fast network connections.

Page 25: Understanding Microservice Architecture WSO2Con Asia 2016

MSA Drawbacks

• Network Security - Inter Service Communication need to be secured to avoid any inter communication security breach these application are more prone to security vulnerabilities.

• Production monitoring - Monitoring the application in production deployment becomes a complex job, with multiple services.

Page 26: Understanding Microservice Architecture WSO2Con Asia 2016

Thank You