microservices in the enterprise

63
A Practical Guidance to Microservices in the Enterprise

Upload: jesus-rodriguez

Post on 14-Apr-2017

1.598 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Microservices in the Enterprise

A Practical Guidance to Microservices in the Enterprise

Page 2: Microservices in the Enterprise

About Us

• Emerging technology firm focused on helping enterprises build breakthrough software solutions

• Building software solutions powered by disruptive enterprise software trends

-Machine learning and data science -Cyber-security -Enterprise IOT -Powered by Cloud and Mobile• Bringing innovation from startups and academic institutions to the enterprise

• Award winning agencies: Inc 500, American Business Awards, International Business Awards

Page 3: Microservices in the Enterprise

About This Webinar

• Research that brings together big enterprise software trends, exciting startups and academic research

• Best practices based on real world implementation experience• No sales pitches

Page 4: Microservices in the Enterprise

• Microservices overview• Some inspirational architectures• Microservices in the enterprise• Enterprise microservices patterns

• Capabilities • Technologies

Agenda

Page 5: Microservices in the Enterprise

Microservices: What’s the fuss all about?

Page 6: Microservices in the Enterprise

• SOA fatigue• Top down has proven to be impractical in the enterprise• Large monolithic applications can’t evolve fast enough• Large monolithic applications can’t scale fast enough• Docker and the container revolution • Emergence of new and exciting programming platforms (NodeJS, GO, etc)• Friction between the need for innovation and the constrained enterprise

software development practices

Factors Contributing to the Raise of Microservices

Page 7: Microservices in the Enterprise

Microservices?

Page 8: Microservices in the Enterprise

A Definition of Microservices

Loosely Coupled Service Oriented Architecture with Bounded Contexts

Page 9: Microservices in the Enterprise

Loosely Coupled SOAs

• Service dependencies• Component sharing• Database sharing• Centralized ESBs• Organizational coupling• Conway’s Law: https://en.wikipedia.org/wiki/Conway%27s_law

Page 10: Microservices in the Enterprise

Bounded Contexts

• Inspired by domain driven design • Encapsulates the details of a single business domain• Self-contained entity for the purpose of software development• Ability to update a microservices without knowledge of its peers

Page 11: Microservices in the Enterprise

Microservices in the Real World

Page 12: Microservices in the Enterprise

Some Examples

http://www.infoq.com/presentations/Twitter-Timeline-Scalability

http://www.infoq.com/presentations/twitter-soa http://www.infoq.com/presentations/Zipkin

https://speakerdeck.com/mattheath/scaling-micro-services-in-go-highload-plus-plus-2014

AWS Re:Invent : Asgard to Zuul https://www.youtube.com/watch?v=p7ysHhs5hl0 Resiliency at Massive Scale

https://www.youtube.com/watch?v=ZfYJHtVL1_w Microservice Architecture https://www.youtube.com/watch?v=CriDUYtfrjs

http://www.infoq.com/presentations/scale-gilt

http://www.slideshare.net/mcculloughsean/itier-breaking-up-the-monolith-philly-ete

Page 13: Microservices in the Enterprise

Foundational Building Blocks of Microservices Architectures

ConfigurationTooling Discovery Routing Observability

Datastores

Operational: Orchestration and Deployment Infrastructure

Development: Languages and Container

Page 14: Microservices in the Enterprise

Netflix OSS Microservices Architecture

Edda Archaius

Configuration

Asgard Aminator

Tooling

Eureka Prana

Discovery

Denominator Zuul, Netty Ribbon 2.0

Routing

Hystrix Pytheus SALP

Observability

Ephemeral datastores using Dynomite, Memcached, Astyanax, Staash, Priam, Cassandra

Manual Orchestration with Asgard and deployment on AWS or Eucalyptus Java, Groovy,

Scala, Clojure, Python, Node.js with AMI and Docker Containers

Page 15: Microservices in the Enterprise

Twitter Microservices Architecture

Decider

ConfigurationTooling

Finagle Zookeeper

Discovery

Finagle Netty

Routing

Zipkin

Observability

Custom Cassandra-like datastore: Manhattan

Orchestration using Aurora deployment in datacenters using Mesos

Scala with JVM Container

Page 16: Microservices in the Enterprise

Gilt Microservices Architecture

Decider

Configuration

Ion Cannon SBTRake

Tooling

Finagle Zookeeper

Akka Finagle Netty

Discovery Routing

Zipkin

Observability

Datastores per Microservice using MongoDB, Postgres, Voldemort

Deployment on AWS

Scala and Ruby with Docker Containers

Page 17: Microservices in the Enterprise

Hailo Microservices Architecture

Configuration

Hubot Janky Jenkins

Tooling

go-platform

Discovery

go-platform RabbitMQ

Routing

Request trace

Observability

Datastore based on Cassandra

Deployment on AWS

Go using Docker

Page 18: Microservices in the Enterprise

Microservices in the Enterprise

Page 19: Microservices in the Enterprise

Challenges for Adopting Microservices in the Enterprise

• Open source technology adoption • Organizational boundaries• Strict business processes • Traditional SOA mindset • Limited cloud adoption

Page 20: Microservices in the Enterprise

Benefits of Adopting Microservices in the Enterprise

• SOA that works• Building products instead of projects • Agility• Speed to market• Innovation • Remove friction for the adoption of new technologies

Page 21: Microservices in the Enterprise

Microservices vs. SOA

• SOA promise == Microservices reality • Federated innovation vs. Designed by committee• Small functional services vs. Large business services• REST and lightweight RPC vs. SOAP and WS-*• Lightweight middleware vs. ESBs• Decentralized governance vs. Centralized service repository • Development agility vs. Control

Page 22: Microservices in the Enterprise

Building Enterprise-Ready Microservices Solutions

Page 23: Microservices in the Enterprise

Relevant Capabilities of Enterprise Microservices Architectures

• Service discovery• Service description• Deployment isolation • Lightweight middleware• Service gateway• Data Source partition• Verb partition

Page 24: Microservices in the Enterprise

Microservices discovery

Page 25: Microservices in the Enterprise

Capabilities

• Removing coupling between microservices and client apps• Dynamically registering microservices in an enterprise topology• Allow client applications and other services to dynamically discover

microservices and adapt to changes• Avoid the centralized registry pattern of traditional SOAs

Page 26: Microservices in the Enterprise

Enterprise Microservices Discovery Pattern

Page 27: Microservices in the Enterprise

Technologies

