NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter



Tracking page views with MongoDB

After looking at 4 different alternatives — Google Analytics, sharding existing MySQL database, ETL process (nb log processing) and MongoDB, Eventbrite decided to go the MongoDB way dismissing the other approaches:

  • Google Analytics
    • Time-consuming to set up and test
    • Migrating existing page-view data is tricky
    • Not real time
  • Shard the MySQL table
    • Requires downtime to make schema changes
    • Introduces routing at the code level
    • Would still be prone to row locks if we outgrew # of shards
  • ETL process (aka, write to log file and have a process that aggregates and periodically writes to the database)
    • No data integrity
    • Not real time
    • Requires management of log files over multiple web servers

While the post doesn’t really detail the reasons why MongoDB would be able to solve this problem, there are a couple of MongoDB features described in this ☞ post that make it a good fit for this scenario.

Basically, the solution is based on a combination of the following MongoDB features:

  • upsert and $inc operators
  • write operations returning immediately (without waiting the server to effectively confirm a write)
  • $inc operator is a very good replacement for a read-modify-update scenario
As a side note, remember there’s another MongoDB based tool: Hummingbird that provides real time web traffic visualization.

This post is part of the MongoDB case studies series.