SlideShare a Scribd company logo
To Kill a Monolith: Slaying the Demons of a
Monolith with Node.js Microservices
on Cloud Foundry
Tony Erwin, Senior Software Engineer, IBM
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 (Cloud Foundry)
• 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 Dashboard
Users
And
More!
Resource Details Billing
Monolithic Architecture
Home Catalog … Dashboard
Resource	
Details
Account
Backend	APIs	(CF,	Containers,	VMs,	Billing,	Authentication,	etc.)
DB/2
Bluemix UI	Server	
(Java)
Bluemix UI (Client)
Cloud Foundry
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
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
Node.js (w/	
Dust.js)
Backend	APIs	(CF,	Containers,	VMs,	BSS,	MCCP,	etc.)
Bluemix UI (Client)
Cloud Foundry
Proxy
Common	
Header
• HTML
• CSS
• JavaScript (Vanilla, Polymer.js, React, Angular)
API	Microservice
Page Composition w/ Microservices
header
inline
combined
Common
Microservice
Migration, Phase 1
• 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
Solutions
Catalog Dashboard
Resource	
Details
Account
Backend	APIs	(CF,	Containers,	VMs,	BSS,	MCCP,	etc.)
DB/2
Bluemix UI	Server	
(Monolith)
Bluemix UI (Client)
Cloud Foundry
Proxy
Common	
Header
Session	
Store
NoSQL	
DB
Home
…
Migration, Phase 2
• Delivered Feb 2016
• 90%+ of migration
complete
Home Catalog …
Resource	
Details
Dashboard
Backend	APIs	(CF,	Containers,	VMs,	BSS,	MCCP,	etc.)
Cloud
Foundry Proxy
Common
Monitoring	
Framework
Account
Bluemix UI (Client)
Java	Server	
(Monolith)
Session	
Store
NoSQL	
DB
DB/2
Migration End Goal
• More or less current
state in production,
except for:
• Java app for certain APIs
still exists
• Small amount of legacy
Dojo code
Home Catalog … DashboardPricing
Orgs/	
Spaces
Backend	APIs	(CF,	Containers,	VMs,	BSS,	MCCP,	etc.)
Bluemix UI (Client)
Bluemix
PaaS Proxy
Common
Monitoring	
Framework
Session	
Store
NoSQL	
DB
Cloud Foundry
Plugin Architecture
• Roughly 15 teams
outside of the
core UI team
plugin via the
proxy to look and
behave like one
large product
Home Catalog … DashboardPricing
Orgs/	
Spaces
Backend	APIs	(CF,	Containers,	VMs,	BSS,	MCCP,	etc.)
Bluemix UI (Client)
Bluemix
PaaS Proxy
Common
Monitoring	
Framework
Cloud Foundry
Watson
Internet	of	
Things
OpenWhisk Containers
Mobile …
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 Console: Geo Load Balancing and Failover
• Global Console Phase 1 went
live in Summer 2017
• One global URL
(console.bluemix.net)
• UI region switcher filters the
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
Questions?
Tony Erwin
Email: aerwin@us.ibm.com
Twitter: @tonyerwin

More Related Content

What's hot

Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"
Fwdays
 
Micro Services in .NET Core and Docker
Micro Services in .NET Core and DockerMicro Services in .NET Core and Docker
Micro Services in .NET Core and Docker
cjmyers
 
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Tony Erwin
 
Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014
Aviran Mordo
 
1.3 prepare for self service-final
1.3 prepare for self service-final1.3 prepare for self service-final
1.3 prepare for self service-final
Paulo Freitas
 
Best ofmms scsm - iaas
Best ofmms scsm - iaasBest ofmms scsm - iaas
Best ofmms scsm - iaas
Dieter Wijckmans
 
How to build a SaaS solution in 60 days
How to build a SaaS solution in 60 daysHow to build a SaaS solution in 60 days
How to build a SaaS solution in 60 days
Brett McLain
 
Introduction into Windows Azure Pack and Service Management Automation
Introduction into Windows Azure Pack and Service Management AutomationIntroduction into Windows Azure Pack and Service Management Automation
Introduction into Windows Azure Pack and Service Management Automation
Michael Rüefli
 
Microservices
MicroservicesMicroservices
Microservices
Varnish Software
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
Sergey Seletsky
 
Scaling up to 30 m users
Scaling up to 30 m usersScaling up to 30 m users
Scaling up to 30 m users
Yoav Avrahami
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
reeder29
 
LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?
phegaro
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Christian Posta
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Christian Posta
 
Microservices using .Net core
Microservices using .Net coreMicroservices using .Net core
Microservices using .Net core
girish goudar
 
Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-services
Christian Posta
 
