SlideShare a Scribd company logo
Whiskey,
Tango,
Foxtrot:
Understanding
API Usage


Clay Loveless
Chief Architect, Mashery
@claylo

OSCON
July 22 2010
APIs Gone Wild
If You Build It ... Itʼll Turn On You Someday
APIs Gone Wild
If You Build It ... Itʼll Turn On You Someday

                                          GET
Overview
 What Happens When Things                       200
 Go Wrong?
                                          PUT
                                                200
 5 Tips to Stay Ahead
                                          GET
                                                200
 The Secret 6th Tip
                                          GET
                                                503
Multiple Points of Failure
APIs Can Mean Exponential New Failure Opportunities
Multiple Points of Failure
 APIs Can Mean Exponential New Failure Opportunities




Backend Systems
• DB Servers/Caches
• Hardware failures
• Power hiccups
• Incomplete reboots
Multiple Points of Failure
 APIs Can Mean Exponential New Failure Opportunities




Backend Systems        Interconnections
• DB Servers/Caches     • Router failures
• Hardware failures     • Bad cables
• Power hiccups         • Severed internets
• Incomplete reboots    • Remote-hands fail
Multiple Points of Failure
 APIs Can Mean Exponential New Failure Opportunities




Backend Systems        Interconnections       External Deps
• DB Servers/Caches     • Router failures      • Fail Whales
• Hardware failures     • Bad cables           • Unannounced
• Power hiccups         • Severed internets      upgrades
• Incomplete reboots    • Remote-hands fail    • Random cloud
                                                 latency
Multiple Points of Failure
 APIs Can Mean Exponential New Failure Opportunities




Backend Systems        Interconnections       External Deps
• DB Servers/Caches     • Router failures      • Fail Whales
• Hardware failures     • Bad cables           • Unannounced
• Power hiccups         • Severed internets      upgrades
• Incomplete reboots    • Remote-hands fail    • Random cloud
                                                 latency
The Retry Effect
    “Try Again in a Few Moments” = Right Now

                                      Successful   Concurrent

           600




           450
Requests




           300




           150




                           Seconds
The Five Tips
Tip 1: Test It All
Seriously, Test It All
Tip 1: Test It All
Seriously, Test It All

Unit Tests Are Just the Beginning
If you donʼt have them yet, start
elsewhere
Tip 1: Test It All
Seriously, Test It All

Unit Tests Are Just the Beginning
If you donʼt have them yet, start
elsewhere

Test What Users Experience
End-to-End Black Box tests
Tip 1: Test It All
Seriously, Test It All

Unit Tests Are Just the Beginning
If you donʼt have them yet, start
elsewhere

Test What Users Experience
End-to-End Black Box tests

Replay Your Access Logs
More accurate than assumptions in
unit tests
Tip 1: Test It All
Seriously, Test It All

Unit Tests Are Just the Beginning
If you donʼt have them yet, start
elsewhere

Test What Users Experience
End-to-End Black Box tests

Replay Your Access Logs
More accurate than assumptions in
unit tests

Validate Return Payloads
A stack trace is not valid XML
Tip 2: Plan for Future Versions
The Sun Will Come Up Tomorrow
Tip 2: Plan for Future Versions
The Sun Will Come Up Tomorrow

Versions. Whoʼda thunk it?
Yes, versioning is useful beyond the
code powering your API.
Tip 2: Plan for Future Versions
The Sun Will Come Up Tomorrow

Versions. Whoʼda thunk it?
Yes, versioning is useful beyond the
code powering your API.

Versions Arenʼt Sexy/Semantic
Do it anyway, & stand up straight.
Tip 2: Plan for Future Versions
The Sun Will Come Up Tomorrow

Versions. Whoʼda thunk it?
Yes, versioning is useful beyond the
code powering your API.

Versions Arenʼt Sexy/Semantic
Do it anyway, & stand up straight.

Announce Versions Often
No one likes surprises when it
comes to API behavior.
Tip 3: Embrace Standards When Practical
APIs Are Better When Predictable
Tip 3: Embrace Standards When Practical
APIs Are Better When Predictable

