Live data from Hacker News

Using Flat Files So Elections Don’t Break Your Server

open.blogs.nytimes.com

1–10 of 51 posts

Re: Using Flat Files So Elections Don’t Break Your Server

#3
It's nice to see detail like this on high-traffic, high-risk environments.

I'm curious about their provisions for cross-datacenter failover. The article mentions haproxy being ready to direct requests to a different datacenter as well as ELB spanning availability zones. I'd expect a failover option entirely outside AWS as well, with short-TTL DNS ready to make the switch.

I'm also not sure what value varnish brings to the table when the Apaches are just serving a small number of flat files. It seems like unnecessary complexity -- by the same logic found earlier in the article -- when a well-tuned webserver will serve flat files at a comparable rate. Maybe the Apache configuration for this workload was sufficiently different to make it an unwanted risk.

Re: Using Flat Files So Elections Don’t Break Your Server

#6
post #3

It's nice to see detail like this on high-traffic, high-risk environments. I'm curious about their provisions for cross-datacenter failover. The article mentions haproxy being ready to direct requests to a different datacenter as well as ELB spanning availability zones. I'd expect a failover option entirely outside AWS as well, with short-TTL DNS ready to make the switch. I'm also not sure what value varnish brings t…

Doesn't Varnish handle many times more concurrent clients than apache does, at significantly lower system load? It could just be pure optimization.

Re: Using Flat Files So Elections Don’t Break Your Server

#9
post #7

Forgive my ignorance, but does "flat file" mean "prerendered static HTML page" in this usage?

Sounds very much like it. From the article:

>After each batch of new data was received from the AP, this server determined which pages needed to be re-rendered and, using the Typhoeus libcurl-multi bindings for Ruby, pulled new data for each of these pages from the render pool.

Sounds like their infrastructure already has a farm of servers set up to handle rendering articles into their HTML components, so for this scenario they would save the output as a static file and then write it to disk rather than sending the HTML out to the response / caching layer / etc.

Post reply on HN