2. What is Server Push?
• One of the features of HTTP/2
• Allows sending resources to a client before the
client requests them
• Avoids additional round trips
• May reduce time to first paint
• if we could use it wisely
3. How does it work?
Server Push
GET /index.html
GET /index.html
Client Intermediate Origin server
index.html
index.html
4. How can we use it on TS?
• TSHttpTxnServerPush
• Introduced since 7.0
• Experimental
• An example plugin is available
#include <ts/experimental.h>
void TSHttpTxnServerPush(TSHttpTxn txnp, const char *url, int url_len)
6. What will be a problem?
Server Push
GET /index.html
GET /index.html
?
We don’t know which resources we should push.
The client may already have the resource.
The push may delay the response from an origin.
7. What can we do?
• Use Manifest files
• Use Link header
• Use Link element in a HTML document
• Use Cache Digests (a.k.a CASPER)
• Also needs client side implementation
• Use AI (machine learning)
Simple
Complex
8. Future plan
• Add experimental plugins
• Add Server Push metrics (maybe 7.1.0)
• Brush up the API
• Show some results in the next summit
9. Summary
• Server Push MAY increase performance
• Server Push CAN decrease performance
• Server Push API is available since TS 7.0
• Server Push may be too complicated for human beings
WE NEED YOUR FEEDBACK!
11. References
• HTTP/2 Server Push
• https://tools.ietf.org/html/rfc7540#section-8.2
• Link header & Link element
• https://www.w3.org/TR/preload/
• Cache Digests
• https://tools.ietf.org/html/draft-ietf-httpbis-cache-digest-00
• Akamai - Are you ready for HTTP/2 Server Push?!
• https://blogs.akamai.com/2016/04/are-you-ready-for-http2-server-push.html
• Cloudflare - Announcing Support for HTTP/2 Server Push
• https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
• Fastly
• https://www.fastly.com/blog/announcing-limited-availability-http2