SlideShare a Scribd company logo
1 of 63
Download to read offline
h u d
s o n
b a y
t e c h
~300
… the number of micro services running gilt.com.
But what about the Persian horde?
Gilt: luxury designer brands at discounted prices
we shoot the product in our studios
we receive, store, pick, pack and ship...
we sell every day at noon...
stampede...
this is what the stampede really looks like...
The Hype Cycle
2011: Boo: we have a
monolith! Maybe these
micro-services can help
us move faster!
2012: This is
AMAZING!
Gilt’s Microservice
Hype Cycle
2013 :Look at all
these services!
service growth over time: point of inflexion === scala.
2011: Boo: we have a
monolith! Maybe these
micro-services can help
us move faster!
2012: This is
AMAZING!
2013: Look at all
these services!
2014: Holy cr&p,
what have we done?
Look at ALL these
services
2015: Let’s get
a handle on§
this
Gilt’s Microservice
Hype Cycle
2016: Ah, the sweet
taste of awesome
sauce.
from rails to riches
rails to riches: 2007 - ruby-on-rails monolith
2011: java, loosely-typed, monolithic services
(5) Hidden
linkages; buried
business logic
(4) Monolithic
Java App; huge
bottleneck for
innovation.
(2) Lots of
duplicated code
:(
(3) Teams
focused on
business lines
(1) Large
loosely-typed
JSON/HTTP
services
enter: µ-services
“How can we arrange our teams around
strategic initiatives? How can we make it fast
and easy to get to change to production?”
2015: micro-services
driving forces behind gilt’s emergent architecture
● team autonomy
● voluntary adoption (tools, techniques, processes)
● kpi or goal-driven initiatives
● failing fast and openly
● open and honest, even when it’s difficult
anatomy of a gilt service
anatomy of a gilt service - typical choices
gilt-service-framework,
log4j, cloudwatchCave,
, , javascript
or
service discovery: straight forward
zookeeper
Brocade Traffic Manager
(aka Zeus, Stringray,
SteelApp,...)
cloudiness
from bare-metal...
PHX
IAD
… to vapour.
Lift-and-shift + elastic teams
Existing Data Centre
Dual 10Gb direct connect line, 2ms latency.
‘Legacy VPC’
MobileCommon
Person-
alisation
Admin Data
(1) Deploy to VPC
(2) ‘Department’ accounts for elasticity & devops
single tenant: one EC2 instance per service instance
reproducible, immutable deployments: docker
service discovery: same pattern, different LB
zookeeper
Amazon ELB
# running instances per service: ‘rule of three’
AWS instance sizing
Lessen dependencies
between teams: faster code-
to-prod
Lots of initiatives in parallel
Your favourite
<tech/language/framework>
here
We (heart) μ-services
Graceful degradation of
service
Disposable Code: easy to
innovate, easy to fail and
move on.
We (heart) cloud
Do devops in a
meaningful way.
Low barrier of entry for
new tech (dynamoDB,
Kinesis, ...)
Isolation
Cost visibility
Security tools (IAM)
Well documented
Resilience is easy
Hybrid is easy
Performance is great
Lessons from the Slope:
1. µservice architecture is emergent
2. manage ownership & risk
3. make your clients thin
4. avoid snowflakes
5. test in production where possible
emergent architecture
It’s hard to think of architecture in one dimension.
n = 265, where n is the number of services.
… we used a “spread sheet”.
‘The Gilt Genome Project’
It’s hard to think of architecture in one dimension.
We added ‘Functional Area’, ‘System’ and ‘Subsystem’ columns to Gilt Genome;
provides a strong (although subjective) taxonomy.
It turns out we have an elegant, emergent architecture.
Some services / components are deceptively simple.
Others are simply deceptive, and require knowledge of their surrounding
‘constellation’
n = 265, where n is the number of services.
Deceptively Simple - many services are small; < 2048 loc
Deceptively Simple - many services are small, < 32 files.
Gilt Admin (Legacy Ruby on Rails Application)
City
Discounts
Financial
Reporting
Fraud Mgmt
Gift Cards
Inventory
Mgmt
Order Mgmt
Sales Mgmt
Product
Catalog
Purchase
Orders
Targetting
Billing
Other Admin Applications (Scala + Play Framework)*
City Creative (2) CS
Discounts Distribution i18n Inventory (2)
Order
Processing
(2)
Util
Service Constellations (Scala, Java)*
Auth (1) Billing (1) City (6) Creative (4) CS (2) Discounts (1)
Distribution
(9)
i18n (3) inventory (6)
Order
Processing
(8)
Payments (3)
Product
Catalog (5)
Referrals (1) Util (2)
Core Database - ‘db3’
Job System (Java, Ruby)
Gilt Logical Architecture - Back Office Systems
* counts denote number of service / app components.
Simply deceptive:
service context only
make sense in
constellation.
Emergent Architecture:
Using the three-level taxonomy approach, we’ve been able to get a better
understanding of an emergent architecture, at a department level, and where the
complexity lies.
We’ve also concluded that the department is the right level of granularity for
consensus on technical decisions (language, framework, …)
Gilt’s Architecture Board set’s the overall standards that teams must follow when
interacting across departmental boundaries. HTTP. REST. DNS. AWS.
ownership
1. Software is owned by
departments, tracked in
‘genome project’. Directors
assign services to teams.
2. Teams are responsible for
building & running their
services; directors are
accountable for their overall
estate.
bottom-up ownership, RACI-style
Notes:
Zero Power, High Influence: The Architecture Board https://github.com/gilt/arch-board
Gilt Standards and Recommendations: https://github.com/gilt/standards
The perfect size for a team
5 ± 2
The perfect size for a ‘department’ (team of teams)
20 ± 4
30%
Amount of time a department should spend on operations / maintenance / red-hot.
We build the notion of SRE (Site Reliability Engineering) into the team.
‘ownership donut’ informs tech strategy
We classify ownership as:
active, passive, at-risk.
‘done’ === 0% ‘at risk’
Getting a handle on ownership...
Jul 2015 Sep 2015
Oct 2015 Feb 2015
Emergent Architecture + Ownership Oriented Org:
“You just pulled an inverse Conway manoeuvre”
Back-Office Personalisation Mobile
Web & Core
Services
Back-Office Personalisation Mobile
Web & Core
Services
Architectural
Area
Department
thin clients
Consumer
Dependencies
Consumer
Repo
Take as few code dependencies as possible. This stuff HURTS when n ~= 300.
Service Code
Common Code
Client Code
Service
Repo
Service
Dependencies
Client
JAR
Dependency hell as client JAR
dependencies conflicts with service
dependencies.
X
This is way easier. http://apidoc.me
<<apidoc>>
Service API
Service Code
Service
Repo Service
Dependencies
Consumer
Dependencies
Consumer
Repo
apidoc: define RESTful service
API agnostically and generate
dependency free, thin clients.
Client
Code
<< generate>>
Service
Stub
<< generate>>
stop building snowflakes
7 different code deployment pipelines...
Really?
6
Andrey’s Rule of Six:
“We could solve this now, or, just wait six months, and Amazon will provide a
solution”
Andrey Kartashov, Distinguished Engineer, Gilt.
Current thinking on deployment:
(1) Re-use as much AWS tooling as possible:
Code Pipeline, Code Deploy, Cloud
Formation.
(2) Very lightweight tool chain to support dark
canaries, canary releases, phased roll-out and
roll-back: NOVA
https://github.com/gilt/nova
testing in production
Testing and TiP
Maintaining stage environments in a micro-service architecture is HARD.
Prefer to test in production where possible: use dark canaries, canaries, staged
roll-out and roll-back.
Invest in monitoring and alerting over hard-to-maintain test pipelines.
Where teams need a stage environment, let them build a minimal environment,
and manage it themselves.
Estimate: about 85% of Gilt’s teams use TiP techniques; 15% need a stage
environment.
Lessons from the Slope:
1. µservice architecture is emergent
2. manage ownership & risk
3. make your clients thin
4. avoid snowflakes
5. test in production where possible
#thanks @adrian_trenaman @gilttech

More Related Content

More from Adrian Trenaman

Solr nyc meetup - May 14 2015 - Adrian Trenaman
Solr nyc meetup - May 14 2015 - Adrian TrenamanSolr nyc meetup - May 14 2015 - Adrian Trenaman
Solr nyc meetup - May 14 2015 - Adrian TrenamanAdrian Trenaman
 
Scaling micro services at gilt
Scaling micro services at giltScaling micro services at gilt
Scaling micro services at giltAdrian Trenaman
 
Lucene revolution 2013 adrian trenaman
Lucene revolution 2013   adrian trenamanLucene revolution 2013   adrian trenaman
Lucene revolution 2013 adrian trenamanAdrian Trenaman
 
Personalized Search on the Largest Flash Sale Site in America
Personalized Search on the Largest Flash Sale Site in AmericaPersonalized Search on the Largest Flash Sale Site in America
Personalized Search on the Largest Flash Sale Site in AmericaAdrian Trenaman
 
Implementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixImplementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixAdrian Trenaman
 
WebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFWebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFAdrian Trenaman
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010Adrian Trenaman
 
Oop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXFOop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXFAdrian Trenaman
 
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXF
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXFApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXF
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXFAdrian Trenaman
 
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterprise
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterpriseApache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterprise
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterpriseAdrian Trenaman
 
20100907 fuse-community-evening-adrian-trenaman-no-logo
20100907 fuse-community-evening-adrian-trenaman-no-logo20100907 fuse-community-evening-adrian-trenaman-no-logo
20100907 fuse-community-evening-adrian-trenaman-no-logoAdrian Trenaman
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAdrian Trenaman
 

More from Adrian Trenaman (12)

Solr nyc meetup - May 14 2015 - Adrian Trenaman
Solr nyc meetup - May 14 2015 - Adrian TrenamanSolr nyc meetup - May 14 2015 - Adrian Trenaman
Solr nyc meetup - May 14 2015 - Adrian Trenaman
 
Scaling micro services at gilt
Scaling micro services at giltScaling micro services at gilt
Scaling micro services at gilt
 
Lucene revolution 2013 adrian trenaman
Lucene revolution 2013   adrian trenamanLucene revolution 2013   adrian trenaman
Lucene revolution 2013 adrian trenaman
 
Personalized Search on the Largest Flash Sale Site in America
Personalized Search on the Largest Flash Sale Site in AmericaPersonalized Search on the Largest Flash Sale Site in America
Personalized Search on the Largest Flash Sale Site in America
 
Implementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMixImplementing WebServices with Camel and CXF in ServiceMix
Implementing WebServices with Camel and CXF in ServiceMix
 
WebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFWebServices in ServiceMix with CXF
WebServices in ServiceMix with CXF
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
 
Oop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXFOop2008 RESTful services with GWT and Apache CXF
Oop2008 RESTful services with GWT and Apache CXF
 
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXF
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXFApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXF
ApacheCon EU 2009 Tales from the front line - ActiveMQ ServiceMix and CXF
 
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterprise
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterpriseApache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterprise
Apache coneu 2009-adrian-trenaman-adopting-open-source-in-the-enterprise
 
20100907 fuse-community-evening-adrian-trenaman-no-logo
20100907 fuse-community-evening-adrian-trenaman-no-logo20100907 fuse-community-evening-adrian-trenaman-no-logo
20100907 fuse-community-evening-adrian-trenaman-no-logo
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESB
 

Recently uploaded

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 

Recently uploaded (20)

Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

GeeCon 2016: Scaling Microservices at Gilt

  • 1. h u d s o n b a y t e c h
  • 2.
  • 3. ~300 … the number of micro services running gilt.com. But what about the Persian horde?
  • 4. Gilt: luxury designer brands at discounted prices
  • 5. we shoot the product in our studios
  • 6. we receive, store, pick, pack and ship...
  • 7. we sell every day at noon...
  • 9. this is what the stampede really looks like...
  • 11. 2011: Boo: we have a monolith! Maybe these micro-services can help us move faster! 2012: This is AMAZING! Gilt’s Microservice Hype Cycle 2013 :Look at all these services!
  • 12. service growth over time: point of inflexion === scala.
  • 13. 2011: Boo: we have a monolith! Maybe these micro-services can help us move faster! 2012: This is AMAZING! 2013: Look at all these services! 2014: Holy cr&p, what have we done? Look at ALL these services 2015: Let’s get a handle on§ this Gilt’s Microservice Hype Cycle 2016: Ah, the sweet taste of awesome sauce.
  • 14. from rails to riches
  • 15. rails to riches: 2007 - ruby-on-rails monolith
  • 16. 2011: java, loosely-typed, monolithic services (5) Hidden linkages; buried business logic (4) Monolithic Java App; huge bottleneck for innovation. (2) Lots of duplicated code :( (3) Teams focused on business lines (1) Large loosely-typed JSON/HTTP services
  • 17. enter: µ-services “How can we arrange our teams around strategic initiatives? How can we make it fast and easy to get to change to production?”
  • 19. driving forces behind gilt’s emergent architecture ● team autonomy ● voluntary adoption (tools, techniques, processes) ● kpi or goal-driven initiatives ● failing fast and openly ● open and honest, even when it’s difficult
  • 20. anatomy of a gilt service
  • 21. anatomy of a gilt service - typical choices gilt-service-framework, log4j, cloudwatchCave, , , javascript or
  • 22. service discovery: straight forward zookeeper Brocade Traffic Manager (aka Zeus, Stringray, SteelApp,...)
  • 26. Lift-and-shift + elastic teams Existing Data Centre Dual 10Gb direct connect line, 2ms latency. ‘Legacy VPC’ MobileCommon Person- alisation Admin Data (1) Deploy to VPC (2) ‘Department’ accounts for elasticity & devops
  • 27. single tenant: one EC2 instance per service instance
  • 29. service discovery: same pattern, different LB zookeeper Amazon ELB
  • 30. # running instances per service: ‘rule of three’
  • 32. Lessen dependencies between teams: faster code- to-prod Lots of initiatives in parallel Your favourite <tech/language/framework> here We (heart) μ-services Graceful degradation of service Disposable Code: easy to innovate, easy to fail and move on.
  • 33. We (heart) cloud Do devops in a meaningful way. Low barrier of entry for new tech (dynamoDB, Kinesis, ...) Isolation Cost visibility Security tools (IAM) Well documented Resilience is easy Hybrid is easy Performance is great
  • 34. Lessons from the Slope: 1. µservice architecture is emergent 2. manage ownership & risk 3. make your clients thin 4. avoid snowflakes 5. test in production where possible
  • 36.
  • 37. It’s hard to think of architecture in one dimension. n = 265, where n is the number of services.
  • 38. … we used a “spread sheet”. ‘The Gilt Genome Project’
  • 39. It’s hard to think of architecture in one dimension. We added ‘Functional Area’, ‘System’ and ‘Subsystem’ columns to Gilt Genome; provides a strong (although subjective) taxonomy. It turns out we have an elegant, emergent architecture. Some services / components are deceptively simple. Others are simply deceptive, and require knowledge of their surrounding ‘constellation’ n = 265, where n is the number of services.
  • 40. Deceptively Simple - many services are small; < 2048 loc
  • 41. Deceptively Simple - many services are small, < 32 files.
  • 42. Gilt Admin (Legacy Ruby on Rails Application) City Discounts Financial Reporting Fraud Mgmt Gift Cards Inventory Mgmt Order Mgmt Sales Mgmt Product Catalog Purchase Orders Targetting Billing Other Admin Applications (Scala + Play Framework)* City Creative (2) CS Discounts Distribution i18n Inventory (2) Order Processing (2) Util Service Constellations (Scala, Java)* Auth (1) Billing (1) City (6) Creative (4) CS (2) Discounts (1) Distribution (9) i18n (3) inventory (6) Order Processing (8) Payments (3) Product Catalog (5) Referrals (1) Util (2) Core Database - ‘db3’ Job System (Java, Ruby) Gilt Logical Architecture - Back Office Systems * counts denote number of service / app components. Simply deceptive: service context only make sense in constellation.
  • 43. Emergent Architecture: Using the three-level taxonomy approach, we’ve been able to get a better understanding of an emergent architecture, at a department level, and where the complexity lies. We’ve also concluded that the department is the right level of granularity for consensus on technical decisions (language, framework, …) Gilt’s Architecture Board set’s the overall standards that teams must follow when interacting across departmental boundaries. HTTP. REST. DNS. AWS.
  • 45. 1. Software is owned by departments, tracked in ‘genome project’. Directors assign services to teams. 2. Teams are responsible for building & running their services; directors are accountable for their overall estate. bottom-up ownership, RACI-style
  • 46. Notes: Zero Power, High Influence: The Architecture Board https://github.com/gilt/arch-board Gilt Standards and Recommendations: https://github.com/gilt/standards
  • 47. The perfect size for a team 5 ± 2
  • 48. The perfect size for a ‘department’ (team of teams) 20 ± 4
  • 49. 30% Amount of time a department should spend on operations / maintenance / red-hot. We build the notion of SRE (Site Reliability Engineering) into the team.
  • 50. ‘ownership donut’ informs tech strategy We classify ownership as: active, passive, at-risk. ‘done’ === 0% ‘at risk’
  • 51. Getting a handle on ownership... Jul 2015 Sep 2015 Oct 2015 Feb 2015
  • 52. Emergent Architecture + Ownership Oriented Org: “You just pulled an inverse Conway manoeuvre” Back-Office Personalisation Mobile Web & Core Services Back-Office Personalisation Mobile Web & Core Services Architectural Area Department
  • 54. Consumer Dependencies Consumer Repo Take as few code dependencies as possible. This stuff HURTS when n ~= 300. Service Code Common Code Client Code Service Repo Service Dependencies Client JAR Dependency hell as client JAR dependencies conflicts with service dependencies. X
  • 55. This is way easier. http://apidoc.me <<apidoc>> Service API Service Code Service Repo Service Dependencies Consumer Dependencies Consumer Repo apidoc: define RESTful service API agnostically and generate dependency free, thin clients. Client Code << generate>> Service Stub << generate>>
  • 57. 7 different code deployment pipelines... Really?
  • 58. 6 Andrey’s Rule of Six: “We could solve this now, or, just wait six months, and Amazon will provide a solution” Andrey Kartashov, Distinguished Engineer, Gilt.
  • 59. Current thinking on deployment: (1) Re-use as much AWS tooling as possible: Code Pipeline, Code Deploy, Cloud Formation. (2) Very lightweight tool chain to support dark canaries, canary releases, phased roll-out and roll-back: NOVA https://github.com/gilt/nova
  • 61. Testing and TiP Maintaining stage environments in a micro-service architecture is HARD. Prefer to test in production where possible: use dark canaries, canaries, staged roll-out and roll-back. Invest in monitoring and alerting over hard-to-maintain test pipelines. Where teams need a stage environment, let them build a minimal environment, and manage it themselves. Estimate: about 85% of Gilt’s teams use TiP techniques; 15% need a stage environment.
  • 62. Lessons from the Slope: 1. µservice architecture is emergent 2. manage ownership & risk 3. make your clients thin 4. avoid snowflakes 5. test in production where possible