SlideShare a Scribd company logo
1 of 58
Download to read offline
I-Tier: Node.js at Groupon
Sean McCullough
@mcculloughsean
Enterprise Node.js Developer at Groupon
This Presentation is About...
• how Groupon's platform stopped working
• how we rewrote a part of it
• what went well and what didn't
Problems
Simple Start
• Monolithic Ruby on Rails app
• Sustained business through hyper-growth
• Small engineering team
• Simple product
Acquisitions
• CityDeal.de (Germany, most of EU)
• SoSata (India)
• Needish (South America)
Ran as separate platforms
One Monolithic Application
Actually, two separate monoliths
Move to Mobile
• ~50% of global transactions
• Streamlined user experience
• Mobile uses REST API
Two Facets of the Same Monolith
Two Facets X Two Monoliths
Business was Stuck
• Could not build features fast enough
• Wanted to build features worldwide
• Mobile and web lacked feature parity
• Could not change look and feel
• Difficult to internationalize
Platform was Broken
• Required cdn cached deal page
• Monolith was hard to scale
• Entire site would go down
• Couldn't support growth
The Plan
Start with the Frontend
• Unify global look and feel
• REST API already built for mobile
• Backend services are more complicated to unite
Design Goals
• Decouple teams
• Deploy apps on team schedule
• Allow for global design changes
• I18n/L13n
• Be small, do the minimum
Bakeoff
• Node
• MRI Ruby/Rails, MRI Ruby/Sinatra
• JRuby/Rails, Sinatra
• MRI Ruby + Sinatra + EM
• Java/Play, Java/Vertx
• Python+Twisted
• PHP
Why Node.js?
• Vibrant community
• NPM!
• Frontend developers know javascript
• Performant enough
• Easy scaling (process model)
Why Node.js Javascript?
• Front-end devs know Javascript
• Leverage existing knowledge on server
Stack
• CoffeeScript (hi haters!)
• Express
• Mustache & custom view engine
• Custom asset pipeline
Boundaries
• Apps only talk to REST API and Memcached
• Layout is in a separate application
• Shared common asset bundle
Design Goals
• Simple controllers
• Render from the server
• Skip fancy performance optimizations
• Make the API a bottleneck
• Resilience when services fail
Simple Design
module.exports =
main: ( {attributes, renderCallback} ) ->
# Presenter that sets the layout
view = presenters.page 'subscribe', attributes
# Grab the list of all the divisions
grouponAPI.fetch { endpoint: 'divisions' }, (err, {divisions}, details) ->
# If there’s an error, bail and pass the error along
return renderCallback err if err?
divisionsPresenter = presenters.divisions divisions, {
currentDivision: attributes.query?.division_p
}
view.set { divisions: divisionsPresenter }
render.pageHtml view, renderCallback
Subscribe Page
• Simple application
• Partial implementation
• Proved out the concept
Growing Pains
• Max sockets
• Breaking our infrastructure
New problems
• User authentication
• More service calls
• Complicated routing
• More traffic
• Share look and feel
grout
Switchboard for incoming requests to I-Tier
applications
• domain
• locale
• country
• experiments
grout
• groupon.com/deals/my-awesome-deal
• itier-deal-page-vip.snc1/deals/my-awesome-
deal
• groupon.de/browse/berlin
• itier-browse-page-vip.lup1/browse/berlin
grout
• Experiments between different applications on
the same URL
• Testing between alternative implementations
(including the legacy monoliths!)
gconfig
• Configuration as a service
• Some config can change on the fly
• Config can be promoted from uat -> staging ->
prod
Layout
• Distribute layout as library
• Use ESIs for top/bottom of page
• Apps are called through a “chrome service”
• Fetch templates from service
Layout Service
• Independent rollouts
• Changes can be shipped without re-deploying all
apps
• Easy to use in development
Layout Service
• Uses semantic versioning
• Roll forward with bug fixes
• Stay locked on a specific version
• Enable site-wide experiments
Rewrite All The Things!
Rewrite
• Get the whole company to move at once
• Supporting two platforms is hard
• Transition from June 2013 to September 1, 2013
Rewrite
• ~150 developers
• Global effort
• Feature freeze – A/B testing against mostly the
same features
What Went Well
It worked!
Webpages got faster
Sustained record traffic
What Didn't Go Well
Negatives of SOA
• Increased testing burden
• Tooling needs to catch up
• Increased operational overhead
Culture Problems
• Changed team workflow
• Teams are silos
• Code quality varies
Next Steps
• Better resiliency to outages
• Distributed tracing
• International (launching now)
• Open Source - Testium
tl;dr
• Kill web monolith
• Federated frontend
• Service oriented architecture
• grout
• gconfig
• Layout service
Thanks!
@mcculloughsean
empirejs 2014

More Related Content

What's hot

Simplifying Big Data Analytics with Apache Spark
Simplifying Big Data Analytics with Apache SparkSimplifying Big Data Analytics with Apache Spark
Simplifying Big Data Analytics with Apache Spark
Databricks
 
Dynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theoremDynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theorem
Grisha Weintraub
 

What's hot (20)

