The Anatomy of Search Technology: blekko’s NoSQL database

The Anatomy of Search Technology: blekko’s NoSQL databaseThis is a guest post by Greg Lindahl, CTO of blekko, the spam free search engine that had over 3.5 million unique visitors in March. Greg Lindahl was Founder and Distinguished Engineer at PathScale, at which he was the architect of the InfiniPath low-latency InfiniBand HCA, used to build tightly-coupled supercomputing clusters.

Imagine that you’re crazy enough to think about building a search engine.  It’s a huge task: the minimum index size needed to answer most queries is a few billion webpages. Crawling and indexing a few billion webpages requires a cluster with several petabytes of usable disk — that’s several thousand 1 terabyte disks — and produces an index that’s about 100 terabytes in size.

Serving query results quickly involves having most of the index in RAM or on solid state (flash) disk. If you can buy a server with 100 gigabytes of RAM for about $3,000, that’s 1,000 servers at a capital cost of $3 million, plus about $1 million per year of server co-location cost (power/cooling/space.) The SSD alternative requires fewer servers, but serves a lot fewer queries per second, because SSDs are much slower than RAM.

You might think that Amazon’s AWS cloud would be a great way to reduce the cost of starting a search engine. It isn’t, for 4 main reasons:

  1. Crawling and indexing requires a lot of resources all the time; you can’t save money by only renting most of the servers some of the time.
  2. Amazon currently doesn’t rent servers with SSDs. Putting the index into RAM on Amazon is very expensive, and only makes sense for a search engine with several % market share.
  3. Amazon only rents a limited number of ratios of disk i/o to ram size to core count. It turns out that we need a lot of disk i/o relative to everything else, which makes Amazon less cost effective.
  4. At some cluster size, a startup has enough economy of scale to beat Amazon’s cost+profit margin. At launch (November, 2010) blekko had 700 servers, and we currently have 1,500. That’s well beyond the break-even point.

Read more ……