polyfill-service
Version:
A polyfill combinator
83 lines (65 loc) • 2.94 kB
HTML
{{>header}}
{{>nav}}
<div class="o-techdocs-main o-techdocs-content">
<h1>Usage and performance</h1>
<p>The public instance of the polyfill service is hosted by the Financial Times, with the generous support of Fastly, who provide CDN distribution. <a href='http://www.fastly.com/network/'>View Fastly network map</a></p>
{{#if requestsData}}
<h3>Traffic volume</h3>
<p>This shows the number of requests we have served per day, over the last 180 days, measured by <strong>Fastly</strong>:</p>
<div id="chart-requests" class='o-techdocs-content'>
<table class='chart-data o-techdocs-table'>
<thead><tr><th>Date</th><th>Requests</th></tr></thead>
<tbody>
{{#requestsData}}
<tr><td>{{prettifyDate date}}</td><td>{{requests}}</td></tr>
{{/requestsData}}
</tbody>
</table>
</div>
<div class='o-grid-row' style='margin: 0 -10px'>
<div data-o-grid-colspan='S12 L4'>
<h3>Performance</h3>
<p>Mean global response time, ms, from <strong>Pingdom</strong>:</p>
<div id="chart-resptime" class='o-techdocs-content'>
<table class='chart-data o-techdocs-table'>
<thead><tr><th>Date</th><th>Response time (ms)</th></tr></thead>
<tbody>
{{#respTimes}}
<tr><td>{{prettifyDate date}}</td><td>{{respTime}}</td></tr>
{{/respTimes}}
</tbody>
</table>
</div>
</div>
<div data-o-grid-colspan='S12 M6 L4'>
<h3>Caching</h3>
<p>Hit ratio, last 7 days, from <strong>Fastly</strong>:</p>
<div id="chart-hitratio" class='o-techdocs-content'>
<table class='chart-data o-techdocs-table'>
<thead><tr><th>Cache result</th><th>Requests</th></tr></thead>
<tbody>
<tr><td>Hits</td><td>{{hitCount}}</td></tr>
<tr><td>Misses</td><td>{{missCount}}</td></tr>
</tbody>
</table>
</div>
</div>
<div data-o-grid-colspan='S12 M6 L4'>
<h3>Availability</h3>
<p>Total downtime, according to <strong>Pingdom</strong>:</p>
<div class='o-techdocs-content'>
<table class='outages o-techdocs-table'>
<tr><th>Last 30 days</th><td>{{prettifyDuration downtime.30d}}</td></tr>
<tr><th>Last 3 months</th><td>{{prettifyDuration downtime.3m}}</td></tr>
<tr><th>Last 12 months</th><td>{{prettifyDuration downtime.12m}}</td></tr>
</table>
</div>
</div>
</div>
<p>Caching responses that vary by <code>User-Agent</code> is very hard to do with good cache performance. We use a <a href='http://labs.ft.com/2014/10/caching-user-agent-specific-responses-with-fastly/'>custom Fastly VCL configuration</a> that separates the UA normalisation from the polyfill bundle.</p>
{{else}}
<p><em>Usage stats cannot be shown, probably because you need to configure the environment variables needed to get data from the Fastly and Pingdom APIs. The specific error thrown by the service is shown below:</em></p>
<pre><code>{{msg}}</code></pre>
{{/if}}
</div>
{{>footer}}