DAGDA SEARCH | Back to results | Support

Cloud PyPI / Example CDN - Python Wiki

Source: https://wiki.python.org/python/packaging/CloudPyPI/ExampleCDN.html

  1. Python Wiki /
  2. Python Wiki /
  3. Packaging /
  4. Cloud PyPI /
  5. Cloud PyPI / Example CDN
View as Markdown

Cloud PyPI / Example CDN

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

Cloud PyPI – Example CDN

In order to test drive a PyPI CDN, we’ve setup an example CDN on Amazon Cloudfront for pypi.python.org.

Settings

These are the settings:

As a result, the CDN is only available over HTTPS (there’s no redirect in place) and the content is fetched from PyPI using HTTPS as well.

The TTL is set to a low value for testing purposes. For a deployment, the value can be set to a much higher value for the package pages; and a lower value for the /simple/ index itself.

Note: Without cache headers in the PyPI response (it currently doesn’t send cache headers), the default TTL for the cache retention is 24h, according to the Amazon documentation.

Example fetching the /simple/ index

First request:

200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1323539
Connection: keep-alive
Server: nginx/1.1.19
Date: Thu, 28 Feb 2013 13:56:22 GMT
Strict-Transport-Security: max-age=86400
X-Amz-Cf-Id: vXAxMoustlCxyzFAVjjg3EUJG5OgP-ALefiF1mbvbJlW9ZsHCxtdLg==
Via: 1.0 3dee24f419c49cc32df542a9410fda87.cloudfront.net (CloudFront)
X-Cache: Miss from cloudfront

Second request:

200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1323539
Connection: keep-alive
Server: nginx/1.1.19
Date: Thu, 28 Feb 2013 13:56:22 GMT
Strict-Transport-Security: max-age=86400
Age: 337
X-Amz-Cf-Id: -2COLjgkKLDF83jrr0iFahyAO4UGOMB0hXNM_ROMFJQpII1goFyi-A==
Via: 1.0 3dee24f419c49cc32df542a9410fda87.cloudfront.net (CloudFront)
X-Cache: Hit from cloudfront

Issues found in the experiment

PreviousCloud PyPI Next Cloud PyPI / Proposal