Update: As of February 2017, the latest version of Akamai Ion has introduced an even more powerful capability designed to help customers leverage the server push feature of H/2. Called "Automatic Server Push", and introduced as part of the new set of capabilities known as Adaptive Acceleration, this fully productized feature allows customers to turn on server push capabilities with the simple flick of a configuration switch. Using data from real users, Akamai's Intelligent Platform is able to determine which resources are common across user sessions, and automatically push those resources down to the browser ahead of the user request, resulting in faster time to first byte (TTFB). The specific implementation of server push described in this blog remains in beta, and was a preliminary step towards Akamai building a more intelligent and easier to use automatic server push capability that we continue to refine and build on.
To learn more about Adaptive Acceleration, and the steps for Ion customers to turn on the Automatic Server Push feature, head over to the Web Performance Community.
This blog post is part of an ongoing series where we will discuss a wide range of H2-related topics. In today's post we will discuss an exciting component of the new HTTP/2 protocol - server push.
At Akamai, we are always seeking ways to push the envelope when it comes to adopting new technology and making it readily available for our customers, which is why we were the first CDN to support HTTP/2 on our platform. In our effort to continue to embrace HTTP/2, we are excited to announce the beta for HTTP/2 Server Push capability.
What is Server Push?
Server Push allows a server to proactively send objects to a browser or a client for future use. One example we are excited about is how it can help improve performance of a web page. If a user requests for a base page or an index.html, there are css, js and image files that will be required to build and render the page, using server push you can now push these files down to the browser even before they are requested thus improving load and render times. Below is a snapshot of how pushing image tiles down to the browser improved page load times.
*based off Akamai's HTTP2 demo
How do you add server push to an Akamai setup?
Server Push behavior is provided in property manager that can be add to an Akamai setup today. Below is a configuration example that pushes "/staging/font-awesome-min.css" and "/main.js" when a user requests for "https://www.justanexample.com/staging/"
Deciding what to push?
Currently any embedded content within the same domain is allowed to be pushed, that means if a page called www.shop.com is being accessed then www.shop.com/main.js can be pushed but scripts.shop.com/main.js cannot. To define what resources need to be pushed, check the priority assigned to them within a web page by a browser and push high and medium priority ones. Priority assigned by Chrome for a resource can be checked if you enable "priority" as one of the columns within Chrome Dev tools
What if the content is already in browser cache?
A browser simply sends "no" with RST_STREAM to the server in this case. Here is how an Akamai server behaves when it's asked to push a resource.
*if browser has the pushed content in cache*
Akamai: May I push? sends PUSH_PROMISE
Browser: No, sends RST_STREAM
Akamai: (does nothing)
What do you need to be aware of?
Server push allows an edge server to push content to a client without having to wait for a request from a browser. This can improve page load times by pushing static assets down to the browser while Akamai fetches content from origin servers. Although if too many static assets are being pushed then it will exceed the bandwidth-delay product of the connection used by the device hence slowing down load times.
Who gets to play with this beta feature?
Server push behaviour will be available in beta channel for Akamai customers across Ion Premier, Ion Standard and Ion Media Advanced.
Contact your Akamai account team if you are interested in trying out Server Push today.
To learn more, go to: https://http2.akamai.com/
Additional reading on HTTP/2: