understanding microservice architecture wso2con asia 2016

Post on 11-Apr-2017

639 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Understanding Microservice Architecture (MSA)

Sagara GunathungaSoftware ArchitectWSO2

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.

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.

What is ‘MSA’ ?

An architectural style to developing a single application

as a suite of small services

- Martin Fowler

Monolithic Vs Microservice

‘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

‘MSA’ - Inner Architecture

Inner

Architecture

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

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.

3. Organized around Business Capabilities not around

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

Characteristics of Microservice

4. Decentralized Data Management

Characteristics of Microservice

5. Supports Technology Heterogeneity among services

Characteristics of Microservice

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.

+

‘MSA’ - Outer Architecture

Outer

Architecture

‘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

‘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.

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

2. Transaction tracing, replay and log analysis

3. Service Instrumentation

MSA challenges – Security

1. Authentication and Authorization

2. Security context propagation among services

MSA challenges – Service Discovery

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

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

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.)

MSA and WSO2Service Gateway

Service Routing

Service DiscoveryShared ConfigurationDependency Management

Messaging

Monitoring

Security

WSO2 MSF4J

2.30 PM

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.

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.

Thank You

top related