How to Build a High Performing and Reliable Mobile API Ecosystem
September 11, 2017

Shlomi Gian
PacketZoom

Application Program Interfaces (API’s) represent an effective way to build and manage mobile services. By using APIs — a set of routines, protocols and tools for building software applications — application developers no longer have to buy technology software or hardware. Instead, they can simply plug into a growing open ecosystem of API-driven services. It is simple to integrate, and saves time and money for new developers.

There are countless mobile API-based services. From authentication, ads and payment APIs to price comparison and reporting API based services. The availability of these APIs made mobile app development much simpler, but this simplicity comes with a price.

Unlike images, game assets, videos and other type of static content, APIs are dynamic in nature and their content cannot be cached at the edge of the internet to increase download speed. Often times the result of an API call is customized per user profile, its location and the activity he/she is trying to accomplish. A user searching for a Mexican restaurant in downtown San Francisco will get a unique (non cacheable) search result.

There are three main challenges with existing API configurations that directly impact any mobile app performance:

Response Time
Since API responses are usually personalized, its content cannot be cached by the CDN. Some of the responses could be sizeable and include dozens of images that will have to be downloaded on a slow mobile connection. This impacts the API response time and eventually the mobile app.

Reliability
Mobile networks are less reliable than wired networks with Packet Loss and error rates that are 10-20 times higher. This affects not only the app API response time but most importantly its failure rates. Mobile developers have to factor into their code fail conditions and a proper way to handle each one of them, which can complicate things.

Server Load
There are two sources for high server load: (A) Failed transactions due to network error will usually follow by API call retry, keeping the server busier than it should be; and (B) API calls over slow connections means that the server has to keep connections open longer, consuming more resources than needed.

How could mobile developers mitigate the risk when using APIs?

While caching is not possible, one could accelerate an API call using a few techniques:

■ Protocol Optimization: By avoiding slow starts, backoffs and other TCP hiccups, downloading a sizeable API response could become faster. Traditional CDNs offer such an optimization in the middle mile for a premium price.

■ Routing Optimization: Speeding up access to the origin server API can be achieved through better routing of the request/response in the first and middle miles. Traditional CDNs can offer this for a premium price.

■ Persistent Connections: To avoid the “TCP handshake” overhead one could keep the connection open/warm and save a few round trips for each new request. This technique should be used carefully since overusing it will once again increase server load.

Unfortunately, since all the above techniques take place in a wired network (as opposed to the wireless link) the performance impact is marginally low while the cost (to various vendors) is not.

Most importantly, none of these techniques can be technically integrated with 3rd party APIs, unless the vendor operating the service is cooperating.

Shlomi Gian is CEO of PacketZoom

The Latest

September 20, 2018

The latest Accelerate State of DevOps Report from DORA focuses on the importance of the database and shows that integrating it into DevOps avoids time-consuming, unprofitable delays that can derail the benefits DevOps otherwise brings. It highlights four key practices that are essential to successful database DevOps ...

September 18, 2018

To celebrate IT Professionals Day 2018 (this year on September 18), the SolarWinds IT Pro Day 2018: A World Powered by Tech Pros survey explores a "Tech PROactive" world where technology professionals have the time, resources, and ability to use their technology prowess to do absolutely anything ...

September 17, 2018

The role of DevOps in capitalizing on the benefits of hybrid cloud has become increasingly important, with developers and IT operations now working together closer than ever to continuously plan, develop, deliver, integrate, test, and deploy new applications and services in the hybrid cloud ...

September 13, 2018

"Our research provides compelling evidence that smart investments in technology, process, and culture drive profit, quality, and customer outcomes that are important for organizations to stay competitive and relevant -- both today and as we look to the future," said Dr. Nicole Forsgren, co-founder and CEO of DevOps Research and Assessment (DORA), referring to the organization's latest report Accelerate: State of DevOps 2018: Strategies for a New Economy ...

September 12, 2018

This next blog examines the security component of step four of the Twelve-Factor methodology — backing services. Here follows some actionable advice from the WhiteHat Security Addendum Checklist, which developers and ops engineers can follow during the SaaS build and operations stages ...

September 10, 2018

When thinking about security automation, a common concern from security teams is that they don't have the coding capabilities needed to create, implement, and maintain it. So, what are teams to do when internal resources are tight and there isn't budget to hire an outside consultant or "unicorn?" ...

September 06, 2018

In evaluating 316 million incidents, it is clear that attacks against the application are growing in volume and sophistication, and as such, continue to be a major threat to business, according to Security Report for Web Applications (Q2 2018) from tCell ...

September 04, 2018

There's a welcome insight in the 2018 Accelerate State of DevOps Report from DORA, because for the first time it calls out database development as a key technical practice which can drive high performance in DevOps ...

August 29, 2018

While everyone is convinced about the benefits of containers, to really know if you're making progress, you need to measure container performance using KPIs.These KPIs should shed light on how a DevOps team is faring in terms of important parameters like speed, quality, availability, and efficiency. Let's look at the specific KPIs to track for each of these broad categories ...

August 27, 2018

Protego Labs recently discovered that 98 percent of functions in serverless applications are at risk, with 16 percent considered "serious" ...

Share this