Skip to content

Instantly share code, notes, and snippets.

@minchao
Created October 30, 2020 09:10
Show Gist options
  • Select an option

  • Save minchao/78e2fe575d095d2b062ac9eafb953094 to your computer and use it in GitHub Desktop.

Select an option

Save minchao/78e2fe575d095d2b062ac9eafb953094 to your computer and use it in GitHub Desktop.

Revisions

  1. minchao created this gist Oct 30, 2020.
    68 changes: 68 additions & 0 deletions comparing-cloudfront-dynamic-content.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,68 @@
    Origin API:

    ```console
    $ httpstat 'https://journal.funlidays.com/api/discover/en/layouts/feature_list?offset=0&limit=20'
    Connected to 3.225.89.236:443 from 192.168.2.122:63579

    HTTP/1.1 200 OK
    Connection: keep-alive
    Server: nginx
    Date: Fri, 30 Oct 2020 09:08:17 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 8247
    Etag: W/"2037-k/cWlXBkKkwvoDExj2UM4V/1R3M"
    X-Dns-Prefetch-Control: off
    X-Xss-Protection: 1; mode=block
    X-Download-Options: noopen
    X-Frame-Options: SAMEORIGIN
    Strict-Transport-Security: max-age=15552000; includeSubDomains
    X-Content-Type-Options: nosniff
    Via: 1.1 vegur

    Body stored in: /var/folders/43/38tts5397755nczvdzp7h1b40000gn/T/tmpbJUa6D

    DNS Lookup TCP Connection TLS Handshake Server Processing Content Transfer
    [ 34ms | 197ms | 416ms | 240ms | 1ms ]
    | | | | |
    namelookup:34ms | | | |
    connect:231ms | | |
    pretransfer:647ms | |
    starttransfer:887ms |
    total:888ms
    ```

    CloudFront:

    ```console
    $ httpstat 'https://dies573x1oto4.cloudfront.net/api/discover/en/layouts/feature_list?offset=0&limit=20'
    Connected to 13.33.201.200:443 from 192.168.2.122:60749

    HTTP/2 200
    content-type: application/json; charset=utf-8
    content-length: 8247
    server: nginx
    date: Fri, 30 Oct 2020 09:02:29 GMT
    etag: W/"2037-k/cWlXBkKkwvoDExj2UM4V/1R3M"
    x-dns-prefetch-control: off
    x-xss-protection: 1; mode=block
    x-download-options: noopen
    x-frame-options: SAMEORIGIN
    strict-transport-security: max-age=15552000; includeSubDomains
    x-content-type-options: nosniff
    via: 1.1 vegur, 1.1 3df0e96570f640eae90deafa684398c8.cloudfront.net (CloudFront)
    vary: Accept-Encoding
    x-cache: Miss from cloudfront
    x-amz-cf-pop: TPE52-C1
    x-amz-cf-id: nBsKC2InBrM4mEXz7jqOtiT1cT1iqfhZ4Fu59w-hqdqJpOFVY3PSsw==

    Body stored in: /var/folders/43/38tts5397755nczvdzp7h1b40000gn/T/tmphxDmAn

    DNS Lookup TCP Connection TLS Handshake Server Processing Content Transfer
    [ 117ms | 6ms | 21ms | 775ms | 0ms ]
    | | | | |
    namelookup:117ms | | | |
    connect:123ms | | |
    pretransfer:144ms | |
    starttransfer:919ms |
    total:919ms
    ```