Standard Approaches Mean Tools
Itʼs easier to monitor anomalies on
non-unique snowflakes.
Tip 3: Embrace Standards When Practical
APIs Are Better When Predictable

Standard Approaches Mean Tools
Itʼs easier to monitor anomalies on
non-unique snowflakes.

Avoid Uncomfortable Migrations
No one wants an OAuthpocalypse.
Tip 3: Embrace Standards When Practical
APIs Are Better When Predictable

Standard Approaches Mean Tools
Itʼs easier to monitor anomalies on
non-unique snowflakes.

Avoid Uncomfortable Migrations
No one wants an OAuthpocalypse.

Enhance Runtime Validation
Standards can make it easier to
detect+reject bogus calls earlier in
the request pipeline.
Tip 4: Monitor Everything & Be Honest
Slow Status Dashboards Suck More Than No Dashboard
Tip 4: Monitor Everything & Be Honest
Slow Status Dashboards Suck More Than No Dashboard

Test It All, All the Time
Better if you notice before your
users notice.
Tip 4: Monitor Everything & Be Honest
Slow Status Dashboards Suck More Than No Dashboard

Test It All, All the Time
Better if you notice before your
users notice.

Trends Are Your Friends
Canʼt spot trends without
continuous monitoring
Tip 4: Monitor Everything & Be Honest
Slow Status Dashboards Suck More Than No Dashboard

Test It All, All the Time
Better if you notice before your
users notice.

Trends Are Your Friends
Canʼt spot trends without
continuous monitoring

Fess Up Fast
No user wants to think theyʼre your
early-warning ops team.
Tip 4: Monitor Everything & Be Honest
Slow Status Dashboards Suck More Than No Dashboard

Test It All, All the Time
Better if you notice before your
users notice.

Trends Are Your Friends
Canʼt spot trends without
continuous monitoring

Fess Up Fast
No user wants to think theyʼre your
early-warning ops team.

Be Open Automatically
Real-time public health instills trust.
Tip 5: Fail Well
Donʼt Ice Me, Bro
Tip 5: Fail Well
Donʼt Ice Me, Bro

Well-formed Errors Win Friends
Developers are more tolerant of
failure if you anticipate the possibility.
Tip 5: Fail Well
Donʼt Ice Me, Bro

Well-formed Errors Win Friends
Developers are more tolerant of
failure if you anticipate the possibility.

Make Monitoring Easy
The more obvious the failure, the
easier it is to spot.
Tip 5: Fail Well
Donʼt Ice Me, Bro

Well-formed Errors Win Friends
Developers are more tolerant of
failure if you anticipate the possibility.

Make Monitoring Easy
The more obvious the failure, the
easier it is to spot.

Donʼt Punish Everyone
Determine who gets hurt most by
failures, and screw them last (or
not at all).
The Shameless Plug
Tip 6: Use an API Management Service
Like ... Mashery!
Tip 6: Use an API Management Service
Like ... Mashery!
Tip 6: Use an API Management Service
Like ... Mashery!

Managed API Service FTW
Use a service with active monitoring and
a support team. Let them call you first.
Tip 6: Use an API Management Service
Like ... Mashery!

Managed API Service FTW
Use a service with active monitoring and
a support team. Let them call you first.


Reports Covering Entire Ecosystem
Make sure reports & analytics cover the
entire spectrum of your APIʼs usage.
Tip 6: Use an API Management Service
Like ... Mashery!

Managed API Service FTW
Use a service with active monitoring and
a support team. Let them call you first.


Reports Covering Entire Ecosystem
Make sure reports & analytics cover the
entire spectrum of your APIʼs usage.


Get Help Building Meaningful Community
Nothing tells your developers you care like a
community with a pulse.
Did I Mention the Free Beer?
Free beer as in FREE BEER.

OSCON API Hour
7-9pm TONIGHT @ The EastBurn



1800 East Burnside Street
Just a 5 minute cab ride.
Mmm, beeer. And vintage games.   Clay Loveless
                                 Chief Architect
Wear Your OSCON Badge
2-3 drinks in, youʼll be happy   clay@mashery.com
everyone has nametags.           Twitter: @claylo

More Related Content

What's hot

Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016 Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Alexander Lisachenko
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the Beast
Roberto Cortez
 
