SlideShare a Scribd company logo
1 of 22
PAGE 1 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
#GHCI16
2016Building Resiliency In Multi-
Tier Systems
Shreya Mukhopadhyay
PAGE 2 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Agenda
• What is resiliency?
• Open source tools for resilence
— Netflix’s Hystrix
— Wiremock
• Learnings
• Q/A
PAGE 3 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
What is Resiliency?
PAGE 4 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Why is it important?
PAGE 5 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Why is it important?
PAGE 7 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Open Source
Framework for
building Resiliency
PAGE 8 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Hystrix Framework
• Java library
• Build fault tolerance in system interactions
• Stop cascading failures
• Fail fast and rapidly recover
• Fallback and gracefully degrade when possible
• Dashboards- monitoring, alerting, and operational
control
PAGE 9 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Hystrix Implementation
Wrap external
calls in Hystrix
Annotation-
javanica
Hystrix
Command
Set configs
for
Statistical
rolling
window
Timeouts,
Rejection,
Sleep
Thresholds-
volume,
failure %
Circuit Breaker-
Thresholds
breached
Fails
proactively
Frees up
worker
threads
Fallback
triggered
Request
failed
Rejection at
threadpool
Times-out
Shortcircuits
Dashboards
Hystrix
Others-
Splunk etc
PAGE 10 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Hystrix at work
PAGE 12 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Open Source
Framework for
testing Resiliency
PAGE 13 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Wiremock
• Stub and mock framework for testing HTTP(s) traffic
• Standalone OR Embedded
• Features include
• Dependency stubs
• Fault simulation
• Delay injection
• Request verification
Client
Standalone
wire-mock
Client unit
test
Embedded
Wire-mock
PAGE 14 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
How does it work?
$ curl –H ’Accept: application/json’ http://localhost:8089/sample
14
• Starts embedded
Jetty server
• Acts as a proxy to
the actual service
• Is used by the client
transparently
Client Wire-mock
Request
Mapping
Response
Data
PAGE 15 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
How does it work?
$ curl –H ’Accept: application/json’ http://localhost:8089/sample
15
Client Wire-mock
Response
Data
{ "request":
{ "method": "GET", "url":
"/sample/"
},
"response": {
"status": 500,
”bodyFileName” :
”body.json”,
“headers” : {
“Content-type” :
“application/json”
…..........}
}
Request
Mapping
PAGE 16 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
System architecture
PAGE 17 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Wiremock simulating dependency and failures
PAGE 18 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Hystrix Dashboard
https://github.com/Netflix/Hystrix/wiki/Dashboard
PAGE 19 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Hystrix Dashboard Details
PAGE 20 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Splunk Dashboard
PAGE 21 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Learnings
• Make the implementation choice based on your
system- Annotation V/S Command
• Hystrix Configs- driven by production metrices
• Hystrix default time out- 1 second
• Don’t call another Hystrix command in catch block
• Update catch block after Hystrix implementation
• Don’t implement fallback if you don’t have one
PAGE 22 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
References
https://github.com/Netflix/Hystrix/wiki/How-it-Works
https://github.com/Netflix/Hystrix/wiki/Dashboard
http://wiremock.org/
PAGE 23 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Contact Details
SHREYA MUKHOPADHYAY
Email: shreya_mukhopadhyay3@intuit.com
Linked In : https://in.linkedin.com/in/shreya-mukhopadhyay-354b0062
PAGE 24 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16
PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA
Thank you

More Related Content

Similar to GHC16_BuildingResiliencyInMulti-tierSystems

Building Resilient Distributed Systems by Using Caching Command and Rollback-...
Building Resilient Distributed Systems by Using Caching Command and Rollback-...Building Resilient Distributed Systems by Using Caching Command and Rollback-...
Building Resilient Distributed Systems by Using Caching Command and Rollback-...Intuit Inc.
 
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact SpotterDO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact SpotterHarini Gunabalan
 
Hello Watch! Build your First Apple Watch App
Hello Watch! Build your First Apple Watch AppHello Watch! Build your First Apple Watch App
Hello Watch! Build your First Apple Watch AppKristina Fox
 
Ideas to Execution: (Mis)using Code for Prototypes
Ideas to Execution: (Mis)using Code for PrototypesIdeas to Execution: (Mis)using Code for Prototypes
Ideas to Execution: (Mis)using Code for PrototypesIntuit Inc.
 
Beware of Passwords - FIDO helps to go passwordless
Beware of Passwords - FIDO helps to go passwordlessBeware of Passwords - FIDO helps to go passwordless
Beware of Passwords - FIDO helps to go passwordlessParul Jain
 
Fair Recommendation of Two-sided Platforms
Fair Recommendation of Two-sided PlatformsFair Recommendation of Two-sided Platforms
Fair Recommendation of Two-sided PlatformsArpita Biswas
 
When Data is Your Product: Empowering Business Users
When Data is Your Product: Empowering Business UsersWhen Data is Your Product: Empowering Business Users
When Data is Your Product: Empowering Business UsersIntuit Inc.
 
How I built a software business to help Mothers like me?
How I built a software business to help Mothers like me?How I built a software business to help Mothers like me?
How I built a software business to help Mothers like me?Nirupama Mallavarupu
 
Mahindra & mahindra- Inventory Categorisation
Mahindra & mahindra- Inventory CategorisationMahindra & mahindra- Inventory Categorisation
Mahindra & mahindra- Inventory CategorisationAnkur Suyal
 
Tips and techniques for hyperparameter optimization
Tips and techniques for hyperparameter optimizationTips and techniques for hyperparameter optimization
Tips and techniques for hyperparameter optimizationSigOpt
 
Presentation - We live in a reactive world - TechForumIberia2016
Presentation - We live in a reactive world - TechForumIberia2016Presentation - We live in a reactive world - TechForumIberia2016
Presentation - We live in a reactive world - TechForumIberia2016Sergi Castillo Malpesa
 
Gibela maintenance strategies - 2016
Gibela maintenance strategies - 2016Gibela maintenance strategies - 2016
Gibela maintenance strategies - 2016Sibongile Nsibande
 
GHC 2016 design thinking
GHC 2016   design thinkingGHC 2016   design thinking
GHC 2016 design thinkingKathryn Kuhn
 
Bias in Artificial Intelligence
Bias in Artificial IntelligenceBias in Artificial Intelligence
Bias in Artificial IntelligenceNeelima Kumar
 
A Review on Sugarcane Harvesting and Thresher Machineries
A Review on Sugarcane Harvesting and Thresher MachineriesA Review on Sugarcane Harvesting and Thresher Machineries
A Review on Sugarcane Harvesting and Thresher MachineriesIRJET Journal
 
Final Report on IRRI-Illinois Postharvest Loss Reduction Initiative
Final Report on IRRI-Illinois Postharvest Loss Reduction InitiativeFinal Report on IRRI-Illinois Postharvest Loss Reduction Initiative
Final Report on IRRI-Illinois Postharvest Loss Reduction InitiativeAanand Kumar
 
AIS19 Newcomers Session (EN)
AIS19 Newcomers Session (EN)AIS19 Newcomers Session (EN)
AIS19 Newcomers Session (EN)AFRINIC
 

Similar to GHC16_BuildingResiliencyInMulti-tierSystems (20)

Building Resilient Distributed Systems by Using Caching Command and Rollback-...
Building Resilient Distributed Systems by Using Caching Command and Rollback-...Building Resilient Distributed Systems by Using Caching Command and Rollback-...
Building Resilient Distributed Systems by Using Caching Command and Rollback-...
 
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact SpotterDO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter
DO-AS-CASPOTT: DevOps AutoScaler and Critical Artifact Spotter
 
Hello Watch! Build your First Apple Watch App
Hello Watch! Build your First Apple Watch AppHello Watch! Build your First Apple Watch App
Hello Watch! Build your First Apple Watch App
 
Ideas to Execution: (Mis)using Code for Prototypes
Ideas to Execution: (Mis)using Code for PrototypesIdeas to Execution: (Mis)using Code for Prototypes
Ideas to Execution: (Mis)using Code for Prototypes
 
Beware of Passwords - FIDO helps to go passwordless
Beware of Passwords - FIDO helps to go passwordlessBeware of Passwords - FIDO helps to go passwordless
Beware of Passwords - FIDO helps to go passwordless
 
Fair Recommendation of Two-sided Platforms
Fair Recommendation of Two-sided PlatformsFair Recommendation of Two-sided Platforms
Fair Recommendation of Two-sided Platforms
 
When Data is Your Product: Empowering Business Users
When Data is Your Product: Empowering Business UsersWhen Data is Your Product: Empowering Business Users
When Data is Your Product: Empowering Business Users
 
How I built a software business to help Mothers like me?
How I built a software business to help Mothers like me?How I built a software business to help Mothers like me?
How I built a software business to help Mothers like me?
 
Mahindra & mahindra- Inventory Categorisation
Mahindra & mahindra- Inventory CategorisationMahindra & mahindra- Inventory Categorisation
Mahindra & mahindra- Inventory Categorisation
 
Tips and techniques for hyperparameter optimization
Tips and techniques for hyperparameter optimizationTips and techniques for hyperparameter optimization
Tips and techniques for hyperparameter optimization
 
Presentation - We live in a reactive world - TechForumIberia2016
Presentation - We live in a reactive world - TechForumIberia2016Presentation - We live in a reactive world - TechForumIberia2016
Presentation - We live in a reactive world - TechForumIberia2016
 
Gibela maintenance strategies - 2016
Gibela maintenance strategies - 2016Gibela maintenance strategies - 2016
Gibela maintenance strategies - 2016
 
GHC 2016 design thinking
GHC 2016   design thinkingGHC 2016   design thinking
GHC 2016 design thinking
 
East Africa - Summary of development and delivery activities for out-scaling ...
East Africa - Summary of development and delivery activities for out-scaling ...East Africa - Summary of development and delivery activities for out-scaling ...
East Africa - Summary of development and delivery activities for out-scaling ...
 
Bias in Artificial Intelligence
Bias in Artificial IntelligenceBias in Artificial Intelligence
Bias in Artificial Intelligence
 
Tomcar vikings marketing
Tomcar vikings marketing Tomcar vikings marketing
Tomcar vikings marketing
 
A Review on Sugarcane Harvesting and Thresher Machineries
A Review on Sugarcane Harvesting and Thresher MachineriesA Review on Sugarcane Harvesting and Thresher Machineries
A Review on Sugarcane Harvesting and Thresher Machineries
 
Public Private Partnership (PPP) for Transport & Logistics Infrastructure; Ch...
Public Private Partnership (PPP) for Transport & Logistics Infrastructure; Ch...Public Private Partnership (PPP) for Transport & Logistics Infrastructure; Ch...
Public Private Partnership (PPP) for Transport & Logistics Infrastructure; Ch...
 
Final Report on IRRI-Illinois Postharvest Loss Reduction Initiative
Final Report on IRRI-Illinois Postharvest Loss Reduction InitiativeFinal Report on IRRI-Illinois Postharvest Loss Reduction Initiative
Final Report on IRRI-Illinois Postharvest Loss Reduction Initiative
 
AIS19 Newcomers Session (EN)
AIS19 Newcomers Session (EN)AIS19 Newcomers Session (EN)
AIS19 Newcomers Session (EN)
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

GHC16_BuildingResiliencyInMulti-tierSystems

  • 1. PAGE 1 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA #GHCI16 2016Building Resiliency In Multi- Tier Systems Shreya Mukhopadhyay
  • 2. PAGE 2 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Agenda • What is resiliency? • Open source tools for resilence — Netflix’s Hystrix — Wiremock • Learnings • Q/A
  • 3. PAGE 3 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA What is Resiliency?
  • 4. PAGE 4 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Why is it important?
  • 5. PAGE 5 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Why is it important?
  • 6. PAGE 7 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Open Source Framework for building Resiliency
  • 7. PAGE 8 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Hystrix Framework • Java library • Build fault tolerance in system interactions • Stop cascading failures • Fail fast and rapidly recover • Fallback and gracefully degrade when possible • Dashboards- monitoring, alerting, and operational control
  • 8. PAGE 9 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Hystrix Implementation Wrap external calls in Hystrix Annotation- javanica Hystrix Command Set configs for Statistical rolling window Timeouts, Rejection, Sleep Thresholds- volume, failure % Circuit Breaker- Thresholds breached Fails proactively Frees up worker threads Fallback triggered Request failed Rejection at threadpool Times-out Shortcircuits Dashboards Hystrix Others- Splunk etc
  • 9. PAGE 10 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Hystrix at work
  • 10. PAGE 12 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Open Source Framework for testing Resiliency
  • 11. PAGE 13 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Wiremock • Stub and mock framework for testing HTTP(s) traffic • Standalone OR Embedded • Features include • Dependency stubs • Fault simulation • Delay injection • Request verification Client Standalone wire-mock Client unit test Embedded Wire-mock
  • 12. PAGE 14 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA How does it work? $ curl –H ’Accept: application/json’ http://localhost:8089/sample 14 • Starts embedded Jetty server • Acts as a proxy to the actual service • Is used by the client transparently Client Wire-mock Request Mapping Response Data
  • 13. PAGE 15 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA How does it work? $ curl –H ’Accept: application/json’ http://localhost:8089/sample 15 Client Wire-mock Response Data { "request": { "method": "GET", "url": "/sample/" }, "response": { "status": 500, ”bodyFileName” : ”body.json”, “headers” : { “Content-type” : “application/json” …..........} } Request Mapping
  • 14. PAGE 16 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA System architecture
  • 15. PAGE 17 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Wiremock simulating dependency and failures
  • 16. PAGE 18 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Hystrix Dashboard https://github.com/Netflix/Hystrix/wiki/Dashboard
  • 17. PAGE 19 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Hystrix Dashboard Details
  • 18. PAGE 20 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Splunk Dashboard
  • 19. PAGE 21 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Learnings • Make the implementation choice based on your system- Annotation V/S Command • Hystrix Configs- driven by production metrices • Hystrix default time out- 1 second • Don’t call another Hystrix command in catch block • Update catch block after Hystrix implementation • Don’t implement fallback if you don’t have one
  • 20. PAGE 22 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA References https://github.com/Netflix/Hystrix/wiki/How-it-Works https://github.com/Netflix/Hystrix/wiki/Dashboard http://wiremock.org/
  • 21. PAGE 23 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Contact Details SHREYA MUKHOPADHYAY Email: shreya_mukhopadhyay3@intuit.com Linked In : https://in.linkedin.com/in/shreya-mukhopadhyay-354b0062
  • 22. PAGE 24 | GRACE HOPPER CELEBRATION INDIA 2016 | #GHCI16 PRESENTED BY THE ANITA BORG INSTITUTE AND THE ASSOCIATION FOR COMPUTING MACHINERY INDIA Thank you

Editor's Notes

  1. Sapling still lives in the harshest conditions it has the ability to recover from the adversity and still grow Act normal to your customer even if you’re hurting and fix the problem quickly before your customers notice Similarly, resilience is the ability of a system to gracefully recover from a breakdown Application resilience is the ability of an application to react to problems in one of its components and still provide the best possible service Reliability: The target at which software designers have always aimed: perfect operation all the time. Reliability is the planned outcome. Resiliency: The ability of an app to recover from certain types of failure and yet remain functional from the customer perspective. Resilience is the way you achieve the outcome.
  2. What’s the issue? PayTM, LinkedIn, Netflix Almost all systems are distributed, multi- tier systems and that means that the failure of a system that you didn’t even know existed can render your own computer unusable e.g. Payment system is down Falacies in a distributed system- reliable network, zero latency, infinite bandwidth, secure network and many more Therefore, there is no point in trying to avoid failures as there will be so many, instead we need to embrace them
  3. What if the Payment acceptance engine at your end is down, so essentially customers can’t add money to their wallets. But wont you allow your customers to login and take a look at other offerings? There may be many other systems which you might know might not be aware of but they will have the capacity to bring your system down  
  4. So if you want to call your system resilient , you need to design considering that failures will happen. How do you isolate them, stop them from cascading and degrade gracefully keeping in mind the end customer Here are some of resiliency approaches that can be built in your system
  5. Hystrix is a Java library designed to control the interactions between these distributed systems providing latency and fault tolerance. It does this by isolating points of access between the services Also known as “Circuit Breaker” - Automatic Fail Fast - Automatic Fail Over (fallback) - Protocol Agnostics § Created by an engineer to make his life better during production support! § Defend against your dependencies (Trust but verify)! § Battle tested with billions of request per days. § Metrics Generation
  6. Preventing any single dependency from using up all container (such as Tomcat) user threads. Shedding load and failing fast instead of queueing. Providing fallbacks wherever feasible to protect users from failure. Using isolation techniques (such as bulkhead, swimlane, and circuit breaker patterns) to limit the impact of any one dependency. Optimizing for time-to-discovery through near real-time metrics, monitoring, and alerting
  7. Construct a HystrixCommand or HystrixObservableCommand Object Execute the Command Is the Response Cached? Is the Circuit Open? Is the Thread Pool/Queue/Semaphore Full? HystrixObservableCommand.construct() or HystrixCommand.run() Calculate Circuit Health Get the Fallback Return the Successful Response
  8. Preventing any single dependency from using up all container (such as Tomcat) user threads. Shedding load and failing fast instead of queueing. Providing fallbacks wherever feasible to protect users from failure. Using isolation techniques (such as bulkhead, swimlane, and circuit breaker patterns) to limit the impact of any one dependency. Optimizing for time-to-discovery through near real-time metrics, monitoring, and alerting
  9. Once you’ve implemented Resiliency based on your system, you need to prove that it works right? And for that you need to bring down the systems that are interacting with your systems- this is only possible when you mock them. Not only that you might need specific failure responses like in case of http/ https: 400, 500 series errors.
  10. Now enters the open source framework Wiremock- which is basically a stub and mock framework for testing And can be used in standalone- real time interactions or embedded mode- unit and integration tests
  11. What’s the issue? PayTM, LinkedIn, Netflix Almost all systems are distributed, multi- tier systems and that means that the failure of a system that you didn’t even know existed can render your own computer unusable e.g. Payment system is down Falacies in a distributed system- reliable network, zero latency, infinite bandwidth, secure network and many more Therefore, there is no point in trying to avoid failures as there will be so many, instead we need to embrace them
  12. Proxy ports for connecting to wiremock, other tiers should be configurable
  13. Resiliency is a choice which you need to make during the design and architecture- what is important- security, performance, reliability, resiliency Annotation approach is easier to implement and cleaner, but the inheritance approach is offering the possibility to externalize the commands settings, and this could be more convenient, because we can change them in production without to create a new release