To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on CloudFoundry. Tony Erwin,

Similar documents
August, HPE Propel Microservices & Jumpstart

Which compute option is designed for the above scenario? A. OpenWhisk B. Containers C. Virtual Servers D. Cloud Foundry

Applications orientées événements et traitement sans serveur ( serverless ) Catherine Ezvan Senior Certified IT Specialist IBM Cloud

IBM Bluemix platform as a service (PaaS)

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

Exercise 1. Bluemix and the Cloud Foundry command-line interface (CLI)

Our Ba'le Against Technical Debt GeekCamp 2017

IBM Bluemix compute capabilities IBM Corporation

IBM Watson Content Hub. Architecture Overview

FUJITSU Cloud Service K5 CF Service Functional Overview

Scaling DreamFactory

BlueMix Hands-On Workshop Lab A - Building and Deploying BlueMix Applications

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Nevin Dong 董乃文 Principle Technical Evangelist Microsoft Cooperation

Application Centric Microservices Ken Owens, CTO Cisco Intercloud Services. Redhat Summit 2015

Microservice Powered Orchestration

Qlik Analytics Platform

Performance Testing in a Containerized World. Paola Rossaro

Nodes Tech Slides - Progressive Web Apps, 2018

More on Testing and Large Scale Web Apps

What's New in IBM WebSphere Portal Version 8? Open Mic November 6, 2012

Using the Bluemix CLI IBM Corporation

Design and Architecture. Derek Collison

End User Monitoring. AppDynamics Pro Documentation. Version 4.2. Page 1

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Oracle Forms and Oracle APEX The Odd Couple

Pick A Winner! In What Tool Should I Develop My Next App?

Etanova Enterprise Solutions

Microservices mit Java, Spring Boot & Spring Cloud. Eberhard Wolff

Continuous delivery of Java applications. Marek Kratky Principal Sales Consultant Oracle Cloud Platform. May, 2016

ASP.NET MVC Training

Beginner s Guide to Cordova and Mobile Application Development

Trends and Best Practices from Digital Experience projects around the world

Serverless Architecture Hochskalierbare Anwendungen ohne Server. Sascha Möllering, Solutions Architect

Simple AngularJS thanks to Best Practices

Connect and Transform Your Digital Business with IBM

Transforming the Internal IT Landscape with APIs. Scott Cranton Director, Application Platform SAs April 2018

Cloud Native Architecture 300. Copyright 2014 Pivotal. All rights reserved.

IBM Security QRadar Deployment Intelligence app IBM

THE PRAGMATIC INTRO TO REACT. Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX

Using and Developing with Azure. Joshua Drew

Modern and Responsive Mobile-enabled Web Applications

AngularJS Fundamentals

Microservices Implementations not only with Java. Eberhard Wolff Fellow

End User Monitoring. AppDynamics Pro Documentation. Version Page 1

Logging, Monitoring, and Alerting

Modern SharePoint and Office 365 Development

Il Mainframe e il paradigma dell enterprise mobility. Carlo Ferrarini zsystems Hybrid Cloud

Enhancing cloud applications by using external authentication services. 2015, 2016 IBM Corporation


BlueMix Hands-On Workshop Lab F - Java EE Cloud Trader Benchmark Application on BlueMix

Modern App Architecture

Deploying and Operating Cloud Native.NET apps

Microservices without the Servers: AWS Lambda in Action

Continuous Delivery for Cloud Native Applications

Adapting JDT to the Cloud. Alex Boyko Pivotal Jay Arthanareeswaran - IBM John Arthorne - IBM

High Availability Distributed (Micro-)services. Clemens Vasters Microsoft

Ten interesting features of Google s Angular Project

Web Application Architectures

