SlideShare a Scribd company logo
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
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
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
Transitioning Groupon to Node.js - EmpireJS 2014
Subscribe Page
• Simple application
• Partial implementation
• Proved out the concept
Transitioning Groupon to Node.js - EmpireJS 2014
Growing Pains
• Max sockets
• Breaking our infrastructure
Transitioning Groupon to Node.js - EmpireJS 2014
New problems
• User authentication
• More service calls
• Complicated routing
• More traffic
• Share look and feel
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
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!)
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
gconfig
• Configuration as a service
• Some config can change on the fly
• Config can be promoted from uat -> staging ->
prod
Transitioning Groupon to Node.js - EmpireJS 2014
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
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
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
Transitioning Groupon to Node.js - EmpireJS 2014
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

Viewers also liked (20)

PPT
App world london mobile
Sean McCullough
 
PPTX
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Sean McCullough
 
PDF
I-Tier: Breaking Up the Monolith @ Philly ETE
Sean McCullough
 
PDF
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
Liwei Chou
 
PPTX
Agile_SDLC_Node.js@Paypal_ppt
Hitesh Kumar
 
PDF
nodeconf-eu
Clovis Chapman
 
PDF
Communication in Node.js
Edureka!
 
PPTX
Kraken.js - Giving Extra Arms to your Node.js App
Jeff Prestes
 
PDF
Kraken Front-Trends
PayPal
 
PPTX
Kraken js at paypal
Lenny Markus
 
PDF
Varna conf nodejs-oss-microsoft-azure[final]
Mihail Mateev
 
PPTX
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
Patrick Steele-Idem
 
PDF
Node and Micro-Services at IBM
Dejan Glozic
 
PDF
Going Node.js at Netflix
micahr
 
PPTX
Full stack-development with node js
Xuefeng Zhang
 
PDF
I Love APIs 2015: Microservices at Amazon
Apigee | Google Cloud
 
PPTX
Getting started with test automation
Ivan Wei
 
PDF
AirBNB - Belonging in the City
miramarcus
 
KEY
Node.js - Best practices
Felix Geisendörfer
 
PDF
eBay Architecture
Tony Ng
 
App world london mobile
Sean McCullough
 
Riding The N Train: How we dismantled Groupon's Ruby on Rails Monolith
Sean McCullough
 
I-Tier: Breaking Up the Monolith @ Philly ETE
Sean McCullough
 
最近 node.js 來勢洶洶, 怎麼辦? 別怕, 我們也有秘密武器 RingoJS!
Liwei Chou
 
Agile_SDLC_Node.js@Paypal_ppt
Hitesh Kumar
 
nodeconf-eu
Clovis Chapman
 
Communication in Node.js
Edureka!
 
Kraken.js - Giving Extra Arms to your Node.js App
Jeff Prestes
 
Kraken Front-Trends
PayPal
 
Kraken js at paypal
Lenny Markus
 
Varna conf nodejs-oss-microsoft-azure[final]
Mihail Mateev
 
20 Tips for Building a Scalable and Robust Node.js Stack that Developers Love
Patrick Steele-Idem
 
Node and Micro-Services at IBM
Dejan Glozic
 
Going Node.js at Netflix
micahr
 
Full stack-development with node js
Xuefeng Zhang
 
I Love APIs 2015: Microservices at Amazon
Apigee | Google Cloud
 
Getting started with test automation
Ivan Wei
 
AirBNB - Belonging in the City
miramarcus
 
Node.js - Best practices
Felix Geisendörfer
 
eBay Architecture
Tony Ng
 

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

KEY
20120802 timisoara
Richard Rodger
 
KEY
20120306 dublin js
Richard Rodger
 
PPTX
Building assets on the fly with Node.js
Acquisio
 
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
PPTX
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
PDF
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
PDF
Tech Thursdays: Building Products
Hayden Bleasel
 
PDF
GoPro, Inc. Case study: Dive into the details of our web applications
Andrew Maxwell
 
PDF
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
mechagoins28
 
PDF
Client Server Web Apps with JavaScript and Java Rich Scalable and RESTful 1st...
zubinrlondoit
 
PPTX
Writing a massive javascript app
Justin Park
 
PPTX
Mobile gotcha
phegaro
 
PDF
Next Generation Web Development Techniques with Cloud Foundry
Malachi Smith
 
PDF
Building Cloud-Based Cross-Platform Mobile Web Apps
James Pearce
 
PDF
Client Server Web Apps with JavaScript and Java 1st Edition Casimir Saternos
tomeooakesrq
 
PDF
[2015/2016] Apache Cordova
Ivano Malavolta
 
PDF
Building cross platform mobile web apps
James Pearce
 
PDF
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
PDF
Modern webtechnologies
Besjan Xhika
 
PPTX
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
POSSCON
 
20120802 timisoara
Richard Rodger
 
20120306 dublin js
Richard Rodger
 
Building assets on the fly with Node.js
Acquisio
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
Tech Thursdays: Building Products
Hayden Bleasel
 
GoPro, Inc. Case study: Dive into the details of our web applications
Andrew Maxwell
 
JavaScript Application Design A Build First Approach 1st Edition Nicolas Beva...
mechagoins28
 
Client Server Web Apps with JavaScript and Java Rich Scalable and RESTful 1st...
zubinrlondoit
 
Writing a massive javascript app
Justin Park
 
Mobile gotcha
phegaro
 
Next Generation Web Development Techniques with Cloud Foundry
Malachi Smith
 
Building Cloud-Based Cross-Platform Mobile Web Apps
James Pearce
 
Client Server Web Apps with JavaScript and Java 1st Edition Casimir Saternos
tomeooakesrq
 
[2015/2016] Apache Cordova
Ivano Malavolta
 
Building cross platform mobile web apps
James Pearce
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
Modern webtechnologies
Besjan Xhika
 
I Know It Was MEAN, But I Cut the Cord to LAMP Anyway
POSSCON
 
Ad

Recently uploaded (20)

PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PPTX
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Thermal runway and thermal stability.pptx
godow93766
 
Design Thinking basics for Engineers.pdf
CMR University
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
Ad

Transitioning Groupon to Node.js - EmpireJS 2014