SlideShare a Scribd company logo
1 of 21
Download to read offline
Resilient 
APIs
@JPENNINKHOF
Challenge
“If you add up all the smartphones and the tablets 
and the digital televisions and the PCs... we see a 
large opportunity of perhaps 3 billion to 4 billion 
units per annum, but we see an embedded market 
that’s maybe 30 billion to 40 billion units per 
annum” 
- ARM CEO Warren East
Problem definition 
For example, running an application that depends on 30 
services that each have 99.99% uptime we get: 
99.9930 = 99.7% uptime 
0.3% of 1 million requests = 3,000 failures 
2+ hours downtime/month even if all dependencies have excellent 
uptime. 
Reality is generally worse.
API vulnerability
API Fallbacks
Design principles 
• Restrict any single dependency from using up all user threads. 
• Shed load and fail fast instead of queueing. 
• Provide fallbacks wherever feasible to protect users from failure 
• Use isolation techniques (such as bulkhead, swimlane and circuit breaker 
patterns) to limit impact of any one dependency. 
• Optimize for time-to-discovery through near real-time metrics, monitoring 
and alerting 
• Optimize for time-to-recovery with low latency propagation of configuration 
changes and support for dynamic property changes in virtually all aspects of 
Hystrix to allow real-time operational modifications with low latency 
feedback loops. 
• Protect against entire dependency client execution, not just network traffic
Use timeouts 
Time-out calls that take longer than defined thresholds. A 
default exists but for most dependencies is custom-set via 
properties to be just slightly higher than the measured 
99.5th percentile performance for each dependency.
Bulkheads 
Maintain a small thread-pool (or semaphore) for 
each dependency and if it becomes full commands 
will be immediately rejected instead of queued up. 
Dependencies with Clogged threads pools shouldn’t 
hinder access to other dependencies.
Circuit breakers 
Trip a circuit-breaker automatically or manually 
to stop all requests to that service for a period of 
time if error percentage passes a threshold.
Fallback logic 
Perform fallback logic when a request 
fails, is rejected, timed-out or short-circuited.
Measure 
Measure success, failures 
(exceptions thrown by client), 
timeouts, and thread 
rejections.
Request collapsing 
Collapse multiple concurrent user request 
into one a single backend dependency call 
(within a short time window of e.g. 10ms)
Request caching 
Reduce the number of request being sent to the 
backend dependencies by caching and de-duping 
requests.
Define a pipeline and context 
Many service share base functionality such as 
authentication. Defining a clear request pipeline and 
context, optimizes shared logic and prevents 
repeating calls (e.g. getCustomer)
Don’t lock the bonnet 
Make it possible to switch on logging and direct certain 
traffic to a specific node
REST vs Experience API 
/users/<id>/ratings/title 
/users/<id>/queues 
/users/<id>/queues/instant 
/users/<id>/recommendations 
/catalog/titles/movie 
/catalog/titles/series 
/catalog/people 
VS
Example: /phone/homescreen 
User Interface Rendering 
Data gathering, formatting 
and delivery
Thanks for listening! 
We are hiring! 
Contact me: 
jan@penninkhof.com

More Related Content

What's hot

The 7 quests of resilient software design
The 7 quests of resilient software designThe 7 quests of resilient software design
The 7 quests of resilient software designUwe Friedrichsen
 
Site (Service) Reliability Engineering
Site (Service) Reliability EngineeringSite (Service) Reliability Engineering
Site (Service) Reliability EngineeringMark Underwood
 
Site reliability engineering
Site reliability engineeringSite reliability engineering
Site reliability engineeringJason Loeffler
 
Setting SLOs and SLIs in the Real World
Setting SLOs and SLIs in the Real WorldSetting SLOs and SLIs in the Real World
Setting SLOs and SLIs in the Real WorldNew Relic
 
Distributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesDistributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesJ On The Beach
 
High Availability (HA) Explained
High Availability (HA) ExplainedHigh Availability (HA) Explained
High Availability (HA) ExplainedMaciej Lasyk
 
Getting started with Site Reliability Engineering (SRE)
Getting started with Site Reliability Engineering (SRE)Getting started with Site Reliability Engineering (SRE)
Getting started with Site Reliability Engineering (SRE)Abeer R
 
Site reliability engineering - Lightning Talk
Site reliability engineering - Lightning TalkSite reliability engineering - Lightning Talk
Site reliability engineering - Lightning TalkMichae Blakeney
 
Circuit Breaker Pattern
Circuit Breaker PatternCircuit Breaker Pattern
Circuit Breaker PatternTung Nguyen
 
Overview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practicesOverview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practicesAshutosh Agarwal
 
Developing a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps SuccessDeveloping a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps SuccessDevOps.com
 
