Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Make a request to any zappos.com page and look at the response headers. Found this while checking out their site prior to flying out there.

They've got flair.



I should do this more often. Look at the wealth of information returned in the headers:

1) They're using nginx (which is powered by Ponies!) 2) The site is fronted by varnish with a ttl of 1 hour, of which there appear to be at least 4 varnish servers. 3) Links to the various CSS files. Do browsers actually use these headers instead of the <link>s in the html? 4) Drupal is somewhere in the mix. 5) Mention one of the company core values, of which there are at least 8. 6) Anyone geeky enough to be reading this should apply for a job.

  $ lwp-request -e -d  www.zappos.com
  200 OK
  Cache-Control: max-age=2452
  Connection: close
  Connection: Transfer-Encoding
  Date: Thu, 02 Feb 2012 23:53:38 GMT
  Server: nginx/1.1.14
  Content-Type: text/html; charset=utf-8
  Client-Date: Thu, 02 Feb 2012 23:53:39 GMT
  Client-Peer: 203.206.129.48:80
  Client-Response-Num: 1
  Client-Transfer-Encoding: chunked
  Link: </favicon.ico>; rel="shortcut icon"; type="image/ico"
  Link: </styles/main.p.20120201135153.css>; media="screen"; rel="stylesheet"; type="text/css"
  Link: </css/print.20120115152845.css>; media="print"; rel="stylesheet"; type="text/css"
  Link: </styles/home.p.20120201135153.css>; media="screen"; rel="stylesheet"; type="text/css"
  Link: </>; rel="canonical"
  Title: Shoes, Clothing, and More | Zappos.com
  X-Cache-Hits: 117
  X-Core-Value: 8. Do More With Less
  X-Meta-Description: Free shipping BOTH ways on shoes, clothing, and more! 365-day return policy, over 1000 brands, 24/7 friendly customer service. 1-800-927-7671
  X-Meta-Keywords: index, zappos, zeta, clothing, shoes
  X-Powered-By: Ponies!
  X-Recruiting: If you're reading this, maybe you should be working at Zappos instead.  Check out jobs.zappos.com
  X-UUID: 970dff52-4df6-11e1-a3ab-001a645b7cf4
  X-Varnish: 1001890813 1001890584
  X-Varnish-Host: varnish04.zappos.net
  X-Varnish-ID: drupal
  X-Varnish-TTL: 60m


Re: the link headers, see the HTML 4 spec [0] & RFC 5988 [1]. They're only supported by Firefox and Opera at the moment [2] though.

[0] http://www.w3.org/TR/html4/present/styles.html#h-14.6

[1] http://tools.ietf.org/html/rfc5988

[2] http://greenbytes.de/tech/tc/httplink/


No wonder Google added header compression to SPDY.


> X-Core-Value: 8. Do More With Less

That's 1.3K of overhead per request. I call that doing Less with More. Recruiting in HTTP headers may seem like a clever gimmick to some, but I doubt it could possibly warrant the aggregate degradation of performance. If that's what they call doing "More with Less", my reaction is hardly an urge to work with them.


Huh? How is this 1.3K? Looks like 34B to me...


I believe Mr. Username was talking about the entire header block (1322B).

(I still think he's wrong, however.)


Yes, I measured the size of the HTTP headers. It's not a subjective measurement. It's not 1322 bytes; it's 1275 bytes. 1322 looks like you forgot to remove the indentation that was added above for code formatting. 1275 bytes == 1.3K.


  $ lwp-request -e -d  www.zappos.com |wc
     29     128    1299
Where do you get 1275? In any case, you can't consider all of this waste. Some of it is necessary (the connection headers, content-type, some of it is a performance improvement for a subset of clients (the link headers, etc.) and a small percent is waste (X-Recruiting etc.)


I measured the headers in ajtaylor's above post. Zappos delivers different headers each time, and currently they're only giving me 599 bytes, including zero Link headers.

I agree of course that you can't consider all of it a waste. My point was just that their HTTP overhead is exceptionally large, and their superfluous headers adversely affect all of their users despite the fact that almost none of their users will ever read them.

The fact that their X-Core-Value in ajtaylor's example was "8. Do More With Less" makes them seem clueless about the real impact of HTTP overhead.


> Links to the various CSS files

I'm glad you asked that because I had a momentary panic attack over whether I've been doing this correctly...


curl --head http://www.zappos.com/

It's worth doing yourself because they give different messages with each request in fields like X-Core-Value but here's an example for the lazy:

    HTTP/1.1 200 OK
    Server: nginx/1.1.14
    Content-Type: text/html; charset=utf-8
    X-Powered-By: Ponies!
    X-Varnish-TTL: 60m
    X-Varnish: 1001887650 1001881441
    X-Cache-Hits: 2832
    X-Varnish-Host: varnish04.zappos.net
    X-Varnish-ID: drupal
    X-Core-Value: 4. Be Adventurous, Creative, and Open-Minded
    X-Recruiting: If you're reading this, maybe you should be working at Zappos instead.  Check out jobs.zappos.com
    X-UUID: c687de54-4df3-11e1-b455-00215e22da70
    Cache-Control: max-age=583
    Date: Fri, 03 Feb 2012 00:05:21 GMT
    Connection: keep-alive


The first site I heard of putting fun stuff in the HTTP headers was Slashdot (randomly-selected Futurama quotes).

Back when I was using usenet I'd insert some X-headers of my own.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: