SlideShare a Scribd company logo
MicroService Architecture 
@Ctrip 
William Yang(杨波) 
Dev Manager & Architect 
@Ctrip.com
Problem Domain 
• System decoupling for deployability and 
scalability 
• Evolutionary architecture and adaptive 
organization 
• Mobile Backend Architecture
Agenda 
• The curse of the monolith 
• Case study – decomposing Ctrip mobile 
backend into microservice 
• Microservice best practice 
• What we have learned
Initial Ctrip Mobile Backend 
Architecture 
Monolithic Mobile Service 
SBU A SBU B SBU C SBU D 
SOA/ESB
Pros & Cons 
• At the beginning … 
simple to develop, test, deploy and scale 
• Later … 
huge, complex, monolithic mobile service
The Curse of the Monolith 
• Bloated codebase 
• Communication and coordination cost 
• Obstacle for frequent deployments 
• Little resilience to failure 
• Commitment to a single technology stack 
• Hindering innovation
MicroService Architecture Style 
• Decomposing a single app as a suite of services 
• Communicating with lightweight mechanism 
• Built around business capabilities 
• Independently deployable 
• Minimum of centralized management 
• May be written in different programming 
languages and use different storages 
http://martinfowler.com/articles/microservices.html
Who has Migrated to MicroService 
http://microservices.io/patterns/microservices.html
New Mobile Backend Arch @Ctrip
Key MicroService Infrastructure 
• Service 
– Service framework, gateway, registry 
• Monitoring 
– Logging, tracing, metrics 
• Deployment 
– TEST/UAT/PROD environments 
– CI/CD 
• Push common concerns to technical 
infrastructure
MicroService Framework @Ctrip
Service Metrics Monitoring
MicroService Availability 
• Assume a monolithic service with 99.99% 
availability, what if you have ~30 microservices 
each with 99.99% availability?? 
• Combined effective availability 
== 2 HOURS of downtime per month 
== 99.7% uptime!!
Service Dependency
Single Dependency Delay
Cascading Failure at Peak Hour
Basics of Service Fault Tolerance 
• Circuit Breaker(Fuse Blow) 
• Isolation 
• Rate Limiting 
• Fallback
Hystrix Circuit Breaker 
http://github.com/netflix/hystrix
Ctrip Gateway Hystrix Dashboard
MicroService Gateway
Gateway Filtering Mechanism 
“pre” filters “routing” filter(s) “post” filters 
Origin Server 
“error” filters 
HTTP Request 
Http Request Http Response 
https://github.com/Netflix/zuul
Filter Management
Advanced Usage of Gateway 
• Surgical debugging 
• Stress testing 
• Canary testing 
• Service migration 
• Load shedding 
• Active/Active traffic management
Migration to MicroService 
Achievement @Ctrip 
• System decoupled and domain ownership 
clarified 
• Business innovation speed accelerated 
• Overall system reliability improved 
• Decentralized architecture w/o SPOF 
• Develop, test, deploy and scale independently 
• Evolutionary architecture
What We Have Learned One 
• Smooth Migration 
– Give buffer to user for migration
What We Have Learned Two 
• Follow Architecture & Design Best Practice 
– Single responsibility & separation of concerns 
– Dependency inversion 
– Dependency isolation 
– Rate limiting & circuit breaker 
– Dynamic deployable & re-configurable 
• Top-Level Design 
– Fit service into infra, not fit infra into service
What We Have Learned Three 
• Conway’s Law 
– “Any organization that design a system(defined 
broadly) will produce a design whose structure is a 
copy of the organization’s communication 
structure” – Melvin Conway, 1968 
– “Those system then constrain the options for 
organizational change” – Dan North
Caveat 
• MicroService is not a Free Lunch 
– Significant operations overhead 
– Substantial DevOps skills required 
– Implicit interface 
– Duplication of effort 
– Distributed system complexity 
– Testability challenges 
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
Future – Soft Load Balancing
Future – Cross Data Centers
About Me 
• William Yang(杨波) 
• Dev Manager & Architect @Ctrip Middleware 
Team @Shanghai 
We are 
hiring!
谢谢

More Related Content

What's hot

About Microservices, Containers and their Underestimated Impact on Network Pe...
About Microservices, Containers and their Underestimated Impact on Network Pe...About Microservices, Containers and their Underestimated Impact on Network Pe...
About Microservices, Containers and their Underestimated Impact on Network Pe...
Nane Kratzke
 
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
VMware
 
Building a cloud service on a cloud infrastructure. Also, cloud.
Building a cloud service on a cloud infrastructure. Also, cloud.Building a cloud service on a cloud infrastructure. Also, cloud.
Building a cloud service on a cloud infrastructure. Also, cloud.Mikhail Panchenko
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
Ambassador Labs
 
The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native Applications
Jonas Bonér
 
Why resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudesWhy resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudes
Uwe Friedrichsen
 
Running and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got EasierRunning and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got Easier
VMware
 
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
Scott Lowe
 
An Introduction to Chaos Engineering
An Introduction to Chaos EngineeringAn Introduction to Chaos Engineering
An Introduction to Chaos Engineering
Gremlin
 
Designing Events-first Microservices
Designing Events-first MicroservicesDesigning Events-first Microservices
Designing Events-first Microservices
Jonas Bonér
 
The Future of Services: Building Asynchronous, Resilient and Elastic Systems
The Future of Services: Building Asynchronous, Resilient and Elastic SystemsThe Future of Services: Building Asynchronous, Resilient and Elastic Systems
The Future of Services: Building Asynchronous, Resilient and Elastic Systems
Lightbend
 
Containers and Why They Matter
Containers and Why They MatterContainers and Why They Matter
Containers and Why They Matter
Ray Lukas
 
20150311 NSX update 301
20150311 NSX update 30120150311 NSX update 301
20150311 NSX update 301
Kevin Groat
 
Infographic: Supercharge your Networking Career
Infographic: Supercharge your Networking CareerInfographic: Supercharge your Networking Career
Infographic: Supercharge your Networking Career
VMware
 
Chaos Engineering – why we should all practice breaking things on purpose by ...
Chaos Engineering – why we should all practice breaking things on purpose by ...Chaos Engineering – why we should all practice breaking things on purpose by ...
Chaos Engineering – why we should all practice breaking things on purpose by ...
Alex Cachia
 
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPackCONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
DevOpsDays Tel Aviv
 
Beyond Network Virtualization
Beyond Network VirtualizationBeyond Network Virtualization
Beyond Network Virtualization
Open Networking Summits
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
Giuseppe Lavagetto
 
VMworld 2016 Recap
VMworld 2016 RecapVMworld 2016 Recap
VMworld 2016 Recap
Kevin Groat
 
Chaos engineering intro
Chaos engineering introChaos engineering intro
Chaos engineering intro
Shantanu Deshpande
 

What's hot (20)

About Microservices, Containers and their Underestimated Impact on Network Pe...
About Microservices, Containers and their Underestimated Impact on Network Pe...About Microservices, Containers and their Underestimated Impact on Network Pe...
About Microservices, Containers and their Underestimated Impact on Network Pe...
 
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
VMWare on VMWare - How VMware IT Implemented Micro-Segmentation and Deployed ...
 
Building a cloud service on a cloud infrastructure. Also, cloud.
Building a cloud service on a cloud infrastructure. Also, cloud.Building a cloud service on a cloud infrastructure. Also, cloud.
Building a cloud service on a cloud infrastructure. Also, cloud.
 
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red HatThe Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
The Hardest Part of Microservices: Your Data - Christian Posta, Red Hat
 
The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native Applications
 
Why resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudesWhy resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudes
 
Running and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got EasierRunning and Managing Your Network Just Got Easier
Running and Managing Your Network Just Got Easier
 
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
The Vision for the Future of Network Virtualization with VMware NSX (Q2 2016)
 
An Introduction to Chaos Engineering
An Introduction to Chaos EngineeringAn Introduction to Chaos Engineering
An Introduction to Chaos Engineering
 
Designing Events-first Microservices
Designing Events-first MicroservicesDesigning Events-first Microservices
Designing Events-first Microservices
 
The Future of Services: Building Asynchronous, Resilient and Elastic Systems
The Future of Services: Building Asynchronous, Resilient and Elastic SystemsThe Future of Services: Building Asynchronous, Resilient and Elastic Systems
The Future of Services: Building Asynchronous, Resilient and Elastic Systems
 
Containers and Why They Matter
Containers and Why They MatterContainers and Why They Matter
Containers and Why They Matter
 
