Response Time SLAs for APIs

2 113 megtekintés
Ugrás az első olvasatlan üzenetre

Joseph Anish Alex

olvasatlan,
2015. ápr. 23. 1:50:592015. 04. 23.
– api-...@googlegroups.com
Hi,

I wanted some views on how response time SLAs are defined for APIs. In our platform, we have a set of services that have a sort of chain dependency - i.e API A -> API B -> API C.. If we want to define an SLA for A, it is dependent on that of B and so on. Assume that API A is the one invoked by the client apps and they are bothered only about how good the response time of A is. How do we go about defining SLAs for each service and set the right expectations to clients? 

Thanks,
J

Chris Mullins

olvasatlan,
2015. ápr. 23. 16:28:422015. 04. 23.
– api-...@googlegroups.com
I think response time per API, as you're thinking about it, is not terribly useful once it's inside your service boundary. 

Instead think of it as a budget: Your overall SLA is 500ms. Once Service A calls Service B, you have a "x-time-remaining=351ms". When B calls C, you have a "x-time-remaining=125ms". And so forth, with the numbers there being actual calculated values based on elapsed time. If time remaining reaches 0, you can abandon the request, trigger an alarm, or otherwise figure out where your time is being spent. There are huge classes of requests that, when the remaining budget hits zero, are just abandoned - why bother finishing the work? Your behavior here will obvious depend on your time distrubutions...

Latency measurements are important at each stage, but only really matter close to the customer. 

Cheers,
Chris
Válasz mindenkinek
Válasz a szerzőnek
Továbbítás
0 új üzenet