Akamai Diversity

The Akamai Blog

Mobile Request Multiplexer on the Edge

Over the last few years, the massive growth of smart phones and connected devices has been a key force in driving the hyperconnected paradigm. Cisco projects global mobile traffic will grow 18X in the next five years. At the same time, user reliance and expectations on mobile device are higher than ever. According to Equation Research, 71% of mobile web users expect website performance on their mobile phones to be equal to, or better than, what they experience on their desktops -- up from 58% in 2009.

With the limitations posed by cellular networks and device capabilities, companies face serious challenges when deploying a high-performance mobile solution. Although TCP (Transmission Control Protocol: en.wikipedia.org/wiki/Transmission_Control_Protocol) was designed to work with fixed-line Internet, it does not perform well on mobile networks. Performance is variable and susceptible to degradation based on location and environment. It is difficult for a TCP protocol to detect congestion and perform reliable congestion avoidance due to high packet loss. Additional overheads such as DNS query and TCP slow start further amplify the slowdown for pages containing multiple small objects.

One way to address the above issues is to allow concurrent HTTP requests to run across a single TCP session. This improves page load time over the standard HTTP protocol, but with minimal modifications to the client logic and no deployment changes on the server side. It loosely replicates the stream multiplexing feature inside the SPDY (en.wikipedia.org/wiki/SPDY) protocol, but can support both the HTTP and HTTPS protocols without additional client extensions or server support.  It can be best leveraged by mobile applications that require a high frequency of small object retrieval, such as maps, online catalogs, or social networking sites.

One solution is for clients to request multiple objects (e.g. images) via a single POST (http://en.wikipedia.org/wiki/POST_(HTTP))request to an edge server. Upon receiving the request, the edge server will fetch and store objects for packaging and delivery. The POST body included with the client request contains a list of encoded URLs. The edge server functions as a multiplexer/de-multiplexer in front of the existing Akamai delivery infrastructure. These processors are implemented by using Akamai's Edge Side Include (ESI) markup language. The de-multiplexer (pre-processor) will parse out HTTP POST payload, which will be in a structured format and retrieve the specified assets asynchronously from the origin web server. As the assets are retrieved successfully, the multiplexer (post-processor) will serialize the assets along with some minimal addition information (asset identifier, asset length) using a structured binary format and respond to the client with a standard, un-buffered HTTP response. The edge server can also cache the individual assets to improve delivery performance and origin offload.

After the client receives the request, it extracts individual objects from the HTTP response based on the embedded identifiers, and performs page rendering.



for blog1.png

We set up a lab test to benchmark the performance between a request- multiplex solution and a serialized HTTP request flow. The test involved downloading 10 small jpeg files (~6KB each/70K total) from a single domain over a typical shared WIFI network and a 3G-enabled mobile phone.  We ran the tests 5 times for each method, and took the average total load time. The results show that a multiplex solution has significant speed improvement over standard FIFO request chaining.

 

WIFI

(Average ms)

3G Mobile

(Average ms)

Typical Browser Requests

474

8770

Request Multiplex Solution

382

2970

Improvements

19.4%

66.1%


The lab results are promising. By multiplexing concurrent requests into a single POST and leveraging Akamai Edge processing, the client is able to significantly reduce mobile network connections and associated HTTP overhead (e.g. DNS, header, cookies), leading to quicker page load time and a better user experience.

Eugene Zhang is a Senior Enterprise Architect with Akamai's Professional Services organization, and is an expert on web performance optimization.

1 Comment

This is just great! Was looking for something like this to download FB avatars faster over cellular connection.

Can you post some examples on your article? Either format of POST request and how to parse multiply images in response?

Thanks in advance.

Leave a comment