News for hackers. Stuff that matters.
Re:Show HN: During the last week, I built a SPDY server. by pilif on Wednesday January 04, 2012 @04:40AM (#3423439)
IMHO, SPDY should be implemented on the frontend servers like varnish, HAProxy or nginx. If you do SPDY on the backend server, you cause a lot of additional problems:

1) your backend servers should use their hardware for actually running the web application, not for encrypting responses.

2) usually, your backend servers only serve the dynamically generated content. SPDY's biggest advantage is that it would allow to handle multiple requests in one connection, but this really shines for static assets (images, stylesheets) which in turn are rarely served by the backend.

3) Even if you want to do SPDY on the backend, your frontend proxies still have to support it, because that's what the clients are talking to.

So as it stands now, having SPDY on the backend server (or even in your application like this project here) doesn't really give you any of SPDY's advantages unless you begin serving all of your site directly from your application servers, which we learned over the last years, just doesn't scale as well.

Re:Show HN: During the last week, I built a SPDY server. by sokrates on Wednesday January 04, 2012 @06:19AM (#3423666)
The author here. I can understand that it's not clear from the README, but I only chose a Rack implementation for the backend in order to make developing those 'Adapters' easier for others, since Rack is pretty standard in the Ruby world. One of the implemented adapters, Proxy, acts a proxy to another HTTP server. In the performance section:

"[The results] show the power that lies in the simple addition of a SPDY server to an existing nginx/Thin configuration (and probably also Unicorn/nginx.)"

I am totally for the separation of front- and backend.

Re:Show HN: During the last week, I built a SPDY server. by ndrarmst on Tuesday January 03, 2012 @10:51PM (#3422662)
Great work. I'm not as up-to-date on SPDY servers as I should be, but this seems to be one of the few suited for non-trivial use cases.
Re:Show HN: During the last week, I built a SPDY server. by MikeCapone on Wednesday January 04, 2012 @12:17AM (#3422892)
Disclaimer: I am not a programmer or web guy.

Would this technology be beneficial to Hacker News? Is the site currently hosted on a SPDY-compatible server?

Re:Show HN: During the last week, I built a SPDY server. by i386 on Wednesday January 04, 2012 @12:20AM (#3422898)
Its only for Rack based apps (Ruby) and this website is written in pg's own lisp-like language. So, no :)
Re:Show HN: During the last week, I built a SPDY server. by MikeCapone on Wednesday January 04, 2012 @12:22AM (#3422904)
Maybe I'm confused; I thought SPDY was a HTTP replacement written by Google:

http://en.wikipedia.org/wiki/SPDY

Re:Show HN: During the last week, I built a SPDY server. by SpikeGronim on Wednesday January 04, 2012 @12:30AM (#3422925)
Yes, SPDY is a cross-platform protocol. This submission is a Ruby implementation of a SPDY server for Rack applications like Ruby on Rails. The news.ycombinator.com server is written in the arc language. SPDY is awesome.
Re:Show HN: During the last week, I built a SPDY server. by MikeCapone on Wednesday January 04, 2012 @12:49AM (#3422982)
Ok. It's my fault for not being clear in my original message. I wasn't talking about the linked SPDY implementation but about SPDY in general. Sorry, I should have marked it as OT.
Re:Show HN: During the last week, I built a SPDY server. by i386 on Wednesday January 04, 2012 @07:02AM (#3423762)
All good - we are all here to share knowledge :-)
Re:Show HN: During the last week, I built a SPDY server. by stingraycharles on Wednesday January 04, 2012 @12:56AM (#3423005)
No, HN is currently using the regular HTTP protocol. In my opinion, the costs of implementing SPDY support, at the moment, outweigh the benefits of that support.
Re:Show HN: During the last week, I built a SPDY server. by wmf on Wednesday January 04, 2012 @12:56AM (#3423006)
SPDY benefits pages that make many requests (lots of CSS, JS, images, etc.); HN doesn't have any of that so no.
Re:Show HN: During the last week, I built a SPDY server. by nextparadigms on Wednesday January 04, 2012 @01:23AM (#3423063)
I don't know why, but I find HN pretty slow for a page that only shows 30 links. Engadget takes about half the time to load. Granted this is with Adblock and WidgetBlock, which I use to block all 3rd party connections besides Disqus, but HN doesn't use any of that anyway, so it's still strange.
Re:Show HN: During the last week, I built a SPDY server. by forgotusername on Wednesday January 04, 2012 @02:07AM (#3423148)
HN does no output buffering, causing rendering time to often be closer to 5 seconds than 100ms in Europe. This is trivial to fix, but I guess the SFO crowd don't feel the pain so it probably never will.

Edit: nope, that's not it. Using the fastest UK machine with clean net available to me, tcpdump never shows more than 1 unacked packet on the wire at any time, gzip is turned off, and keepalive is turned off. Gzipping the 24k home page drops it to 4.3k.

None of this really accounts for the crazy jitter we see in Europe while rendering the main table.

Re:Show HN: During the last week, I built a SPDY server. by EwanToo on Wednesday January 04, 2012 @04:30AM (#3423414)
Sat in the UK I don't see anything like a 5 second render time for HN, maybe 1 second at most.

For me:

The top half of the page draws instantly in Chrome, then the bottom half.

In firefox, the page draws incrementally, line by line.

In IE9, the whole page draws pretty much instantly, much quicker than FF or Chrome for me.

Re:Show HN: During the last week, I built a SPDY server. by resnamen on Wednesday January 04, 2012 @01:37AM (#3423087)
Wouldn't fix all the "unknown or expired links"!
Re:Show HN: During the last week, I built a SPDY server. by dextorious on Wednesday January 04, 2012 @07:36AM (#3423854)
Well, re: speed and lack of bugs, HN is really not the best showcase for functional languages in web programming...
Re:Show HN: During the last week, I built a SPDY server. by chetan51 on Wednesday January 04, 2012 @03:28AM (#3423301)
Stupid question, but what are the advantages of SPDY? And how should the average hacker use it?
Re:Show HN: During the last week, I built a SPDY server. by latch on Wednesday January 04, 2012 @04:02AM (#3423359)
speed and security.

Headers are gziped, concurrent request on a single TCP session, everything over ssl and some push capabilities.

Re:Show HN: During the last week, I built a SPDY server. by WALoeIII on Wednesday January 04, 2012 @12:03AM (#3422856)
This is great! Nice work!