• Save
Whiskey, Tango, Foxtrot: Understanding API Usage
Upcoming SlideShare
Loading in...5
×
 

Whiskey, Tango, Foxtrot: Understanding API Usage

on

  • 3,231 views

Launch an API that can survive! Learn about unexpected load recovery techniques, analytic best practices and testing approaches to make sure your API runs smoothly & thrives with these tips from the ...

Launch an API that can survive! Learn about unexpected load recovery techniques, analytic best practices and testing approaches to make sure your API runs smoothly & thrives with these tips from the trenches. Clay Loveless is Mashery's Chief Architect, the leading API management solution provider. With over 100 high-volume API customers, Mashery manages a broad range of enterprise API deployments.

Statistics

Views

Total Views
3,231
Views on SlideShare
3,220
Embed Views
11

Actions

Likes
2
Downloads
0
Comments
0

4 Embeds 11

http://www.oscon.com 5
http://lanyrd.com 4
http://www.linkedin.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • APIs Gone Wild <br /> <br /> API traffic just isn&#x2019;t the same as website traffic. Yes, it&#x2019;s HTTP, but the similarities stop there. <br /> - Lots of POSTs/PUTs/DELETEs <br /> - Nearly every call triggers a dynamic operation <br /> <br /> IN THE NEXT HALF HOUR, WE&#x2019;LL COVER <br /> WHAT HAPPENS AND 5 TIPS TO STAY AHEAD OF IT <br /> <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Whiskey, Tango, Foxtrot: Understanding API Usage Whiskey, Tango, Foxtrot: Understanding API Usage Presentation Transcript

  • 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