Microservices in the Enterprise

Post on 14-Apr-2017

1.598 views 0 download

Transcript of Microservices in the Enterprise

A Practical Guidance to 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

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

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

• Capabilities • Technologies

Agenda

Microservices: What’s the fuss all about?

• 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

Microservices?

A Definition of Microservices

Loosely Coupled Service Oriented Architecture with Bounded Contexts

Loosely Coupled SOAs

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

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

Microservices in the Real World

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

Foundational Building Blocks of Microservices Architectures

ConfigurationTooling Discovery Routing Observability

Datastores

Operational: Orchestration and Deployment Infrastructure

Development: Languages and Container

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

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

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

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

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

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

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

Building Enterprise-Ready Microservices Solutions

Relevant Capabilities of Enterprise Microservices Architectures

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

Microservices discovery

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

Enterprise Microservices Discovery Pattern

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

Microservices description

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

Enterprise Microservices Description Pattern

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

IPC microservices

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

Enterprise Microservices IPC Pattern

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

Deployment isolation

Capabilities

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

Enterprise Microservices Deployment Container Pattern

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

Microservices: Data source partition strategy

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

Enterprise Microservices Data Source Partition Pattern

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

Microservices: Verb/Use Case partition strategy

Capabilities

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

Enterprise Microservices Verb Partition Pattern

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

Lightweight middleware

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

Enterprise Microservices Lightweight Middleware Pattern

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

API Gateway

Capabilities

• Abstract the communication between client applications and internal microservices

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

Enterprise Microservices API Gateway Pattern

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

Microservices Observability

Capabilities

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

Enterprise Microservices Observability Pattern

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

Other relevant microservices capabilities

Other Relevant Microservices Capabilities

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

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

Thanksjesus.rodriguez@tellago.com

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

https://medium.com/@jrodthoughts