Principles Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering HamburgPrinciples Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering Hamburg
Nils Meder
 
Chaos Engineering - Limiting Damage During Chaos Experiments
Chaos Engineering - Limiting Damage During Chaos ExperimentsChaos Engineering - Limiting Damage During Chaos Experiments
Chaos Engineering - Limiting Damage During Chaos Experiments
Nils Meder
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQ
Tomas Riha
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7
Roberto Cortez
 
Taking the Best of Agile, DevOps and CI/CD into security
Taking the Best of Agile, DevOps and CI/CD into securityTaking the Best of Agile, DevOps and CI/CD into security
Taking the Best of Agile, DevOps and CI/CD into security
Matt Tesauro
 

What's hot (7)

Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016 Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
Solving Cross-Cutting Concerns in PHP - DutchPHP Conference 2016
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the Beast
 
Principles Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering HamburgPrinciples Of Chaos Engineering - Chaos Engineering Hamburg
Principles Of Chaos Engineering - Chaos Engineering Hamburg
 
Chaos Engineering - Limiting Damage During Chaos Experiments
Chaos Engineering - Limiting Damage During Chaos ExperimentsChaos Engineering - Limiting Damage During Chaos Experiments
Chaos Engineering - Limiting Damage During Chaos Experiments
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQ
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7
 
Taking the Best of Agile, DevOps and CI/CD into security
Taking the Best of Agile, DevOps and CI/CD into securityTaking the Best of Agile, DevOps and CI/CD into security
Taking the Best of Agile, DevOps and CI/CD into security
 

Viewers also liked

Kienbaum Hr Climate Index 2011
Kienbaum Hr Climate Index 2011Kienbaum Hr Climate Index 2011
Kienbaum Hr Climate Index 2011
ldragomir
 
Painless OAuth
Painless OAuthPainless OAuth
Painless OAuth
Clay Loveless
 
Lessons From the Failure of SOAP
Lessons From the Failure of SOAPLessons From the Failure of SOAP
Lessons From the Failure of SOAP
Clay Loveless
 

Viewers also liked (8)

Ethics in sinhala
Ethics in sinhalaEthics in sinhala
Ethics in sinhala
 
Kienbaum Hr Climate Index 2011
Kienbaum Hr Climate Index 2011Kienbaum Hr Climate Index 2011
Kienbaum Hr Climate Index 2011
 
Painless OAuth
Painless OAuthPainless OAuth
Painless OAuth
 
Photography & camera
Photography & cameraPhotography & camera
Photography & camera
 
Lessons From the Failure of SOAP
Lessons From the Failure of SOAPLessons From the Failure of SOAP
Lessons From the Failure of SOAP
 
Kadapatha 3rd
Kadapatha 3rdKadapatha 3rd
Kadapatha 3rd
 
Kadapatha 4th
Kadapatha  4thKadapatha  4th
Kadapatha 4th
 
Kadapatha | college paper edited by me
Kadapatha | college paper edited by meKadapatha | college paper edited by me
Kadapatha | college paper edited by me
 

Similar to Whiskey, Tango, Foxtrot: Understanding API Usage

Pinto+Stratopan+Love
Pinto+Stratopan+LovePinto+Stratopan+Love
Pinto+Stratopan+Love
Jeffrey Ryan Thalhammer
 
Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016
Aakash Goel
 
Continues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekContinues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekrantav
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014
Robert Reiz
 
SeConf_Nov2016_London
SeConf_Nov2016_LondonSeConf_Nov2016_London
SeConf_Nov2016_London
Pooja Shah
 
Simplifying the Web Accessibility Test Lab
Simplifying the Web Accessibility Test LabSimplifying the Web Accessibility Test Lab
Simplifying the Web Accessibility Test Lab
mitchellevan
 
How penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skillsHow penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skills
Marian Marinov
 
Alexander Janssens & Gert-Jan van Rooij- Getting started with API
Alexander Janssens & Gert-Jan van Rooij- Getting started with APIAlexander Janssens & Gert-Jan van Rooij- Getting started with API
Alexander Janssens & Gert-Jan van Rooij- Getting started with API
TOPdesk
 
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet
 
