From the Monolith to Microservices: Evolving Your Architecture to Scale. Randy Shoup @randyshoup linkedin.com/in/randyshoup



Similar documents
API Architecture. for the Data Interoperability at OSU initiative

Cloud Computing: Making the right choices

Databricks. A Primer

GO BEYOND DATA Real-time Analytics for Application Performance Management

OpenShift. Marek Jelen, OpenShift, Red Hat

The Cloud to the rescue!

Databricks. A Primer

Scalable Architecture on Amazon AWS Cloud

APP DEVELOPMENT ON THE CLOUD MADE EASY WITH PAAS

Cloud Based Application Architectures using Smart Computing

Google Cloud Platform The basics

bigdata Managing Scale in Ontological Systems

DevOps with Containers. for Microservices

Preparing Your Data For Cloud

Open Source Technologies on Microsoft Azure

Building Hyper-Scale Platform-as-a-Service Microservices with Microsoft Azure. Patriek van Dorp and Alex Thissen

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

Outdated Architectures Are Holding Back the Cloud

Elastic Application Platform for Market Data Real-Time Analytics. for E-Commerce

Microservices on AWS

ScienceLogic vs. Open Source IT Monitoring

PLATFORM-AS-A-SERVICE: ADOPTION, STRATEGY, PLANNING AND IMPLEMENTATION

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

Introduction to DevOps on AWS

An Application-Centric Infrastructure Will Enable Business Agility

DESIGN OF A PLATFORM OF VIRTUAL SERVICE CONTAINERS FOR SERVICE ORIENTED CLOUD COMPUTING. Carlos de Alfonso Andrés García Vicente Hernández

Ubiquitous access Inherently distributed Many, diverse clients (single purpose rich) Unlimited computation and data on demand

YouTube Vitess. Cloud-Native MySQL. Oracle OpenWorld Conference October 26, Anthony Yeh, Software Engineer, YouTube.

ON-PREMISE OR IN THE CLOUD, A SINGLE JAVA EE APPLICATION PLATFORM

BeBanjo Infrastructure and Security Overview

CUMULUX WHICH CLOUD PLATFORM IS RIGHT FOR YOU? COMPARING CLOUD PLATFORMS. Review Business and Technology Series

Cloud Service Model. Selecting a cloud service model. Different cloud service models within the enterprise

Senior Business Intelligence/Engineering Analyst

PaaS - Platform as a Service Google App Engine

Top DBMS Insights From IT Executives

the missing log collector Treasure Data, Inc. Muga Nishizawa

Simplified Management With Hitachi Command Suite. By Hitachi Data Systems

ebay : How is it a hit

Development of nosql data storage for the ATLAS PanDA Monitoring System

Elastic Private Clouds

IAN MASSINGHAM. Technical Evangelist Amazon Web Services

On- Prem MongoDB- as- a- Service Powered by the CumuLogic DBaaS Platform

OPTIMIZING PERFORMANCE IN AMAZON EC2 INTRODUCTION: LEVERAGING THE PUBLIC CLOUD OPPORTUNITY WITH AMAZON EC2.

Maginatics Cloud Storage Platform A primer

Implement Hadoop jobs to extract business value from large and varied data sets

Reference Model for Cloud Applications CONSIDERATIONS FOR SW VENDORS BUILDING A SAAS SOLUTION

MySQL Comes of Age. Robert Hodges Sr. Staff Engineer Percona Live London November 4, VMware Inc. All rights reserved.

An Intro to OpenStack. Ian Lawson Senior Solution Architect, Red Hat

Tutto quello che c è da sapere su Azure App Service

Software-Defined Networks Powered by VellOS

Direct NFS - Design considerations for next-gen NAS appliances optimized for database workloads Akshay Shah Gurmeet Goindi Oracle

THE REALITIES OF NOSQL BACKUPS

The Virtualization Practice

Easy Deployment of Mission-Critical Applications to the Cloud

Drive new Revenue With PaaS/IaaS. Ruslan Synytsky CTO, Jelastic

NoSQL systems: introduction and data models. Riccardo Torlone Università Roma Tre

Hypertable Architecture Overview

Mark Bennett. Search and the Virtual Machine

SeaClouds Project D6.2 - Case Study test-beds and key features mapping

Bluemix: The Open Platform as a Service

SOA Success is Not a Matter of Luck

Amr El Abbadi. Computer Science, UC Santa Barbara

Drupal in the Cloud. Scaling with Drupal and Amazon Web Services. Northern Virginia Drupal Meetup