20150311 NSX update 301
20150311 NSX update 30120150311 NSX update 301
20150311 NSX update 301
 
Infographic: Supercharge your Networking Career
Infographic: Supercharge your Networking CareerInfographic: Supercharge your Networking Career
Infographic: Supercharge your Networking Career
 
Chaos Engineering – why we should all practice breaking things on purpose by ...
Chaos Engineering – why we should all practice breaking things on purpose by ...Chaos Engineering – why we should all practice breaking things on purpose by ...
Chaos Engineering – why we should all practice breaking things on purpose by ...
 
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPackCONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
CONFIGURATION MANAGEMENT IN THE CLOUD NATIVE ERA, SHAHAR MINTZ, EggPack
 
Beyond Network Virtualization
Beyond Network VirtualizationBeyond Network Virtualization
Beyond Network Virtualization
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
VMworld 2016 Recap
VMworld 2016 RecapVMworld 2016 Recap
VMworld 2016 Recap
 
Chaos engineering intro
Chaos engineering introChaos engineering intro
Chaos engineering intro
 

Viewers also liked

A Big, Fast and Persistent Queue
A Big, Fast and Persistent QueueA Big, Fast and Persistent Queue
A Big, Fast and Persistent Queue
William Yang
 
一个前端的自我修养 Winter
一个前端的自我修养 Winter一个前端的自我修养 Winter
一个前端的自我修养 Winter
正炎 高
 
当当网Docker应用实践
当当网Docker应用实践当当网Docker应用实践
当当网Docker应用实践
正炎 高
 
3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)
Ufo Qiao
 
Evolving Goals: IT vs. Product Mindset
Evolving Goals: IT vs. Product MindsetEvolving Goals: IT vs. Product Mindset
Evolving Goals: IT vs. Product Mindset
Felipe Castro
 
How microservices are redefining modern application architecture
How microservices are redefining modern application architectureHow microservices are redefining modern application architecture
How microservices are redefining modern application architecture
Donnie Berkholz
 
What is OKR?
What is OKR?What is OKR?
What is OKR?
Felipe Castro
 
Resilience with Hystrix
Resilience with HystrixResilience with Hystrix
Resilience with Hystrix
Uwe Friedrichsen
 
Performance Management Tips
Performance Management Tips Performance Management Tips
Performance Management Tips
JAMSO
 
(OKR) Goal setting : Objectives Key Results
(OKR) Goal setting : Objectives Key Results(OKR) Goal setting : Objectives Key Results
(OKR) Goal setting : Objectives Key Results
JAMSO
 