Achieving Continuous Delivery with Puppet
Achieving Continuous Delivery with PuppetAchieving Continuous Delivery with Puppet
Achieving Continuous Delivery with Puppet
Devoteam Revolve
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Tomas Doran
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
CloudBees
 
How we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotHow we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotBaruch Sadogursky
 
Contributing to StrongLoop LoopBack (and other open source projects)
Contributing to StrongLoop LoopBack (and other open source projects)Contributing to StrongLoop LoopBack (and other open source projects)
Contributing to StrongLoop LoopBack (and other open source projects)
Supasate Choochaisri
 
2016 - Daniel Lebrero - REPL driven development
2016 - Daniel Lebrero - REPL driven development2016 - Daniel Lebrero - REPL driven development
2016 - Daniel Lebrero - REPL driven development
PROIDEA
 
Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.
Apigee | Google Cloud
 
Linux Users are People, Too!
Linux Users are People, Too!Linux Users are People, Too!
Linux Users are People, Too!
Charles Southerland
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014
Steve Smith
 
Scaling a Web Site - OSCON Tutorial
Scaling a Web Site - OSCON TutorialScaling a Web Site - OSCON Tutorial
Scaling a Web Site - OSCON Tutorial
duleepa
 

Similar to Whiskey, Tango, Foxtrot: Understanding API Usage (20)

Pinto+Stratopan+Love
Pinto+Stratopan+LovePinto+Stratopan+Love
Pinto+Stratopan+Love
 
Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016Cheapass.in — presented at JSFoo 2016
Cheapass.in — presented at JSFoo 2016
 
Continues Deployment - Tech Talk week
Continues Deployment - Tech Talk weekContinues Deployment - Tech Talk week
Continues Deployment - Tech Talk week
 
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO ForumChris Mathias Presents Advanced API Design Considerations at LA CTO Forum
Chris Mathias Presents Advanced API Design Considerations at LA CTO Forum
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014
 
SeConf_Nov2016_London
SeConf_Nov2016_LondonSeConf_Nov2016_London
SeConf_Nov2016_London
 
Simplifying the Web Accessibility Test Lab
Simplifying the Web Accessibility Test LabSimplifying the Web Accessibility Test Lab
Simplifying the Web Accessibility Test Lab
 
How penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skillsHow penetration testing techniques can help you improve your qa skills
How penetration testing techniques can help you improve your qa skills
 
Alexander Janssens & Gert-Jan van Rooij- Getting started with API
Alexander Janssens & Gert-Jan van Rooij- Getting started with APIAlexander Janssens & Gert-Jan van Rooij- Getting started with API
Alexander Janssens & Gert-Jan van Rooij- Getting started with API
 
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
Puppet Camp Paris 2014: Achieving Continuous Delivery and DevOps with Puppet
 
Achieving Continuous Delivery with Puppet
Achieving Continuous Delivery with PuppetAchieving Continuous Delivery with Puppet
Achieving Continuous Delivery with Puppet
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
 
How we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we gotHow we took our server side application to the cloud and liked what we got
How we took our server side application to the cloud and liked what we got
 
Contributing to StrongLoop LoopBack (and other open source projects)
Contributing to StrongLoop LoopBack (and other open source projects)Contributing to StrongLoop LoopBack (and other open source projects)
Contributing to StrongLoop LoopBack (and other open source projects)
 
2016 - Daniel Lebrero - REPL driven development
2016 - Daniel Lebrero - REPL driven development2016 - Daniel Lebrero - REPL driven development
2016 - Daniel Lebrero - REPL driven development
 
Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.
 
Linux Users are People, Too!
Linux Users are People, Too!Linux Users are People, Too!
Linux Users are People, Too!
 
London Atlassian User Group - February 2014
London Atlassian User Group - February 2014London Atlassian User Group - February 2014
London Atlassian User Group - February 2014
 