Surrogate Dependencies (in

Microservices at Netflix Scale. First Principles, Tradeoffs, Lessons Learned Ruslan

2015 NALIT Professional Development Seminar September 30, Tools for Mobile App Development

Load Balancing Microservices-Based Applications

Introduction to Worklight Integration IBM Corporation

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Top five Docker performance tips

REST Easy with Infrared360

How to re-invent your IT Architecture. André Christ, Co-CEO LeanIX

Luckily, our enterprise had most of the back-end (services, middleware, business logic) already.

New Face of z/os Communications Server: V2R1 Configuration Assistant

Course 20486B: Developing ASP.NET MVC 4 Web Applications

End User Monitoring. AppDynamics Pro Documentation. Version Page 1

Developing ASP.NET MVC 4 Web Applications

Server execution of JavaScript: What could possibly go wrong?

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Hands-on Lab Session 9011 Working with Node.js Apps in IBM Bluemix. Pam Geiger, Bluemix Enablement

Developing ASP.NET MVC 4 Web Applications

C exam. Number: C Passing Score: 800 Time Limit: 120 min IBM C IBM Cloud Platform Application Development

Curriculum vitae - Dusan Odalovic

Full Stack Developer with Java

EMPLOYEE LOCATION TRACKING SERVICE

Docker and Oracle Everything You Wanted To Know

Microservices with Red Hat. JBoss Fuse

z/osmf V2R1: Configuration Assistant for z/os Communications Server

Microservices What, Why? ( 마이크로서비스를꼭써야하나 )

XBS Application Development Platform

Oracle Developer Day

Real Life Web Development. Joseph Paul Cohen

Build Mobile Cloud Apps Effectively Using Oracle Mobile Cloud Services (MCS)

TIPS AND TRICKS: DOMINO AND JAVASCRIPT DEVELOPMENT MASTERCLASS

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

Designing MQ deployments for the cloud generation

20486: Developing ASP.NET MVC 4 Web Applications

Exam C IBM Cloud Platform Application Development v2 Sample Test

IBM Domino App Dev Futures. Martin Donnelly, IBM

Industry-leading Application PaaS Platform

Zero to Microservices in 5 minutes using Docker Containers. Mathew Lodge Weaveworks

the road to cloud native applications Fabien Hermenier

Oracle Enterprise Manager 12c IBM DB2 Database Plug-in

Microservices Smaller is Better? Eberhard Wolff Freelance consultant & trainer

Transcription:

To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on CloudFoundry Tony Erwin, aerwin@us.ibm.com

Agenda Origins of the Bluemix UI Demons of the Monolith Slaying Demons with a Microservices Architecture New Demons to Slay

Bluemix UI Origins as a Monolith Serves as front-end to Bluemix (IBM s open cloud offering) Lets users create, view, and manage CF resources, containers, virtual servers, user accounts, billing/usage, etc. Runs on top of Bluemix PaaS Layer (CloudFoundry) Started as single-page application (SPA) to provide desktop-like experience in the browser All HTML, CSS, and JavaScript loaded within single web page Served from a single Java app State-of-the-art not all that long ago Dojo + J2EE was the most common stack in IBM when Bluemix UI dev started (~4 years ago) SPA still popular (AngularJS, Ember.js etc.)

Bluemix UI Many Components Home Resource Details Dashboard Users Catalog Billing And More! 4

Monolithic Architecture Bluemix UI (Client) Home Catalog Dashboard Resource Details Account Cloud Foundry Bluemix UI Server (Java) DB/2 Backend APIs (CF, Containers, VMs, Billing, Authentication, etc.)

Demons of the Monolith Bad performance Heavy weight JavaScript loaded to browser is slow Volume of client-initiated AJAX requests creates bottlenecks Difficult to integrate code from other teams (especially when they use different stacks) Have to push whole product even for small changes Poor SEO New hires want nothing to do with Dojo

Bluemix UI Microservices Architecture

Weapons of Microservices Aids migration to more modern, lighter-weight stack without starting over Improves performance with small services optimized for speed and page size Increases developer productivity with less chance of breaking other parts of the product Loosely-coupled services can deploy at their own schedule Teams use stack of their choosing Teams don t have to wait on others Leads to improved SEO Proxy facilitates clean URLs Server side generation results in crawlable content Improves cross-team UI consistency via microservice composition

Microservice Pattern Bluemix UI (Client) HTML CSS JavaScript (Vanilla, Polymer.js, React, Angular) UI microservice: Written with Node.js Serves lightweight HTML, CSS, JS (simplest approach that works) Uses server-side templating (Dust.js) to make as much data available to the client as possible for fast rendering & SEO Invokes Common Header microservice to get HTML for shared header to include in initial payload Consults shared session store for user token, etc. Leverages backend APIs and/or API microservices as appropriate Cloud Foundry Common Header Proxy Node.js (w/ Dust.js) API Microservice Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.)

