My previous post used CURL component metrics to illustrate performance in calling the World Bank Countries API (located in Washington, D.C.) from Oregon. The curl resolve, connect, processing, and transfer times for calls from Oregon over a period of one week were plotted and analyzed. Here is the plotted Oregon data:
The conclusion from studying this plot is that Resolve Time is generally the primary determining factor in how long it takes to complete a call; however, Processing Time is sometimes the determining factor.
The Python script that was run for the Oregon calls was also run for calls to the World Bank during the same week from Washington, D.C., Ireland, and Japan. All of the data was downloaded in JSON format from the API Science Performance Report API.
The calls from Ireland performed similarly to the calls from Oregon:
The data similarity is somewhat obscured because the plot scale runs past 3000 milliseconds to accommodate a single very long call that occurred during the week. Still, it can be seen that both Connect and Transfer times are relatively fixed; Processing Time has a base value that is occasionally exceeded; and Resolve Time typically rises with total call time. The conclusion again is that in calls to the World Bank from Ireland, Resolve Time is usually the determining factor in total processing time, but sometimes Processing Time dominates the call.
It turns out that this pattern is also evident in calls from Washington, D.C.:
Here, we are calling a Washington, D.C. API from within D.C. itself. The distance between calling server and API server is miles, not thousands of miles as is the case for Oregon and Ireland. So as expected, the total time for completing the calls from Washington, D.C. is much lower.
Still, the same timing patterns are evident: Connect and Transfer times are fairly constant; Processing Time has a base but sometimes occupies much longer; and Resolve Time is typically the longest component time and hence the determining factor in the total time for the call to complete.
The plot for calls from Japan stands out compared with the other plots. However, the same timing patterns apply.
Again, Connect and Transfer times are constant; Processing Time is mostly constant but with some significant outliers; and Resolve Time is the timing component that most influences the total call time in most cases.
The conclusion from these plots is that performance in calling the World Bank Countries API from various locations around the world is primarily dependent on Resolve Time. The minimum time for a call to complete is the case where Resolve Time is minimal. From all locations, Resolve Time varies much more than Connect, Transfer, and Processing times.
This suggests that Resolve Time for crucial APIs is an important consideration for any company whose product depends on external APIs. The quickness of resolving the address of your external API servers will have a significant effect on the overall performance of your product.