User Transparent Service Migration to the Cloud
User Transparent Service Migration to the CloudUser Transparent Service Migration to the Cloud
User Transparent Service Migration to the Cloud
Tim Mackey
 
Using Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStackUsing Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStack
Tim Mackey
 
Microservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and KubernetesMicroservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and Kubernetes
Christian Posta
 

What's hot (20)

Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"Сергей Радзыняк ".NET Microservices in Real Life"
Сергей Радзыняк ".NET Microservices in Real Life"
 
Micro Services in .NET Core and Docker
Micro Services in .NET Core and DockerMicro Services in .NET Core and Docker
Micro Services in .NET Core and Docker
 
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
Monitoring Node.js Microservices on CloudFoundry with Open Source Tools and a...
 
Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014Wix Architecture at Scale - QCon London 2014
Wix Architecture at Scale - QCon London 2014
 
1.3 prepare for self service-final
1.3 prepare for self service-final1.3 prepare for self service-final
1.3 prepare for self service-final
 
Best ofmms scsm - iaas
Best ofmms scsm - iaasBest ofmms scsm - iaas
Best ofmms scsm - iaas
 
How to build a SaaS solution in 60 days
How to build a SaaS solution in 60 daysHow to build a SaaS solution in 60 days
How to build a SaaS solution in 60 days
 
Introduction into Windows Azure Pack and Service Management Automation
Introduction into Windows Azure Pack and Service Management AutomationIntroduction into Windows Azure Pack and Service Management Automation
Introduction into Windows Azure Pack and Service Management Automation
 
Microservices
MicroservicesMicroservices
Microservices
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Scaling up to 30 m users
Scaling up to 30 m usersScaling up to 30 m users
Scaling up to 30 m users
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
 
LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?LinkedIn Mobile: How do we do it?
LinkedIn Mobile: How do we do it?
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
 
Microservices using .Net core
Microservices using .Net coreMicroservices using .Net core
Microservices using .Net core
 
Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-services
 
User Transparent Service Migration to the Cloud
User Transparent Service Migration to the CloudUser Transparent Service Migration to the Cloud
User Transparent Service Migration to the Cloud
 
Using Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStackUsing Packer to Migrate XenServer Infrastructure to CloudStack
Using Packer to Migrate XenServer Infrastructure to CloudStack
 
Microservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and KubernetesMicroservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and Kubernetes
 

Viewers also liked

Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
rajdeep
 
Meetup: Platform-as-a-Service / Cloud Foundry
Meetup: Platform-as-a-Service / Cloud FoundryMeetup: Platform-as-a-Service / Cloud Foundry
Meetup: Platform-as-a-Service / Cloud Foundry
Tipico / Booxware
 
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
DataStax Academy
 
DevStackで始めるCloud FoundryとBOSH
DevStackで始めるCloud FoundryとBOSHDevStackで始めるCloud FoundryとBOSH
DevStackで始めるCloud FoundryとBOSH
i_yudai
 
SAP Cloud Platform Product Overview
SAP Cloud Platform Product OverviewSAP Cloud Platform Product Overview
SAP Cloud Platform Product Overview
SAP Cloud Platform
 
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
CA Technologies
 

Viewers also liked (6)

Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overview
 
Meetup: Platform-as-a-Service / Cloud Foundry
Meetup: Platform-as-a-Service / Cloud FoundryMeetup: Platform-as-a-Service / Cloud Foundry
Meetup: Platform-as-a-Service / Cloud Foundry
 
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
C* Summit 2013: Cassandra on Cloud Foundry by Renat Khasanshyn and Cornelia D...
 
DevStackで始めるCloud FoundryとBOSH
DevStackで始めるCloud FoundryとBOSHDevStackで始めるCloud FoundryとBOSH
DevStackで始めるCloud FoundryとBOSH
 
SAP Cloud Platform Product Overview
SAP Cloud Platform Product OverviewSAP Cloud Platform Product Overview
SAP Cloud Platform Product Overview
 
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
Case Study: Dell - APIs and Microservices for Cloud-Native Application Archit...
 

Similar to To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on Cloud Foundry

Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to KubernetesMigrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
Tony Erwin
 
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Tony Erwin
 
Microservices in Azure
Microservices in AzureMicroservices in Azure
Microservices in Azure
Doug Vanderweide
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container Service
Andrew Ferrier
 
Microservices in Azure
Microservices in AzureMicroservices in Azure
Microservices in Azure
Doug Vanderweide
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
Sonic leigh
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Migrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryMigrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud Foundry
Tony Erwin
 
