I-Tier: Dismantling the Monolith
Brian McCallister
- brianm@groupon.com
@brianm
I-Tier: Dismantling the Monolith Brian McCallister - - PowerPoint PPT Presentation
I-Tier: Dismantling the Monolith Brian McCallister brianm@groupon.com @brianm 2012 North America CDN nginx Backend Rails DB Service Backend DB MySQL Service Cluster CDN nginx Rails Backend DB Service Backend DB
I-Tier: Dismantling the Monolith
Brian McCallister
@brianm
CDN nginx Rails MySQL Cluster Backend Service Backend Service DB DB
2012 North America
CDN nginx MySQL Cluster Backend Service Backend Service DB DB
Mobile Transaction Mix (% of transactions) Monthly, January 2011 to September 2013
Rails MySQL Cluster Backend Service Backend Service DB DB API Web Mobile
Could not build features fast enough
Subscribe Flow routing Rails MySQL Cluster Backend Service Backend Service DB DB API Web Config
make 1 12 18 25 Bourne Shell 1 1 2 5 Javascript 3 3 3 3 SASS 1 0 0 2
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?
currentDivision: attributes.query?.division_p }
view.set { divisions: divisionsPresenter }
Within two hours we had a major site outage
Subscribe Page grout Rails MySQL Cluster Backend Service Backend Service DB DB API Web Browse Page Config
Subscribe Page grout Rails MySQL Cluster Backend Service Backend Service DB DB API Web Browse Page Config
Subscribe Page grout Rails MySQL Cluster Backend Service Backend Service DB DB API Web Browse Page Config
(cc) Newfrontiers http://flic.kr/p/9u346u
Subscribe Page grout Rails MySQL Cluster Backend Service Backend Service DB DB API Web Browse Page Deal Page Layout Config
Subscribe Page grout Rails MySQL Cluster Backend Service Backend Service DB DB API Web Browse Page Deal Page Layout Config
GET /layout/v3.8/gig_application_layout HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: uat.groupon.com User-Agent: HTTPie/0.7.2
Cache-Control: public, max-age=1800 Content-Encoding: gzip Content-Type: application/json; charset=utf-8 Date: Sun, 02 Mar 2014 18:31:01 GMT Transfer-Encoding: chunked
"templateName": “remote_gig_application_layout_main@v3_8”, "html": "<!DOCTYPE html>\n<!-- : gig_application_layout@v3.8.3 -- >\n<!--[if lt IE 7]> <html class=\"lt-ie10 lt-ie9 lt-ie8 lt- ie7\"{{#htmlAttr}} {{{htmlAttr}}}{{/htmlAttr}}> <![endif]-->\n<!--[if IE 7]> <html class=\"lt-ie10 lt-ie9 lt-ie8\"{{#htmlAttr}} {{{htmlAttr}}}{{/htmlAttr}}> <![endif]-->\n<!--[if IE 8]> <html class=\"lt-ie10 lt-ie9\"{{#htmlAttr}} {{{htmlAttr}}}{{/htmlAttr}}> <! [endif]-->\n<!--[if IE 9]> <html class=\"lt-ie10\"{{#htmlAttr}} {{{htmlAttr}}}{{/htmlAttr}}> <![endif]-->\n<!--[if gt IE 9]><!--> <html class=\"\"{{#htmlAttr}} {{{htmlAttr}}}{{/htmlAttr}}> "data": { … } }
Finish It!
~2 months ~150 Developers
Forward Looking Statements
A Tale of Two Monoliths
Rails MySQL Cluster Backend Service Backend Service DB DB API Web Mobile
Europe North America
Thank You!
Brian McCallister
@brianm