SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Сергей Радзыняк ".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 Dockercjmyers
 
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 2014Aviran 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-finalPaulo Freitas
 
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 daysBrett 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 AutomationMichael Rüefli
 
Scaling up to 30 m users
Scaling up to 30 m usersScaling up to 30 m users
Scaling up to 30 m usersYoav 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 Experiencereeder29
 
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 OpenShiftChristian 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 coregirish goudar
 
Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-servicesChristian 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 CloudTim 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 CloudStackTim 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 KubernetesChristian Posta
 

Tendances (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
 

En vedette

Cloud Foundry Architecture and Overview
Cloud Foundry Architecture and OverviewCloud Foundry Architecture and Overview
Cloud Foundry Architecture and Overviewrajdeep
 
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 FoundryTipico / 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とBOSHi_yudai
 
SAP Cloud Platform Product Overview
SAP Cloud Platform Product OverviewSAP Cloud Platform Product Overview
SAP Cloud Platform Product OverviewSAP 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
 

En vedette (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...
 

Similaire à 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 KubernetesTony 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
 
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 ServiceAndrew Ferrier
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa introSonic leigh
 
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 FoundryTony Erwin
 
Cloud and Windows Azure
Cloud and Windows AzureCloud and Windows Azure
Cloud and Windows AzureRadu 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-ServiceDavid 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 MeetupBoaz 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 KhalidOpenNebula Project
 
Building Real World Application with Azure
Building Real World Application with AzureBuilding Real World Application with Azure
Building Real World Application with Azuredivyapisces
 
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 AppsKhalid Ahmed
 
Software Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesSoftware Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesAngelos 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 AngularMark Leusink
 

Similaire à 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
 

Dernier

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Dernier (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.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