淘宝前端架构(玉伯)[懒懒交流会#38]
淘宝前端架构(玉伯)[懒懒交流会#38]淘宝前端架构(玉伯)[懒懒交流会#38]
淘宝前端架构(玉伯)[懒懒交流会#38]taobao.com
 
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
Felipe Castro
 
Building an Agile Culture with OKR
Building an Agile Culture with OKRBuilding an Agile Culture with OKR
Building an Agile Culture with OKR
Felipe Castro
 
The Guide to Objectives and Key Results (OKRs)
The Guide to Objectives and Key Results (OKRs)The Guide to Objectives and Key Results (OKRs)
The Guide to Objectives and Key Results (OKRs)
BetterWorks
 
Guide to OKR (Objectives & Key Results)
Guide to OKR (Objectives & Key Results)Guide to OKR (Objectives & Key Results)
Guide to OKR (Objectives & Key Results)
Mustansir Husain
 
Power Your Business with OKRs
Power Your Business with OKRsPower Your Business with OKRs
Power Your Business with OKRs
Wrike
 

Viewers also liked (16)

A Big, Fast and Persistent Queue
A Big, Fast and Persistent QueueA Big, Fast and Persistent Queue
A Big, Fast and Persistent Queue
 
一个前端的自我修养 Winter
一个前端的自我修养 Winter一个前端的自我修养 Winter
一个前端的自我修养 Winter
 
当当网Docker应用实践
当当网Docker应用实践当当网Docker应用实践
当当网Docker应用实践
 
3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)3 a forum 2016 陆金所前端进化论 微服务之路(public)
3 a forum 2016 陆金所前端进化论 微服务之路(public)
 
Evolving Goals: IT vs. Product Mindset
Evolving Goals: IT vs. Product MindsetEvolving Goals: IT vs. Product Mindset
Evolving Goals: IT vs. Product Mindset
 
How microservices are redefining modern application architecture
How microservices are redefining modern application architectureHow microservices are redefining modern application architecture
How microservices are redefining modern application architecture
 
What is OKR?
What is OKR?What is OKR?
What is OKR?
 
Resilience with Hystrix
Resilience with HystrixResilience with Hystrix
Resilience with Hystrix
 
Performance Management Tips
Performance Management Tips Performance Management Tips
Performance Management Tips
 
(OKR) Goal setting : Objectives Key Results
(OKR) Goal setting : Objectives Key Results(OKR) Goal setting : Objectives Key Results
(OKR) Goal setting : Objectives Key Results
 
淘宝前端架构(玉伯)[懒懒交流会#38]
淘宝前端架构(玉伯)[懒懒交流会#38]淘宝前端架构(玉伯)[懒懒交流会#38]
淘宝前端架构(玉伯)[懒懒交流会#38]
 
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
Agile2016: Stop Using Agile with Waterfall Goals: Goal Agility with OKR
 
Building an Agile Culture with OKR
Building an Agile Culture with OKRBuilding an Agile Culture with OKR
Building an Agile Culture with OKR
 
The Guide to Objectives and Key Results (OKRs)
The Guide to Objectives and Key Results (OKRs)The Guide to Objectives and Key Results (OKRs)
The Guide to Objectives and Key Results (OKRs)
 
Guide to OKR (Objectives & Key Results)
Guide to OKR (Objectives & Key Results)Guide to OKR (Objectives & Key Results)
Guide to OKR (Objectives & Key Results)
 
Power Your Business with OKRs
Power Your Business with OKRsPower Your Business with OKRs
Power Your Business with OKRs
 

Similar to MicroServices architecture @ Ctrip v1.1

Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
Randy Shoup
 
building microservices
building microservicesbuilding microservices
building microservices
Cisco DevNet
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
ramesh_sharma
 
Micro service session 1
Micro service   session 1Micro service   session 1
Micro service session 1
Amin Arab
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
AFAS Software
 
From SOA to MSA
From SOA to MSAFrom SOA to MSA
From SOA to MSA
William Yang
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
Sergey Seletsky
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
Vinod Wilson
 
Microservices & Container Networking - OSN Days, Singapore
Microservices & Container Networking - OSN Days, SingaporeMicroservices & Container Networking - OSN Days, Singapore
Microservices & Container Networking - OSN Days, Singapore
Iyappa "Ayyaps" Swaminathan
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
Paria Heidari
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
Cisco DevNet
 
Closer Look at Cloud Centric Architectures
Closer Look at Cloud Centric ArchitecturesCloser Look at Cloud Centric Architectures
Closer Look at Cloud Centric Architectures
Todd Kaplinger
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
DEVNET-1142 Decomposing Monolithic Applications to Microservices
DEVNET-1142	Decomposing Monolithic Applications to MicroservicesDEVNET-1142	Decomposing Monolithic Applications to Microservices
DEVNET-1142 Decomposing Monolithic Applications to Microservices
Cisco DevNet
 
AWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWSAWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWS
Amazon Web Services
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
Amazon Web Services Korea
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
PINGXIONG3
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
Sonic leigh
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
MahmoudZidan41
 
Building data-driven microservices
Building data-driven microservicesBuilding data-driven microservices
Building data-driven microservices
Streamlio
 

Similar to MicroServices architecture @ Ctrip v1.1 (20)

Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
building microservices
building microservicesbuilding microservices
building microservices
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Micro service session 1
Micro service   session 1Micro service   session 1
Micro service session 1
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
 
From SOA to MSA
From SOA to MSAFrom SOA to MSA
From SOA to MSA
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
Microservices & Container Networking - OSN Days, Singapore
Microservices & Container Networking - OSN Days, SingaporeMicroservices & Container Networking - OSN Days, Singapore
Microservices & Container Networking - OSN Days, Singapore
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
Closer Look at Cloud Centric Architectures
Closer Look at Cloud Centric ArchitecturesCloser Look at Cloud Centric Architectures
Closer Look at Cloud Centric Architectures
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
DEVNET-1142 Decomposing Monolithic Applications to Microservices
DEVNET-1142	Decomposing Monolithic Applications to MicroservicesDEVNET-1142	Decomposing Monolithic Applications to Microservices
DEVNET-1142 Decomposing Monolithic Applications to Microservices
 
AWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWSAWS Summit Auckland - Smaller is Better - Microservices on AWS
AWS Summit Auckland - Smaller is Better - Microservices on AWS
 
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig Dickson
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Building data-driven microservices
Building data-driven microservicesBuilding data-driven microservices
Building data-driven microservices
 

Recently uploaded

JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 

Recently uploaded (20)

JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 

MicroServices architecture @ Ctrip v1.1

  • 1. MicroService Architecture @Ctrip William Yang(杨波) Dev Manager & Architect @Ctrip.com
  • 2. Problem Domain • System decoupling for deployability and scalability • Evolutionary architecture and adaptive organization • Mobile Backend Architecture
  • 3. Agenda • The curse of the monolith • Case study – decomposing Ctrip mobile backend into microservice • Microservice best practice • What we have learned
  • 4. Initial Ctrip Mobile Backend Architecture Monolithic Mobile Service SBU A SBU B SBU C SBU D SOA/ESB
  • 5. Pros & Cons • At the beginning … simple to develop, test, deploy and scale • Later … huge, complex, monolithic mobile service
  • 6. The Curse of the Monolith • Bloated codebase • Communication and coordination cost • Obstacle for frequent deployments • Little resilience to failure • Commitment to a single technology stack • Hindering innovation
  • 7. MicroService Architecture Style • Decomposing a single app as a suite of services • Communicating with lightweight mechanism • Built around business capabilities • Independently deployable • Minimum of centralized management • May be written in different programming languages and use different storages http://martinfowler.com/articles/microservices.html
  • 8. Who has Migrated to MicroService http://microservices.io/patterns/microservices.html
  • 9. New Mobile Backend Arch @Ctrip
  • 10. Key MicroService Infrastructure • Service – Service framework, gateway, registry • Monitoring – Logging, tracing, metrics • Deployment – TEST/UAT/PROD environments – CI/CD • Push common concerns to technical infrastructure
  • 13. MicroService Availability • Assume a monolithic service with 99.99% availability, what if you have ~30 microservices each with 99.99% availability?? • Combined effective availability == 2 HOURS of downtime per month == 99.7% uptime!!
  • 16. Cascading Failure at Peak Hour
  • 17. Basics of Service Fault Tolerance • Circuit Breaker(Fuse Blow) • Isolation • Rate Limiting • Fallback
  • 18. Hystrix Circuit Breaker http://github.com/netflix/hystrix
  • 21. Gateway Filtering Mechanism “pre” filters “routing” filter(s) “post” filters Origin Server “error” filters HTTP Request Http Request Http Response https://github.com/Netflix/zuul
  • 23. Advanced Usage of Gateway • Surgical debugging • Stress testing • Canary testing • Service migration • Load shedding • Active/Active traffic management
  • 24. Migration to MicroService Achievement @Ctrip • System decoupled and domain ownership clarified • Business innovation speed accelerated • Overall system reliability improved • Decentralized architecture w/o SPOF • Develop, test, deploy and scale independently • Evolutionary architecture
  • 25. What We Have Learned One • Smooth Migration – Give buffer to user for migration
  • 26. What We Have Learned Two • Follow Architecture & Design Best Practice – Single responsibility & separation of concerns – Dependency inversion – Dependency isolation – Rate limiting & circuit breaker – Dynamic deployable & re-configurable • Top-Level Design – Fit service into infra, not fit infra into service
  • 27. What We Have Learned Three • Conway’s Law – “Any organization that design a system(defined broadly) will produce a design whose structure is a copy of the organization’s communication structure” – Melvin Conway, 1968 – “Those system then constrain the options for organizational change” – Dan North
  • 28. Caveat • MicroService is not a Free Lunch – Significant operations overhead – Substantial DevOps skills required – Implicit interface – Duplication of effort – Distributed system complexity – Testability challenges http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 29. Future – Soft Load Balancing
  • 30. Future – Cross Data Centers
  • 31. About Me • William Yang(杨波) • Dev Manager & Architect @Ctrip Middleware Team @Shanghai We are hiring!