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

July 16, 2018

The key to mainframe DevOps success is in quickly identifying and removing major bottlenecks in the application delivery lifecycle. Major challenges include collaboration between mainframe and distributed teams, lack of visibility into the impact of software changes, and limited resource flexibility with scaling out necessary testing initiatives. Now let's take a closer look at some of these key challenges and how IT departments can address them ...

July 11, 2018

How much are organizations investing in the shift to cloud native, how much is it getting them? ...

July 10, 2018

In the shift to cloud native, many organizations have adopted a configuration-as-code approach. This helps drive up application deployment velocity by letting developers and DevOps teams reconfigure their deployments as their needs arise. Other organizations, particularly the more regulated ones, still have security people owning these tools, but that creates increased pressure on the security organization to keep up. How much are organizations investing in this process, and how much is it getting them? ...

June 28, 2018

More than a third of companies that use serverless functions are not employing any application security best practices and are not using any tools or standard security methodologies to secure them, according to the State of Serverless Security survey, conducted by PureSec ...

June 27, 2018

The popularity of social media platforms and applications is spurring enterprises to adopt "social business" models to better engage with employees and customers and improve collaboration, according to a new study published by ISG ...

June 25, 2018

The previous chapter in this WhiteHat Security series discussed Codebase as the first step of the Twelve-Factor App and defined a security best practice approach for ensuring a secure source control system. Considering the importance of applying security in a modern DevOps world, this next chapter examines the security component of step two of the Twelve-Factor methodology. 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 ...

June 21, 2018

DevSecOps is quickly gaining support and traction, within and beyond information security teams. In fact, 70% of respondents believe their culture can embrace the change needed to fuse Security and DevOps, according to a new survey of 80 security professionals by Aqua Security ...

June 20, 2018

The larger the company size, the higher the proportion of low IT performers, according to the State of DevOps: Market Segmentation Report from Puppet, based on the 2017 State of DevOps Survey data ...

June 18, 2018

An overwhelming 83 percent of respondents have concerns about deploying traditional firewalls in the cloud, according to Firewalls and the Cloud, a survey conducted by Barracuda Networks...

June 14, 2018

Despite the vast majority of cloud management decision-makers believing that DevOps and microservice enablement are important, very few believe that their organizations are capable of delivering them today — a gap that is costing the average enterprise $34 million per year, according to new report from the Ponemon Institute ...

Share this