Release Train Engineer - the Master Scrum Master
Release Train Engineer  - the Master Scrum Master Release Train Engineer  - the Master Scrum Master
Release Train Engineer - the Master Scrum Master Mia Horrigan
 
12 Agile Principles in Pictures
12 Agile Principles in Pictures12 Agile Principles in Pictures
12 Agile Principles in PicturesIAMCP MENTORING
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveJonas Bonér
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principlesSanjoy Kumar Roy
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Adrian Cockcroft
 
API Risk: Taking Your API Security to the Next Level
API Risk: Taking Your API Security to the Next LevelAPI Risk: Taking Your API Security to the Next Level
API Risk: Taking Your API Security to the Next LevelCA Technologies
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaAraf Karsh Hamid
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureChris Patterson
 

What's hot (20)

The 7 quests of resilient software design
The 7 quests of resilient software designThe 7 quests of resilient software design
The 7 quests of resilient software design
 
Site (Service) Reliability Engineering
Site (Service) Reliability EngineeringSite (Service) Reliability Engineering
Site (Service) Reliability Engineering
 
Site reliability engineering
Site reliability engineeringSite reliability engineering
Site reliability engineering
 
Setting SLOs and SLIs in the Real World
Setting SLOs and SLIs in the Real WorldSetting SLOs and SLIs in the Real World
Setting SLOs and SLIs in the Real World
 
Distributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservicesDistributed sagas a protocol for coordinating microservices
Distributed sagas a protocol for coordinating microservices
 
High Availability (HA) Explained
High Availability (HA) ExplainedHigh Availability (HA) Explained
High Availability (HA) Explained
 
Getting started with Site Reliability Engineering (SRE)
Getting started with Site Reliability Engineering (SRE)Getting started with Site Reliability Engineering (SRE)
Getting started with Site Reliability Engineering (SRE)
 
Site reliability engineering - Lightning Talk
Site reliability engineering - Lightning TalkSite reliability engineering - Lightning Talk
Site reliability engineering - Lightning Talk
 
Circuit Breaker Pattern
Circuit Breaker PatternCircuit Breaker Pattern
Circuit Breaker Pattern
 
Overview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practicesOverview of Site Reliability Engineering (SRE) & best practices
Overview of Site Reliability Engineering (SRE) & best practices
 
Developing a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps SuccessDeveloping a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps Success
 
Release Train Engineer - the Master Scrum Master
Release Train Engineer  - the Master Scrum Master Release Train Engineer  - the Master Scrum Master
Release Train Engineer - the Master Scrum Master
 
12 Agile Principles in Pictures
12 Agile Principles in Pictures12 Agile Principles in Pictures
12 Agile Principles in Pictures
 
API Security Lifecycle
API Security LifecycleAPI Security Lifecycle
API Security Lifecycle
 
Event Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspectiveEvent Driven-Architecture from a Scalability perspective
Event Driven-Architecture from a Scalability perspective
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016
 
API Risk: Taking Your API Security to the Next Level
API Risk: Taking Your API Security to the Next LevelAPI Risk: Taking Your API Security to the Next Level
API Risk: Taking Your API Security to the Next Level
 
Microservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and KafkaMicroservices Part 3 Service Mesh and Kafka
Microservices Part 3 Service Mesh and Kafka
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 

Viewers also liked

Next-gen OData/ui5 microservices with Spring Boot
Next-gen OData/ui5 microservices with Spring BootNext-gen OData/ui5 microservices with Spring Boot
Next-gen OData/ui5 microservices with Spring BootJan Penninkhof
 
SAP & Open Souce - Give & Take
SAP & Open Souce - Give & TakeSAP & Open Souce - Give & Take
SAP & Open Souce - Give & TakeJan Penninkhof
 
Node.js in SAP HANA SPS11
Node.js in SAP HANA SPS11Node.js in SAP HANA SPS11
Node.js in SAP HANA SPS11Jan Penninkhof
 
SAP and The Internet of Things
SAP and The Internet of ThingsSAP and The Internet of Things
SAP and The Internet of ThingsJan Penninkhof
 
Cloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionCloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionJan Penninkhof
 
Building Consistent RESTful APIs in a high-performance environment
Building Consistent RESTful APIs in a high-performance environmentBuilding Consistent RESTful APIs in a high-performance environment
Building Consistent RESTful APIs in a high-performance environmentLinkedIn
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayAmazon Web Services
 

Viewers also liked (8)

Next-gen OData/ui5 microservices with Spring Boot
Next-gen OData/ui5 microservices with Spring BootNext-gen OData/ui5 microservices with Spring Boot
Next-gen OData/ui5 microservices with Spring Boot
 
SAP & Open Souce - Give & Take
SAP & Open Souce - Give & TakeSAP & Open Souce - Give & Take
SAP & Open Souce - Give & Take
 
Sap Teched 2015 Recap
Sap Teched 2015 RecapSap Teched 2015 Recap
Sap Teched 2015 Recap
 