Cloud and Windows Azure
Cloud and Windows AzureCloud and Windows Azure
Cloud and Windows Azure
Radu Vunvulea
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
David Currie
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Boaz Ziniman
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Jack-Junjie Cai
 
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus KhalidCloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
OpenNebula Project
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
divyapisces
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
Dmitry Buzdin
 
Containers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen AppsContainers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen Apps
Khalid Ahmed
 
Azure platform for customers
Azure platform for customersAzure platform for customers
Azure platform for customers
Rateb Abu Hawieleh
 
Software Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesSoftware Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced Architectures
Angelos Kapsimanis
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 

Similar to To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on Cloud Foundry (20)

Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to KubernetesMigrating Enterprise Microservices From Cloud Foundry to Kubernetes
Migrating Enterprise Microservices From Cloud Foundry to Kubernetes
 
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
 
Microservices in Azure
Microservices in AzureMicroservices in Azure
Microservices in Azure
 
Understanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container ServiceUnderstanding Docker and IBM Bluemix Container Service
Understanding Docker and IBM Bluemix Container Service
 
Microservices in Azure
Microservices in AzureMicroservices in Azure
Microservices in Azure
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Migrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryMigrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud Foundry
 
Cloud and Windows Azure
Cloud and Windows AzureCloud and Windows Azure
Cloud and Windows Azure
 
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-ServiceMigrating Java EE applications to IBM Bluemix Platform-as-a-Service
Migrating Java EE applications to IBM Bluemix Platform-as-a-Service
 
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL MeetupMicroservices and Serverless for Mega Startups - DevOps IL Meetup
Microservices and Serverless for Mega Startups - DevOps IL Meetup
 
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
Migrating Java EE applications to IBM Bluemix platform as-a-service (CloudFou...
 
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus KhalidCloud Computing as Innovation Hub - Mohammad Fairus Khalid
Cloud Computing as Innovation Hub - Mohammad Fairus Khalid
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azure
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
 
Containers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen AppsContainers as Infrastructure for New Gen Apps
Containers as Infrastructure for New Gen Apps
 
Azure platform for customers
Azure platform for customersAzure platform for customers
Azure platform for customers
 
Software Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesSoftware Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced Architectures
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 

Recently uploaded

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on Cloud Foundry

  • 1. To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on Cloud Foundry Tony Erwin, Senior Software Engineer, IBM aerwin@us.ibm.com
  • 2. Agenda • Origins of the Bluemix UI • Demons of the Monolith • Slaying Demons with a Microservices Architecture • New Demons to Slay
  • 3. 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 (Cloud Foundry) • 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.)
  • 4. Bluemix UI – Many Components Home Dashboard Users And More! Resource Details Billing
  • 5. Monolithic Architecture Home Catalog … Dashboard Resource Details Account Backend APIs (CF, Containers, VMs, Billing, Authentication, etc.) DB/2 Bluemix UI Server (Java) Bluemix UI (Client) Cloud Foundry
  • 6. 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
  • 8. 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
  • 9. Microservice Pattern 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 Node.js (w/ Dust.js) Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) Bluemix UI (Client) Cloud Foundry Proxy Common Header • HTML • CSS • JavaScript (Vanilla, Polymer.js, React, Angular) API Microservice
  • 10. Page Composition w/ Microservices header inline combined Common Microservice
  • 11. Migration, Phase 1 • 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 Solutions Catalog Dashboard Resource Details Account Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) DB/2 Bluemix UI Server (Monolith) Bluemix UI (Client) Cloud Foundry Proxy Common Header Session Store NoSQL DB Home …
  • 12. Migration, Phase 2 • Delivered Feb 2016 • 90%+ of migration complete Home Catalog … Resource Details Dashboard Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) Cloud Foundry Proxy Common Monitoring Framework Account Bluemix UI (Client) Java Server (Monolith) Session Store NoSQL DB DB/2
  • 13. Migration End Goal • More or less current state in production, except for: • Java app for certain APIs still exists • Small amount of legacy Dojo code Home Catalog … DashboardPricing Orgs/ Spaces Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) Bluemix UI (Client) Bluemix PaaS Proxy Common Monitoring Framework Session Store NoSQL DB Cloud Foundry
  • 14. Plugin Architecture • Roughly 15 teams outside of the core UI team plugin via the proxy to look and behave like one large product Home Catalog … DashboardPricing Orgs/ Spaces Backend APIs (CF, Containers, VMs, BSS, MCCP, etc.) Bluemix UI (Client) Bluemix PaaS Proxy Common Monitoring Framework Cloud Foundry Watson Internet of Things OpenWhisk Containers Mobile …
  • 16. 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
  • 17. 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
  • 18. Global Console: Geo Load Balancing and Failover • Global Console Phase 1 went live in Summer 2017 • One global URL (console.bluemix.net) • UI region switcher filters the 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