AMP Cache Sandeep Davu What is AMP Accelerated

  • Slides: 10
Download presentation
AMP Cache Sandeep Davu

AMP Cache Sandeep Davu

What is AMP?

What is AMP?

= Accelerated Mobile Pages AMP is an open standard developed by Google to make

= Accelerated Mobile Pages AMP is an open standard developed by Google to make the mobile web faster. 1 AMP HTML 2 AMP Viewer HTML with some restrictions and AMP extensions • Prefetch and Prerender AMP page in a customized i. Frame. • Static layout • Fetch content in parallel. • Inline CSS 3 AMP Cache • Only Cache and Serve AMP Content. • Google and Cloudflare the AMP Caches available for now. • No <script> tags 3

Cache 4

Cache 4

Why AMP ? • To give user a consistent Yahoo Experience even for third

Why AMP ? • To give user a consistent Yahoo Experience even for third party content. • To keep the user on the Yahoo Homepage

What More? ● We want to keep the content in-house ● How? Host our

What More? ● We want to keep the content in-house ● How? Host our own AMP Cache ● Why? Own the metrics. Do custom optimizations. ● Drive publishers to come to Yahoo for AMP Cache support.

AMPCache Architecturewant to be?

AMPCache Architecturewant to be?

AMP Cache Layer 1 ATS ● AMP requests are routed through AMP Cache. ○

AMP Cache Layer 1 ATS ● AMP requests are routed through AMP Cache. ○ www-reuters-com. amp. yimg. com/c/s/www. reuters. com/sample. html ○ www. yahoo. com/amphtml/sample. html ● ATS Remap lua plugin Computes query URL to pass to validator ○ amp-validator. yahoo. com/? url=www. reuters. com/amphtml/sample. html ○ Send the request through Caching Layer 2 caching Layer ● Carp for sending to the right node. ● SWR for updating the Cache. ● Caches valid responses from AMP Validator.

AMP Validator ● ● Ensure cache only contains valid AMP pages Express Service that

AMP Validator ● ● Ensure cache only contains valid AMP pages Express Service that uses open source amp-validator NPM package. Sends the AMP request to the origin servers based on the query URL. Validates the response before sending it back to ATS ○ Else transforms response to display errors

Future Plans ● AMP Cache Update API ○ Publishers can perform CRUD operations on

Future Plans ● AMP Cache Update API ○ Publishers can perform CRUD operations on their cached resources in our AMP cache ○ example-com. cdn. ampproject. com/updatecache/example. com/c/s/sample. html? amp_action=flush&amp _url_signature=<sig_val> ● Security - CSP ○ Safeguard against XSS and data injection. ● Get Certified with Google ○ CORS headers.