Node.js in SAP HANA SPS11
Node.js in SAP HANA SPS11Node.js in SAP HANA SPS11
Node.js in SAP HANA SPS11
 
SAP and The Internet of Things
SAP and The Internet of ThingsSAP and The Internet of Things
SAP and The Internet of Things
 
Cloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolutionCloud foundry as driver of hana’s evolution
Cloud foundry as driver of hana’s evolution
 
Building Consistent RESTful APIs in a high-performance environment
Building Consistent RESTful APIs in a high-performance environmentBuilding Consistent RESTful APIs in a high-performance environment
Building Consistent RESTful APIs in a high-performance environment
 
Build and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API GatewayBuild and Manage Your APIs with Amazon API Gateway
Build and Manage Your APIs with Amazon API Gateway
 

Similar to How to Build High-Volume, Scalable, and Resilient APIs (EXP18038)

Tef con2016 (1)
Tef con2016 (1)Tef con2016 (1)
Tef con2016 (1)ggarber
 
Top-Down Network DesignAnalyzing Technical Goals.docx
Top-Down Network DesignAnalyzing Technical Goals.docxTop-Down Network DesignAnalyzing Technical Goals.docx
Top-Down Network DesignAnalyzing Technical Goals.docxjuliennehar
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES ijwscjournal
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES ijwscjournal
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES ijwscjournal
 
Enabling Carrier-Grade Availability Within a Cloud Infrastructure
Enabling Carrier-Grade Availability Within a Cloud InfrastructureEnabling Carrier-Grade Availability Within a Cloud Infrastructure
Enabling Carrier-Grade Availability Within a Cloud InfrastructureOPNFV
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
Improving the Reliability of the Distribution Grid Using a Distributed Restor...
Improving the Reliability of the Distribution Grid Using a Distributed Restor...Improving the Reliability of the Distribution Grid Using a Distributed Restor...
Improving the Reliability of the Distribution Grid Using a Distributed Restor...Power System Operation
 
Monitoring Clusters and Load Balancers
Monitoring Clusters and Load BalancersMonitoring Clusters and Load Balancers
Monitoring Clusters and Load BalancersPrince JabaKumar
 
Cloud Native & Service Mesh
Cloud Native & Service MeshCloud Native & Service Mesh
Cloud Native & Service MeshRoi Ezra
 
Resilience planning and how the empire strikes back
Resilience planning and how the empire strikes backResilience planning and how the empire strikes back
Resilience planning and how the empire strikes backBhakti Mehta
 
Expect the unexpected: Anticipate and prepare for failures in microservices b...
Expect the unexpected: Anticipate and prepare for failures in microservices b...Expect the unexpected: Anticipate and prepare for failures in microservices b...
Expect the unexpected: Anticipate and prepare for failures in microservices b...Bhakti Mehta
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Judy Breedlove
 
Data stream processing and micro service architecture
Data stream processing and micro service architectureData stream processing and micro service architecture
Data stream processing and micro service architectureVyacheslav Benedichuk
 
Resiliency vs High Availability vs Fault Tolerance vs Reliability
Resiliency vs High Availability vs Fault Tolerance vs  ReliabilityResiliency vs High Availability vs Fault Tolerance vs  Reliability
Resiliency vs High Availability vs Fault Tolerance vs Reliabilityjeetendra mandal
 
IRJET- Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...
IRJET-  	  Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...IRJET-  	  Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...
IRJET- Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...IRJET Journal
 
Cloud design pattern
Cloud design patternCloud design pattern
Cloud design patternAreeba jabeen
 
Carrier-Class Availability for Enterprises
Carrier-Class Availability for EnterprisesCarrier-Class Availability for Enterprises
Carrier-Class Availability for EnterprisesSheri Determan
 

Similar to How to Build High-Volume, Scalable, and Resilient APIs (EXP18038) (20)

Tef con2016 (1)
Tef con2016 (1)Tef con2016 (1)
Tef con2016 (1)
 
Top-Down Network DesignAnalyzing Technical Goals.docx
Top-Down Network DesignAnalyzing Technical Goals.docxTop-Down Network DesignAnalyzing Technical Goals.docx
Top-Down Network DesignAnalyzing Technical Goals.docx
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
 
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
AVAILABILITY METRICS: UNDER CONTROLLED ENVIRONMENTS FOR WEB SERVICES
 
Enabling Carrier-Grade Availability Within a Cloud Infrastructure
Enabling Carrier-Grade Availability Within a Cloud InfrastructureEnabling Carrier-Grade Availability Within a Cloud Infrastructure
Enabling Carrier-Grade Availability Within a Cloud Infrastructure
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Improving the Reliability of the Distribution Grid Using a Distributed Restor...
Improving the Reliability of the Distribution Grid Using a Distributed Restor...Improving the Reliability of the Distribution Grid Using a Distributed Restor...
Improving the Reliability of the Distribution Grid Using a Distributed Restor...
 
Monitoring Clusters and Load Balancers
Monitoring Clusters and Load BalancersMonitoring Clusters and Load Balancers
Monitoring Clusters and Load Balancers
 
Cloud Native & Service Mesh
Cloud Native & Service MeshCloud Native & Service Mesh
Cloud Native & Service Mesh
 
Resilience engineering
Resilience engineeringResilience engineering
Resilience engineering
 
Resilience planning and how the empire strikes back
Resilience planning and how the empire strikes backResilience planning and how the empire strikes back
Resilience planning and how the empire strikes back
 
Expect the unexpected: Anticipate and prepare for failures in microservices b...
Expect the unexpected: Anticipate and prepare for failures in microservices b...Expect the unexpected: Anticipate and prepare for failures in microservices b...
Expect the unexpected: Anticipate and prepare for failures in microservices b...
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
Data stream processing and micro service architecture
Data stream processing and micro service architectureData stream processing and micro service architecture
Data stream processing and micro service architecture
 
Cloud architecture
Cloud architectureCloud architecture
Cloud architecture
 
Resiliency vs High Availability vs Fault Tolerance vs Reliability
Resiliency vs High Availability vs Fault Tolerance vs  ReliabilityResiliency vs High Availability vs Fault Tolerance vs  Reliability
Resiliency vs High Availability vs Fault Tolerance vs Reliability
 
IRJET- Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...
IRJET-  	  Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...IRJET-  	  Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...
IRJET- Analysis of Micro Inversion to Improve Fault Tolerance in High Spe...
 
Cloud design pattern
Cloud design patternCloud design pattern
Cloud design pattern
 
Carrier-Class Availability for Enterprises
Carrier-Class Availability for EnterprisesCarrier-Class Availability for Enterprises
Carrier-Class Availability for Enterprises
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

How to Build High-Volume, Scalable, and Resilient APIs (EXP18038)

  • 4. “If you add up all the smartphones and the tablets and the digital televisions and the PCs... we see a large opportunity of perhaps 3 billion to 4 billion units per annum, but we see an embedded market that’s maybe 30 billion to 40 billion units per annum” - ARM CEO Warren East
  • 5. Problem definition For example, running an application that depends on 30 services that each have 99.99% uptime we get: 99.9930 = 99.7% uptime 0.3% of 1 million requests = 3,000 failures 2+ hours downtime/month even if all dependencies have excellent uptime. Reality is generally worse.
  • 8. Design principles • Restrict any single dependency from using up all user threads. • Shed load and fail fast instead of queueing. • Provide fallbacks wherever feasible to protect users from failure • Use isolation techniques (such as bulkhead, swimlane and circuit breaker patterns) to limit impact of any one dependency. • Optimize for time-to-discovery through near real-time metrics, monitoring and alerting • Optimize for time-to-recovery with low latency propagation of configuration changes and support for dynamic property changes in virtually all aspects of Hystrix to allow real-time operational modifications with low latency feedback loops. • Protect against entire dependency client execution, not just network traffic
  • 9. Use timeouts Time-out calls that take longer than defined thresholds. A default exists but for most dependencies is custom-set via properties to be just slightly higher than the measured 99.5th percentile performance for each dependency.
  • 10. Bulkheads Maintain a small thread-pool (or semaphore) for each dependency and if it becomes full commands will be immediately rejected instead of queued up. Dependencies with Clogged threads pools shouldn’t hinder access to other dependencies.
  • 11. Circuit breakers Trip a circuit-breaker automatically or manually to stop all requests to that service for a period of time if error percentage passes a threshold.
  • 12. Fallback logic Perform fallback logic when a request fails, is rejected, timed-out or short-circuited.
  • 13. Measure Measure success, failures (exceptions thrown by client), timeouts, and thread rejections.
  • 14. Request collapsing Collapse multiple concurrent user request into one a single backend dependency call (within a short time window of e.g. 10ms)
  • 15. Request caching Reduce the number of request being sent to the backend dependencies by caching and de-duping requests.
  • 16. Define a pipeline and context Many service share base functionality such as authentication. Defining a clear request pipeline and context, optimizes shared logic and prevents repeating calls (e.g. getCustomer)
  • 17. Don’t lock the bonnet Make it possible to switch on logging and direct certain traffic to a specific node
  • 18. REST vs Experience API /users/<id>/ratings/title /users/<id>/queues /users/<id>/queues/instant /users/<id>/recommendations /catalog/titles/movie /catalog/titles/series /catalog/people VS
  • 19. Example: /phone/homescreen User Interface Rendering Data gathering, formatting and delivery
  • 20.
  • 21. Thanks for listening! We are hiring! Contact me: jan@penninkhof.com