Ask HN: Why and how is Hacker News so fast?
21–30 of 110 posts
Re: Ask HN: Why and how is Hacker News so fast?
#22In addition to being so small (text-based, minimal JS), HN is cached by CloudFlare, which grabs copies of dynamic pages and pushes those copies out to their CDN edge servers around the globe so they're closer to end users. When your browser asks for the IP to news.ycombinator.com, you get the address of a cloudflare CDN server. Which web server the DNS server will send you is based on a GeoIP lookup of your own IP ad…
We don't actually use GeoIP at the DNS level, we use the routing table of the internet to direct people to the closest location we have to them by announcing the same IP addresses in the routing table in many places (eg, anycast) You can find a blog post primer and general more explanation here: https://blog.cloudflare.com/cloudflares-architecture-elimina...
the upshot of this is that TCP and SSL connections start faster because of lower latency to our location, and we can pull items out of cache faster and give them to the client.
Re: Ask HN: Why and how is Hacker News so fast?
#23In addition to being so small (text-based, minimal JS), HN is cached by CloudFlare, which grabs copies of dynamic pages and pushes those copies out to their CDN edge servers around the globe so they're closer to end users. When your browser asks for the IP to news.ycombinator.com, you get the address of a cloudflare CDN server. Which web server the DNS server will send you is based on a GeoIP lookup of your own IP ad…
Re: Ask HN: Why and how is Hacker News so fast?
#24Re: Ask HN: Why and how is Hacker News so fast?
#25If you want to see an even faster "forum", see http://forum.dlang.org/
Re: Ask HN: Why and how is Hacker News so fast?
#26Loading this webpage I downloaded ~12KB. For comparison, I went to the NYT homepage and downloaded ~1.2 MB. For people with shitty downlinks like you and I, the absence of exorbitant quantities of Javascript and images makes a lot of difference - a lot more than time-to-first-byte.
that 1.2Mb gets cached. Infact that will make the site faster because once the .js are downloaded only json/partials will be fetched when visited again. It must be the backend ,ie when tasked to render the same page ,which backend would respond faster
It's the number of requests that's killing the NYT site. HN is very simple and old school, and doesn't do a single thing that isn't explicitly necessary to render exactly the content you see on the page, which is presented cleanly and without frills.
Re: Ask HN: Why and how is Hacker News so fast?
#27Loading this webpage I downloaded ~12KB. For comparison, I went to the NYT homepage and downloaded ~1.2 MB. For people with shitty downlinks like you and I, the absence of exorbitant quantities of Javascript and images makes a lot of difference - a lot more than time-to-first-byte.
Re: Ask HN: Why and how is Hacker News so fast?
#28If you want to see an even faster "forum", see http://forum.dlang.org/
Re: Ask HN: Why and how is Hacker News so fast?
#29In addition to being so small (text-based, minimal JS), HN is cached by CloudFlare, which grabs copies of dynamic pages and pushes those copies out to their CDN edge servers around the globe so they're closer to end users. When your browser asks for the IP to news.ycombinator.com, you get the address of a cloudflare CDN server. Which web server the DNS server will send you is based on a GeoIP lookup of your own IP ad…
So every time a new comment is posted, is the CloudFlare cache invalidated and replaced with a new version of the comments page?
Re: Ask HN: Why and how is Hacker News so fast?
#30If you want to see an even faster "forum", see http://forum.dlang.org/
That's impressive. What is their architecture?
> This website is a web frontend to the DigitalMars NNTP server and mailing lists. It is part of DFeed, which is also a D news aggregator and IRC bot.
> DFeed was written mostly by Vladimir Panteleev. Portions (including style and graphics) are Copyright © by Digital Mars. The source code is available under the GNU Affero General Public License on GitHub: https://github.com/CyberShadow/DFeed
Probably as static as possible, speed is easy then.