Copyright 2011 Sentry Data Systems, Inc. All Rights Reserved. No Unauthorized Reproduction.

Amazon Elastic Beanstalk

Customer Case Study. Sharethrough

BUILDING SAAS APPLICATIONS ON WINDOWS AZURE

Taking the Open Path to Hybrid Cloud with Dell Networking and Private Cloud Solutions

Oracle Platform as a Service (PaaS) FAQ

Load and Performance Load Testing. RadView Software October

Considerations for Adopting PaaS (Platform as a Service)

Cloud Networking: A Novel Network Approach for Cloud Computing Models CQ1 2009

CloudDB: A Data Store for all Sizes in the Cloud

Architecting Distributed Databases for Failure A Case Study with Druid

DATA INTEGRATION. in the world of microservices

Launching the Next Generation Satellite Ground System on Cloud Foundry and Microservices

You should have a working knowledge of the Microsoft Windows platform. A basic knowledge of programming is helpful but not required.

Investor Newsletter. Storage Made Easy Cloud Appliance High Availability Options WHAT IS THE CLOUD APPLIANCE?

Who moved my cloud? Part I: Introduction to Private, Public and Hybrid clouds and smooth migration

A FRAMEWORK FOR ENHANCING SECURITY AND PERFORMANCE IN MULTI-TENANT APPLICATIONS

Table of Contents. Abstract. Cloud computing basics. The app economy. The API platform for the app economy

Affordable, Scalable, Reliable OLTP in a Cloud and Big Data World: IBM DB2 purescale

Enabling Database-as-a-Service (DBaaS) within Enterprises or Cloud Offerings

DLT Solutions and Amazon Web Services

Start up Jobs Germany FEB 2014

Emerging Technologies Shaping the Future of Data Warehouses & Business Intelligence

Zero Downtime Deployments with Database Migrations. Bob Feldbauer

JAVA IN THE CLOUD PAAS PLATFORM IN COMPARISON

Build more and grow more with Cloudant DBaaS

perspective Microservices A New Application Paradigm Abstract

References. Introduction to Database Systems CSE 444. Motivation. Basic Features. Outline: Database in the Cloud. Outline

Introduction to Database Systems CSE 444

Achieving Zero Downtime and Accelerating Performance for WordPress

Corporate Capabilities and Past Performance

Bimodal IT. PaaS and Containers, what are they all about? By Rhys Sharp Chief Technology Officer. August 2015

Azure Day Application Development

API Management Introduction and Principles

Gartner References of G Technology

Monitoring Cloud Applications. Amit Pathak

Low-cost Open Data As-a-Service in the Cloud

Transcription:

From the Monolith to Microservices: Evolving Your Architecture to Scale Randy Shoup @randyshoup linkedin.com/in/randyshoup

Background Consulting CTO at Randy Shoup Consulting o o Helping companies from large enterprises to small startups scale their organizations and technology CTO as a service CTO at KIXEYE o Real-time strategy games for web and mobile Director of Engineering for Google App Engine o o World s largest Platform-as-a-Service Part of Google Cloud Platform Chief Engineer at ebay o Multiple generations of ebay s real-time search infrastructure

Architecture Evolution ebay 5 th generation today Monolithic Perl à Monolithic C++ à Java à microservices Twitter 3 rd generation today Monolithic Rails à JS / Rails / Scala à microservices Amazon Nth generation today Monolithic C++ à Java / Scala à microservices

Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

The Monolithic Architecture 2-3 monolithic tiers {JS, ios, Android} Presentation {PHP, Ruby, Python} Application {MySQL, Mongo} Database

The Monolithic Application Pros Cons Simple at first In- process latencies Coordination overhead as team grows Poor enforcement of modularity Single codebase, deploy unit Resource- efficient at small scale Poor scaling (vertical only) All- or- nothing deploy (downtime, failures) Long build times

The Monolithic Database Pros Cons Simple at first Join queries are easy Single schema, deployment Resource- efficient at small scale Coupling over time Poor scaling and redundancy (all- or- nothing, vertical only) Difficult to tune properly All- or- nothing schema management

If you don t end up regrering your early technology decisions, you probably over- engineered -- me

Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

Microservices Single-purpose Simple, well-defined interface Modular and independent More graph of relationships than tiers Isolated persistence (!) *Not* a new idea o Nothing more than encapsulation and modularity A B C D E

Microservices Pros Cons Each unit is simple Many cooperating units Independent scaling and performance Independent testing and deployment Can optimally tune performance (caching, replication, etc.) Many small repos Requires more sophisticated tooling and dependency management Network latencies

Ecosystem of Services Hundreds to thousands of independent services Many layers of dependencies, no strict tiers Graph of relationships, not a hierarchy A C B D E F G

Evolution, not Intelligent Design No centralized, top-down design of the system o Most technology decisions made locally instead of globally o Better decisions in the field Variation and Natural selection o Create / extract new services when needed to solve a problem o Deprecate services when no longer used o Services justify their existence through usage Appearance of clean layering is an emergent property

Google Service Layering Cloud Datastore: NoSQL service o o o Highly scalable and resilient Strong transactional consistency SQL-like rich query capabilities Megastore: geo-scale structured database o o Multi-row transactions Synchronous cross-datacenter replication Bigtable: cluster-level structured storage o (row, column, timestamp) -> cell contents Colossus: next-generation clustered file system o Block distribution and replication Borg: cluster management infrastructure o Task scheduling, machine assignment Cloud Datastore Megastore Bigtable Colossus Borg

Standardization Standardized communication o Network protocols o Data formats o Interface schema / specification Standardized infrastructure o Source control o Configuration management o Cluster management o Monitoring, alerting, diagnosing, etc.

Standards become standards by being better than the alternatives!

Enforcing Standardization Encouraged via o Libraries o Support in underlying services o Code reviews o Searchable code

KIXEYE Service Chassis Goal: Make it easy to build and deploy Microservices Chassis core Configuration integration Registration and Discovery Monitoring and Metrics Load-balancing for downstream services Failure management for downstream services Development / Deployment Pipeline Transport layer over REST / JSON or WebSockets Service template in Maven Build pipeline through Puppet -> Packer -> AMI Red-black deployment via Asgard

KIXEYE Service Chassis Heavy use of NetflixOSS Asgard Hystrix Ribbon + WebSockets è Janus Eureka è Results 15 minutes from no code to running service in AWS (!) Open-sourced at https://github.com/kixeye

The easiest way to encourage best practices is with *code*!

Make it really easy to do the right thing, and harder to do the wrong thing!

Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

Migrating Incrementally Find your worst scaling bottleneck Wall it off behind an interface Replace the implementation è Rinse and Repeat

Building Microservices Common Chassis / Framework o Make it trivially easy to build and maintain a service Define Service Interface (Formally!) o Propose o Discuss with client(s) o Agree Prototype Implementation o Simplest thing that could possibly work o Client can integrate with prototype o Implementor can learn what works and what does not

Building Microservices Real Implementation o Throw away the prototype (!) è Rinse and Repeat

Service Anti- PaRerns The Mega-Service o Overbroad area of responsibility is difficult to reason about, change o Leads to more upstream / downstream dependencies Shared persistence o Breaks encapsulation, encourages backdoor interface violations o Unhealthy and near-invisible coupling of services o (-) Initial ebay SOA efforts

Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

Goals of a Service Owner Meet the needs of my clients Functionality Quality Performance Stability and reliability Constant improvement over time at minimum cost and effort Leverage common tools and infrastructure Leverage other services Automate building, deploying, and operating my service Optimize for efficient use of resources

Responsibilities of a Service Owner End-to-end Ownership o Team owns service from design to deployment to retirement o No separate maintenance or sustaining engineering team o DevOps philosophy of You build it, you run it Autonomy and Accountability o Freedom to choose technology, methodology, working environment o Responsibility for the results of those choices

Service as Bounded Context Primary focus on my service o Clients which depend on my service o Services which my service depends on o Cognitive load is very bounded Client A Client B Client C Very little worry about o The complete ecosystem Service o The underlying infrastructure è Small, nimble service teams

Microservice Relationships Vendor Customer Relationship o Friendly and cooperative, but structured o Clear ownership and division of responsibility o Customer can choose to use service or not (!) Service-Level Agreement (SLA) o Promise of service levels by the provider o Customer needs to be able to rely on the service, like a utility Charging and Cost Allocation o Charge customers for *usage* of the service o Aligns economic incentives of customer and provider o Motivates both sides to optimize

Maintaining Interface Stability Backward / forward compatibility of interfaces o Can *never* break your clients code o Often multiple interface versions o Sometimes multiple deployments o Majority of changes don t impact the interface in any way Explicit deprecation policy o Strong incentive to wean customers off old versions (!)

Recap: Evolution to Microservices The Monolith The Microservices Ecosystem Migrating to Microservices Life as a Service Owner

Obrigado! @randyshoup linkedin.com/in/randyshoup Slides will be at slideshare.net/randyshoup