• Consul.io ( https://consul.io/ ): DNS-style service discovery and configuration• Netflix’s Eureka ( https://github.com/Netflix/eureka ): AWS service registry used

for locating services for the purpose of load balancing and failover • Zookeeper (https://zookeeper.apache.org/ ): Centralized service used for

maintaining highly available configuration information• Etcd (https://github.com/coreos/etcd ): Distributed key value store optimized for

service discovery

Page 28: Microservices in the Enterprise

Microservices description

Page 29: Microservices in the Enterprise

Capabilities

• Express features of microservices in a descriptive format that can be understood by client applications

• Manage microservices metadata• Simplify the creation of client artifacts • Manage versions of microservices

Page 30: Microservices in the Enterprise

Enterprise Microservices Description Pattern

Page 31: Microservices in the Enterprise

Technologies

• Swagger (http://swagger.io/ ): Description language and description modeling tooling for RESTful services

• API Blueprints (https://apiblueprint.org/ ): Description language and description modeling tooling for Web APIs:

• Apache Thrift IDL (https://thrift.apache.org/ ): Highly scalable, cross language service development

• Google’s gRPC IDL(http://www.grpc.io/ ): HTTP2 framework for cross platform service development

Page 32: Microservices in the Enterprise

IPC microservices

Page 33: Microservices in the Enterprise

Capabilities

• Enable internal communication between microservices • Provide high performance interactions between large number of microservices• Enable seamless cross language communication between microservices and

client applications• Facilitate rapid microservices implementations across different languages

Page 34: Microservices in the Enterprise

Enterprise Microservices IPC Pattern

Page 35: Microservices in the Enterprise

Technologies

• Apache Thrift (https://thrift.apache.org/ ): Highly scalable, cross language service development

• Google’s gRPC (http://www.grpc.io/ ): HTTP2 framework for cross platform service development

• Akka (http://akka.io/ ) : Framework for building highly concurrent, distributed applications

• Twitter’s Finagle(https://twitter.github.io/finagle/ ): RPC framework for JVM services

• Netty(http://netty.io/ ): Asynchronous, even driven framework for client server solutions

Page 36: Microservices in the Enterprise

Deployment isolation

Page 37: Microservices in the Enterprise

Capabilities

• Isolate the infrastructure between microservices• Enable continuous deployment practices• Allow microservices portability across platforms

Page 38: Microservices in the Enterprise

Enterprise Microservices Deployment Container Pattern

Page 39: Microservices in the Enterprise

Technologies

• Docker (https://www.docker.com/ ): Container platforms for packaging, shipping and distributing applications

• Rocket(https://coreos.com/blog/rocket/ ): Runtime for Linux containers• Google’s Kubernetes(http://kubernetes.io/ ): Platform for managing containers

Page 40: Microservices in the Enterprise

Microservices: Data source partition strategy

Page 41: Microservices in the Enterprise

Capabilities

• Enable a standard model for accessing data via microservices• Partition microservices at the data source level• Facilitate the composition of data access microservices• Allow flexible data access models for client applications

Page 42: Microservices in the Enterprise

Enterprise Microservices Data Source Partition Pattern

Page 43: Microservices in the Enterprise

Technologies

• Facebook’s GraphQL(https://facebook.github.io/react/blog/2015/05/01/graphql-introduction.html) : URI-centric protocol for data fetching

• Odata(https://http://www.odata.org/ ): REST protocol for querying data • Netflix’s Falcor(http://netflix.github.io/falcor/ ): Data access API framework for

JSON data sources

Page 44: Microservices in the Enterprise

Microservices: Verb/Use Case partition strategy

Page 45: Microservices in the Enterprise

Capabilities

• Efficiently partition microservices by use case or function• Compose microservices to enable more complex use cases • Facilitate the functional testing of microservices

Page 46: Microservices in the Enterprise

Enterprise Microservices Verb Partition Pattern

Page 47: Microservices in the Enterprise

Technologies

• Apache Thrift (https://thrift.apache.org/ ): Highly scalable, cross language service development

• Google’s gRPC (http://www.grpc.io/ ): HTTP2 framework for cross platform service development

• Akka (http://akka.io/ ) : Framework for building highly concurrent, distributed applications

• Twitter’s Finagle(https://twitter.github.io/finagle/ ): RPC framework for JVM services

• Netty(http://netty.io/ ): Asynchronous, even driven framework for client server solutions

Page 48: Microservices in the Enterprise

Lightweight middleware

Page 49: Microservices in the Enterprise

Capabilities

• Extend microservices with simple middleware capabilities such as routing, transformation, persistent messaging etc

• Provide a standard model to enable the communication between client apps and microservices

• Expand the message exchange patterns supported by microservices solutions

Page 50: Microservices in the Enterprise

Enterprise Microservices Lightweight Middleware Pattern

Page 51: Microservices in the Enterprise

Technologies

• RabbitMQ (https://www.rabbitmq.com/) : Simple messaging infrastructure for applications

• Linkedin’s Kafka(http://kafka.apache.org/ ): Scalable publish-subscribe model for applications

• ZeroMQ(http://zeromq.org/ ): Embeddable networking and messaging model for applications

Page 52: Microservices in the Enterprise

API Gateway

Page 53: Microservices in the Enterprise

Capabilities

• Abstract the communication between client applications and internal microservices

• Compose microservices into client-ready services• Extend microservices with enterprise ready capabilities

Page 54: Microservices in the Enterprise

Enterprise Microservices API Gateway Pattern

Page 55: Microservices in the Enterprise

Technologies

• Mashape’s Kong (https://getkong.org/ ): Open source management platform for APIs and microservices

• Apigee(): Market leader in API management• 3Scale(http://www.3scale.net/ ): API management platform• Azure API Gateway(https://azure.microsoft.com/en-us/services/api-management/

): Azure native service for API and microservices management • AWS API Gateway(https://aws.amazon.com/api-gateway/ ): AWS native service

for API management

Page 56: Microservices in the Enterprise

Microservices Observability

Page 57: Microservices in the Enterprise

Capabilities

• Detect and prevent failures in complex microservices topologies• Trace request flow across microservices• Monitor service dependencies real time

Page 58: Microservices in the Enterprise

Enterprise Microservices Observability Pattern

Page 59: Microservices in the Enterprise

Technologies

• Netflix’s Hystrix(https://github.com/Netflix/Hystrix ): Framework for detecting and preventing microservices failures

• Twitter’s Zipkin(https://twitter.github.io/zipkin/ ): Framework for enabling request tracing across microservices

• Trace(http://trace.risingstack.com/ ): Platform for tracing interactions between microservices

• Spigo(https://github.com/adrianco/spigo ): Simulate request interactions between microservices

Page 60: Microservices in the Enterprise

Other relevant microservices capabilities

Page 61: Microservices in the Enterprise

Other Relevant Microservices Capabilities

• Failure isolation• Federated databases • Design for failure • Distributed configuration management • Testing • Security

Page 62: Microservices in the Enterprise

Summary

• Microservices are the future of enterprise distributed systems• Enterprise microservices solutions need to be implemented from the ground up• We can drive inspiration from internet giants• Foundational blocks of microservices architectures include: -Discovery -Description -Lightweight middleware -Partition by data source -Partition by verb -IPC communication -API Gateway -Observability

• Start small, iterate….

Page 63: Microservices in the Enterprise

[email protected]

https://twitter.com/jrdothoughts http://jrodthoughts.com/

https://medium.com/@jrodthoughts