Page Composition w/ Microservices Common header inline Microservice combined

Migration, Phase 1 Bluemix UI (Client) Catalog Dashboard Resource Details Account Cloud Foundry Delivered Feb 2015 Introduced proxy layer to route requests to different services based on URL path Added three microservices behind the proxy (alongside Java code) Leveraged two additional CF services: Data Cache for shared session NoSQL DB for data storage Common Header Home Proxy Solutions Bluemix UI Server (Monolith) DB/2 Session Store NoSQL DB Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.)

Migration, Phase 2 Bluemix UI (Client) Account Cloud Foundry Proxy Delivered Feb 2016 90%+ of migration complete Common Home Catalog Dashboard Resource Details Java Server (Monolith) DB/2 Session Store Monitoring Framework NoSQL DB Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.)

Migration End Goal Bluemix UI (Client) More or less current state in production, except for: Java app for certain APIs still exists Small amount of legacy Dojo code Cloud Bluemix Foundry PaaS Common Proxy Home Catalog Pricing Dashboard Orgs/ Spaces Session Store NoSQL DB Monitoring Framework Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.)

Plugin Architecture Bluemix UI (Client) Cloud Bluemix Foundry PaaS Proxy Watson Internet of Things Common Home Catalog Pricing Dashboard Orgs/ Spaces OpenWhisk Mobile Containers Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) Monitoring Framework Roughly 15 teams outside of the core UI team plugin via the proxy to look and behave like one large product

New Demons to Slay

New Demons to Slay More moving parts, more complexity Build pipeline becomes all the more important Collecting federated status, monitoring health of the system Granularity of microservices vs. memory allocation Monolith: 3 instances of Java app = 6 GB New console: ~27 apps, ~95 instances, ~55.5 GB Seamless navigation with existing monolith Blue-green deployments Promoting uniformity & consistency while still giving teams freedom Geo-load balancing and failover Taking lessons learned with resiliency in one Cloud Foundry deployment and applying globally across several

Importance of Monitoring We quickly learned that you can t run a microservice-based system without monitoring Lots of things can go wrong Root cause determination can be difficult Examples of needed metrics: Data for every inbound/outbound request for every microservice Response time Response code Memory usage, CPU usage, and uptime for every microservice General health of ourselves and dependencies Synthetic page load data with Sitespeed.io & WebPageTest

Global Load Balancing Across CF Bluemix UI (with all of its microservices) is available for our 4 public regions: Dallas, London, Frankfurt, and Sydney UI deployed in each region has its own URL (console.<region>.bluemix.net) pointing at the proxy shown in previous slides If a region goes down due to CF issue, networking, etc. any user of that region can t access the UI to manage their resources If CF down (for example) there are still a lot of non-cf resources the user may want to manage Currently rolling out what we call global console One global URL (console.bluemix.net) UI region switcher filters the current view rather than redirect to different URL Use Dyn geo load balancing to serve UI from the nearest healthy region If healthcheck in a region shows a problem, Dyn routes to the next closest healthy region Odds of all four regions being down at the same time much less than one region being down so, user much less likely to experience down time

The End Questions? Tony Erwin Email: aerwin@us.ibm.com Twitter: @tonyerwin See also presentation later this week: Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a Shoestring Budget http://sched.co/ajmn