Apache Spark Introduction
Apache Spark IntroductionApache Spark Introduction
Apache Spark Introduction
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Dive into PySpark
Dive into PySparkDive into PySpark
Dive into PySpark
 
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
 
Apache hive introduction
Apache hive introductionApache hive introduction
Apache hive introduction
 
Couchbase 101
Couchbase 101 Couchbase 101
Couchbase 101
 
hive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata Storagehive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata Storage
 
Apache Spark Overview
Apache Spark OverviewApache Spark Overview
Apache Spark Overview
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
 
Compression Options in Hadoop - A Tale of Tradeoffs
Compression Options in Hadoop - A Tale of TradeoffsCompression Options in Hadoop - A Tale of Tradeoffs
Compression Options in Hadoop - A Tale of Tradeoffs
 
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
Ceph: Open Source Storage Software Optimizations on Intel® Architecture for C...
 
Building an open data platform with apache iceberg
Building an open data platform with apache icebergBuilding an open data platform with apache iceberg
Building an open data platform with apache iceberg
 
SSL/TLS 1.3 Deep Dive
SSL/TLS 1.3 Deep Dive SSL/TLS 1.3 Deep Dive
SSL/TLS 1.3 Deep Dive
 
Simplifying Big Data Analytics with Apache Spark
Simplifying Big Data Analytics with Apache SparkSimplifying Big Data Analytics with Apache Spark
Simplifying Big Data Analytics with Apache Spark
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
 
Cloudera Hadoop Distribution
Cloudera Hadoop DistributionCloudera Hadoop Distribution
Cloudera Hadoop Distribution
 
Dataflow with Apache NiFi
Dataflow with Apache NiFiDataflow with Apache NiFi
Dataflow with Apache NiFi
 
High-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQLHigh-speed Database Throughput Using Apache Arrow Flight SQL
High-speed Database Throughput Using Apache Arrow Flight SQL
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)
 
Dynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theoremDynamo and BigTable in light of the CAP theorem
Dynamo and BigTable in light of the CAP theorem
 

Viewers also liked

Agile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_pptAgile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_ppt
Hitesh Kumar
 
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
Patrick Steele-Idem
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
Tony Ng
 

Viewers also liked (20)

App world london mobile
App world london mobileApp world london mobile
App world london mobile
 
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails MonolithRiding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
 
I-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETEI-Tier: Breaking Up the Monolith @ Philly ETE
I-Tier: Breaking Up the Monolith @ Philly ETE
 
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
 
Agile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_pptAgile_SDLC_Node.js@Paypal_ppt
Agile_SDLC_Node.js@Paypal_ppt
 
nodeconf-eu
nodeconf-eunodeconf-eu
nodeconf-eu
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
 
Kraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js AppKraken.js - Giving Extra Arms to your Node.js App
Kraken.js - Giving Extra Arms to your Node.js App
 
Kraken Front-Trends
Kraken Front-TrendsKraken Front-Trends
Kraken Front-Trends
 
Kraken js at paypal
Kraken js at paypalKraken js at paypal
Kraken js at paypal
 
Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]Varna conf nodejs-oss-microsoft-azure[final]
Varna conf nodejs-oss-microsoft-azure[final]
 
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
 
Node and Micro-Services at IBM
Node and Micro-Services at IBMNode and Micro-Services at IBM
Node and Micro-Services at IBM
 
Going Node.js at Netflix
Going Node.js at NetflixGoing Node.js at Netflix
Going Node.js at Netflix
 
Full stack-development with node js
Full stack-development with node jsFull stack-development with node js
Full stack-development with node js
 
I Love APIs 2015: Microservices at Amazon
I Love APIs 2015: Microservices at AmazonI Love APIs 2015: Microservices at Amazon
I Love APIs 2015: Microservices at Amazon
 
Getting started with test automation
Getting started with test automationGetting started with test automation
Getting started with test automation
 
AirBNB - Belonging in the City
AirBNB - Belonging in the CityAirBNB - Belonging in the City
AirBNB - Belonging in the City
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
 

Similar to Transitioning Groupon to Node.js - EmpireJS 2014

Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
Rikard Thulin
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 

Similar to Transitioning Groupon to Node.js - EmpireJS 2014 (20)

Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014Building front-end apps that Scale - FOSDEM 2014
Building front-end apps that Scale - FOSDEM 2014
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
Developing a mobile cross-platform library
Developing a mobile cross-platform libraryDeveloping a mobile cross-platform library
Developing a mobile cross-platform library
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
 
Desktop Intro
Desktop IntroDesktop Intro
Desktop Intro
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
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
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone GapCreating a Comprehensive Social Media App Using Ionic and Phone Gap
Creating a Comprehensive Social Media App Using Ionic and Phone Gap
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
Angular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and WorkshopAngular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and Workshop
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
Isomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the webIsomorphic JavaScript – future of the web
Isomorphic JavaScript – future of the web
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 
SGCE 2015 REST APIs
SGCE 2015 REST APIsSGCE 2015 REST APIs
SGCE 2015 REST APIs
 
Embrace the frontend revolution
Embrace the frontend revolutionEmbrace the frontend revolution
Embrace the frontend revolution
 

Recently uploaded

Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 

Transitioning Groupon to Node.js - EmpireJS 2014