Introduction to API analytics
One of the hardest things for any data driven engineer is to answer “Are these numbers any good?” We are drowning in data from various SaaS tools, but sometimes we just want to know what a normal range is.
For example, you can investigate the average latency for your API over time, but how do you benchmark against “standard” metrics for a API?
Welcome to the Summer 2018 - State of API Usage Report. We analyzed billions of API calls to guide you build the correct API and give you a benchmark to think about.
Metrics on types of APIs
API Developers by Programming Language
The below chart is the SDK or language used by Moesif customers.
API Developers by programming language
While NodeJS is still the undisputed king for building APIs driven by a rich ecosystem with frameworks like express and Reach, what really surprised us was how popular Python got in 2018. More engineers are publishing Python APIs which can be fueled by the recent machine learning craze. Scikit-learn, PySpark, and TensorFlow are extremely popular ML frameworks that enable anyone to create a model from the Pickle or ProtoBuf file which can then be published via a simple REST API. In fact, we have published a few inference APIs using Python and Flask at Moesif.
API Calls by Content Type
We kept both the type and encoding to get a breakdown of who sets the encoding part. Majority of frameworks today will try with UTF-8 if not set.
Percent of APIs by Content-Type
Is GraphQL popular?
While GraphQL has received a lot of press, we have seen a lot of developers hesitant to moving to GraphQL. At the same time, 2018 will be the year for GraphQL, and number of new open GraphQL APIs being published is accelerating.
Percent of APIs using GraphQL
What is Moesif? Moesif is the most advanced API analytics platform used by over 2000 companies to improve their API and customer metrics. Moesif has open-sourced middleware and SDKs for the languages you love.
API performance metrics
Is Keep Alive common?
Keep Alive is a common trick for servers calling other servers to keep the HTTP connection open for future calls. This reduces latency for subsequence calls such as an API server communicating with a database server.
While keep alive can be very beneficial in server to server, in applications where there are many clients, but each sends only a few or only one request, then the server would waste resources keeping connections open that are never reused.
Percent of API Calls by Connection
Average latency for API Calls
Keep in mind, some APIs are server-to-server calls on the same network or is designed for very low latency (such as our Collection API) which will have single digit latency in milliseconds.
Average API call latency histogram
We see that 28% of API Calls complete within 500 ms. However, there is a long tail for latency. Potential pitfalls are not configuring timeouts (There are libraries out there that have 60 minute timeouts) or issues with database indexing.
Let us know if there is a specific metric you’re interested in. We’re always open to sharing more data as long as it OK.
Do you spend a lot of time debugging customer issues?
Moesif makes debugging easier for RESTful APIs and integrated apps