Scaling a Web Site - OSCON Tutorial
Scaling a Web Site - OSCON TutorialScaling a Web Site - OSCON Tutorial
Scaling a Web Site - OSCON Tutorial
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Whiskey, Tango, Foxtrot: Understanding API Usage

  • 1. Whiskey, Tango, Foxtrot: Understanding API Usage Clay Loveless Chief Architect, Mashery @claylo OSCON July 22 2010
  • 2. APIs Gone Wild If You Build It ... Itʼll Turn On You Someday
  • 3. APIs Gone Wild If You Build It ... Itʼll Turn On You Someday GET Overview What Happens When Things 200 Go Wrong? PUT 200 5 Tips to Stay Ahead GET 200 The Secret 6th Tip GET 503
  • 4. Multiple Points of Failure APIs Can Mean Exponential New Failure Opportunities
  • 5. Multiple Points of Failure APIs Can Mean Exponential New Failure Opportunities Backend Systems • DB Servers/Caches • Hardware failures • Power hiccups • Incomplete reboots
  • 6. Multiple Points of Failure APIs Can Mean Exponential New Failure Opportunities Backend Systems Interconnections • DB Servers/Caches • Router failures • Hardware failures • Bad cables • Power hiccups • Severed internets • Incomplete reboots • Remote-hands fail
  • 7. Multiple Points of Failure APIs Can Mean Exponential New Failure Opportunities Backend Systems Interconnections External Deps • DB Servers/Caches • Router failures • Fail Whales • Hardware failures • Bad cables • Unannounced • Power hiccups • Severed internets upgrades • Incomplete reboots • Remote-hands fail • Random cloud latency
  • 8. Multiple Points of Failure APIs Can Mean Exponential New Failure Opportunities Backend Systems Interconnections External Deps • DB Servers/Caches • Router failures • Fail Whales • Hardware failures • Bad cables • Unannounced • Power hiccups • Severed internets upgrades • Incomplete reboots • Remote-hands fail • Random cloud latency
  • 9. The Retry Effect “Try Again in a Few Moments” = Right Now Successful Concurrent 600 450 Requests 300 150 Seconds
  • 11. Tip 1: Test It All Seriously, Test It All
  • 12. Tip 1: Test It All Seriously, Test It All Unit Tests Are Just the Beginning If you donʼt have them yet, start elsewhere
  • 13. Tip 1: Test It All Seriously, Test It All Unit Tests Are Just the Beginning If you donʼt have them yet, start elsewhere Test What Users Experience End-to-End Black Box tests
  • 14. Tip 1: Test It All Seriously, Test It All Unit Tests Are Just the Beginning If you donʼt have them yet, start elsewhere Test What Users Experience End-to-End Black Box tests Replay Your Access Logs More accurate than assumptions in unit tests
  • 15. Tip 1: Test It All Seriously, Test It All Unit Tests Are Just the Beginning If you donʼt have them yet, start elsewhere Test What Users Experience End-to-End Black Box tests Replay Your Access Logs More accurate than assumptions in unit tests Validate Return Payloads A stack trace is not valid XML
  • 16. Tip 2: Plan for Future Versions The Sun Will Come Up Tomorrow
  • 17. Tip 2: Plan for Future Versions The Sun Will Come Up Tomorrow Versions. Whoʼda thunk it? Yes, versioning is useful beyond the code powering your API.
  • 18. Tip 2: Plan for Future Versions The Sun Will Come Up Tomorrow Versions. Whoʼda thunk it? Yes, versioning is useful beyond the code powering your API. Versions Arenʼt Sexy/Semantic Do it anyway, & stand up straight.
  • 19. Tip 2: Plan for Future Versions The Sun Will Come Up Tomorrow Versions. Whoʼda thunk it? Yes, versioning is useful beyond the code powering your API. Versions Arenʼt Sexy/Semantic Do it anyway, & stand up straight. Announce Versions Often No one likes surprises when it comes to API behavior.
  • 20. Tip 3: Embrace Standards When Practical APIs Are Better When Predictable
  • 21. Tip 3: Embrace Standards When Practical APIs Are Better When Predictable Standard Approaches Mean Tools Itʼs easier to monitor anomalies on non-unique snowflakes.
  • 22. Tip 3: Embrace Standards When Practical APIs Are Better When Predictable Standard Approaches Mean Tools Itʼs easier to monitor anomalies on non-unique snowflakes. Avoid Uncomfortable Migrations No one wants an OAuthpocalypse.
  • 23. Tip 3: Embrace Standards When Practical APIs Are Better When Predictable Standard Approaches Mean Tools Itʼs easier to monitor anomalies on non-unique snowflakes. Avoid Uncomfortable Migrations No one wants an OAuthpocalypse. Enhance Runtime Validation Standards can make it easier to detect+reject bogus calls earlier in the request pipeline.
  • 24. Tip 4: Monitor Everything & Be Honest Slow Status Dashboards Suck More Than No Dashboard
  • 25. Tip 4: Monitor Everything & Be Honest Slow Status Dashboards Suck More Than No Dashboard Test It All, All the Time Better if you notice before your users notice.
  • 26. Tip 4: Monitor Everything & Be Honest Slow Status Dashboards Suck More Than No Dashboard Test It All, All the Time Better if you notice before your users notice. Trends Are Your Friends Canʼt spot trends without continuous monitoring
  • 27. Tip 4: Monitor Everything & Be Honest Slow Status Dashboards Suck More Than No Dashboard Test It All, All the Time Better if you notice before your users notice. Trends Are Your Friends Canʼt spot trends without continuous monitoring Fess Up Fast No user wants to think theyʼre your early-warning ops team.
  • 28. Tip 4: Monitor Everything & Be Honest Slow Status Dashboards Suck More Than No Dashboard Test It All, All the Time Better if you notice before your users notice. Trends Are Your Friends Canʼt spot trends without continuous monitoring Fess Up Fast No user wants to think theyʼre your early-warning ops team. Be Open Automatically Real-time public health instills trust.
  • 29. Tip 5: Fail Well Donʼt Ice Me, Bro
  • 30. Tip 5: Fail Well Donʼt Ice Me, Bro Well-formed Errors Win Friends Developers are more tolerant of failure if you anticipate the possibility.
  • 31. Tip 5: Fail Well Donʼt Ice Me, Bro Well-formed Errors Win Friends Developers are more tolerant of failure if you anticipate the possibility. Make Monitoring Easy The more obvious the failure, the easier it is to spot.
  • 32. Tip 5: Fail Well Donʼt Ice Me, Bro Well-formed Errors Win Friends Developers are more tolerant of failure if you anticipate the possibility. Make Monitoring Easy The more obvious the failure, the easier it is to spot. Donʼt Punish Everyone Determine who gets hurt most by failures, and screw them last (or not at all).
  • 34. Tip 6: Use an API Management Service Like ... Mashery!
  • 35. Tip 6: Use an API Management Service Like ... Mashery!
  • 36. Tip 6: Use an API Management Service Like ... Mashery! Managed API Service FTW Use a service with active monitoring and a support team. Let them call you first.
  • 37. Tip 6: Use an API Management Service Like ... Mashery! Managed API Service FTW Use a service with active monitoring and a support team. Let them call you first. Reports Covering Entire Ecosystem Make sure reports & analytics cover the entire spectrum of your APIʼs usage.
  • 38. Tip 6: Use an API Management Service Like ... Mashery! Managed API Service FTW Use a service with active monitoring and a support team. Let them call you first. Reports Covering Entire Ecosystem Make sure reports & analytics cover the entire spectrum of your APIʼs usage. Get Help Building Meaningful Community Nothing tells your developers you care like a community with a pulse.
  • 39. Did I Mention the Free Beer? Free beer as in FREE BEER. OSCON API Hour 7-9pm TONIGHT @ The EastBurn 1800 East Burnside Street Just a 5 minute cab ride. Mmm, beeer. And vintage games. Clay Loveless Chief Architect Wear Your OSCON Badge 2-3 drinks in, youʼll be happy clay@mashery.com everyone has nametags. Twitter: @claylo

Editor's Notes

  1. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  2. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  3. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  4. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  5. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  6. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  7. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  8. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  9. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  10. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT
  11. APIs Gone Wild API traffic just isn’t the same as website traffic. Yes, it’s HTTP, but the similarities stop there. - Lots of POSTs/PUTs/DELETEs - Nearly every call triggers a dynamic operation IN THE NEXT HALF HOUR, WE’LL COVER WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT