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

With all respect to the people in taobao, but this is different. The whole page (without css, JavaScript and images) in facebook case generated through one http request. In your case, they use Ajax to get content through serveral http requests. IMHO the facebook method is better. It avoid http request overhead and parallized steps as many as possible.


You must have missed ngx_echo module, because it's the part that makes this exactly as described in Facebook's BigPipe blog post.

I've prepared simple proof-of-concept configuration for nginx:

http://labs.frickle.com/misc/nginx_bigpipe.conf

As you can notice, every "sub-page" is generated individually. Using presented configuration everything is chunked and flushed, so it will be sent to the client right away. Response on the client side looks like this:

http://labs.frickle.com/misc/nginx_bigpipe.output

DISCLAIMER: I don't know how Taobao is using released modules internally or if they use them in production already (but I know some portals do).




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

Search: