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 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
4
Home Dashboard Catalog
Users Billing
And
More!Resource Details
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 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

Contenu connexe

Tendances

Cloud computing-2 (1)
Cloud computing-2 (1)Cloud computing-2 (1)
Cloud computing-2 (1)JUDYFLAVIAB
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introductionBoris Tveritnev
 
REST vs. Messaging For Microservices
REST vs. Messaging For MicroservicesREST vs. Messaging For Microservices
REST vs. Messaging For MicroservicesEberhard Wolff
 
NIC - Windows Azure Pack - Level 300
NIC - Windows Azure Pack - Level 300NIC - Windows Azure Pack - Level 300
NIC - Windows Azure Pack - Level 300Kristian Nese
 
Grails in the Cloud (2013)
Grails in the Cloud (2013)Grails in the Cloud (2013)
Grails in the Cloud (2013)Meni Lubetkin
 
Ordina SOFTC Presentation - Desktop Virtualization
Ordina SOFTC Presentation - Desktop VirtualizationOrdina SOFTC Presentation - Desktop Virtualization
Ordina SOFTC Presentation - Desktop VirtualizationOrdina Belgium
 
Getting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service ManagerGetting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service ManagerAlexandre Verkinderen
 
10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from Orchestrator10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from OrchestratorFredrik Knalstad
 
VMware VCP7-DTM: More than just Horizon View
VMware VCP7-DTM: More than just Horizon ViewVMware VCP7-DTM: More than just Horizon View
VMware VCP7-DTM: More than just Horizon ViewMatt Crape
 
Iib v10 performance problem determination examples
Iib v10 performance problem determination examplesIib v10 performance problem determination examples
Iib v10 performance problem determination examplesMartinRoss_IBM
 
Architectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym ZhiltsovArchitectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym ZhiltsovLohika_Odessa_TechTalks
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Schogini Systems Pvt Ltd
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRussell Searle
 
Amazon web services (aws) main developer services
Amazon web services (aws)   main developer servicesAmazon web services (aws)   main developer services
Amazon web services (aws) main developer servicesAnderson Carvalho
 
VMware Mirage for Retail
VMware Mirage for RetailVMware Mirage for Retail
VMware Mirage for RetailKiss Tibor
 
Designing distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusDesigning distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusMauro Servienti
 
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaSWSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaSWSO2
 

Tendances (20)

Cloud computing-2 (1)
Cloud computing-2 (1)Cloud computing-2 (1)
Cloud computing-2 (1)
 
NServiceBus introduction
NServiceBus introductionNServiceBus introduction
NServiceBus introduction
 
REST vs. Messaging For Microservices
REST vs. Messaging For MicroservicesREST vs. Messaging For Microservices
REST vs. Messaging For Microservices
 
NIC - Windows Azure Pack - Level 300
NIC - Windows Azure Pack - Level 300NIC - Windows Azure Pack - Level 300
NIC - Windows Azure Pack - Level 300
 
Grails in the Cloud (2013)
Grails in the Cloud (2013)Grails in the Cloud (2013)
Grails in the Cloud (2013)
 
Spring cloud
Spring cloudSpring cloud
Spring cloud
 
Ordina SOFTC Presentation - Desktop Virtualization
Ordina SOFTC Presentation - Desktop VirtualizationOrdina SOFTC Presentation - Desktop Virtualization
Ordina SOFTC Presentation - Desktop Virtualization
 
Getting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service ManagerGetting Started with Orchestrator and Service Manager
Getting Started with Orchestrator and Service Manager
 
SCORCH: Tying it All Together
SCORCH: Tying it All TogetherSCORCH: Tying it All Together
SCORCH: Tying it All Together
 
10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from Orchestrator10 ways to trigger runbooks from Orchestrator
10 ways to trigger runbooks from Orchestrator
 
VMware VCP7-DTM: More than just Horizon View
VMware VCP7-DTM: More than just Horizon ViewVMware VCP7-DTM: More than just Horizon View
VMware VCP7-DTM: More than just Horizon View
 
Ios models
Ios modelsIos models
Ios models
 
Iib v10 performance problem determination examples
Iib v10 performance problem determination examplesIib v10 performance problem determination examples
Iib v10 performance problem determination examples
 
Architectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym ZhiltsovArchitectural peripherals of react by Vadym Zhiltsov
Architectural peripherals of react by Vadym Zhiltsov
 
Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2Microservices Using Docker Containers for Magento 2
Microservices Using Docker Containers for Magento 2
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hosting
 
Amazon web services (aws) main developer services
Amazon web services (aws)   main developer servicesAmazon web services (aws)   main developer services
Amazon web services (aws) main developer services
 
VMware Mirage for Retail
VMware Mirage for RetailVMware Mirage for Retail
VMware Mirage for Retail
 
Designing distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusDesigning distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBus
 
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaSWSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
 

Similaire à Slaying the Demons of a Monolith with Node.js Microservices

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
 
Effective admin and development in iib
Effective admin and development in iibEffective admin and development in iib
Effective admin and development in iibm16k
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackAnimesh Singh
 
AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...Amazon Web Services
 
Cloud description
Cloud descriptionCloud description
Cloud descriptionthanuambika
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overviewcornelia davis
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBrian Benz
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation TechnologiesPankaj Saharan
 
01 introduction to darwino
01   introduction to darwino01   introduction to darwino
01 introduction to darwinodarwinodb
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessAmazon Web Services
 
Software Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesSoftware Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesAngelos Kapsimanis
 
AWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAmazon Web Services
 
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
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017Andrew Ripka
 
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
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 

Similaire à Slaying the Demons of a Monolith with Node.js Microservices (20)

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
 
Effective admin and development in iib
Effective admin and development in iibEffective admin and development in iib
Effective admin and development in iib
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Building a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStackBuilding a PaaS Platform like Bluemix on OpenStack
Building a PaaS Platform like Bluemix on OpenStack
 
AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...
 
Cloud description
Cloud descriptionCloud description
Cloud description
 
Windows Azure introduction
Windows Azure introductionWindows Azure introduction
Windows Azure introduction
 
Cloud Foundry Technical Overview
Cloud Foundry Technical OverviewCloud Foundry Technical Overview
Cloud Foundry Technical Overview
 
Best Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft AzureBest Practices for couchDB developers on Microsoft Azure
Best Practices for couchDB developers on Microsoft Azure
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation Technologies
 
01 introduction to darwino
01   introduction to darwino01   introduction to darwino
01 introduction to darwino
 
HSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and ServerlessHSBC and AWS Day - Microservices and Serverless
HSBC and AWS Day - Microservices and Serverless
 
Software Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced ArchitecturesSoftware Architectures, Week 5 - Advanced Architectures
Software Architectures, Week 5 - Advanced Architectures
 
AWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWS
 
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
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
 
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 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
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 

Dernier

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Slaying the Demons of a Monolith with Node.js Microservices

  • 1. To Kill a Monolith: Slaying the Demons of a Monolith with Node.js Microservices on CloudFoundry Tony Erwin, 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 (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.)
  • 4. Bluemix UI – Many Components 4 Home Dashboard Catalog Users Billing And More!Resource Details
  • 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 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
  • 19. 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