Skip to main content
QUICK REVIEW

[Paper Review] Fast Data in the Era of Big Data: Twitter's Real-Time Related Query Suggestion Architecture

Gilad Mishne, Jeff Dalton|arXiv (Cornell University)|Oct 27, 2012
Cloud Computing and Resource ManagementComputer Science50 references8 citations
TL;DR

This paper presents Twitter's real-time related query suggestion and spelling correction system, which evolved from a Hadoop-based batch processing architecture to a custom in-memory stream processing engine to meet sub-10-minute latency requirements during breaking news events. The key contribution is a practical case study demonstrating that Hadoop is ill-suited for low-latency, real-time data processing, and advocating for unified platforms that handle both 'big' and 'fast' data.

ABSTRACT

We present the architecture behind Twitter's real-time related query suggestion and spelling correction service. Although these tasks have received much attention in the web search literature, the Twitter context introduces a real-time "twist": after significant breaking news events, we aim to provide relevant results within minutes. This paper provides a case study illustrating the challenges of real-time data processing in the era of "big data". We tell the story of how our system was built twice: our first implementation was built on a typical Hadoop-based analytics stack, but was later replaced because it did not meet the latency requirements necessary to generate meaningful real-time results. The second implementation, which is the system deployed in production, is a custom in-memory processing engine specifically designed for the task. This experience taught us that the current typical usage of Hadoop as a "big data" platform, while great for experimentation, is not well suited to low-latency processing, and points the way to future work on data analytics platforms that can handle "big" as well as "fast" data.

Motivation & Objective

  • To address the challenge of providing real-time related query suggestions within minutes of breaking news events, a requirement absent in traditional web search.
  • To investigate why Hadoop-based batch processing failed to meet low-latency requirements for real-time query suggestion and spelling correction.
  • To design and deploy a custom in-memory processing engine that supports sub-10-minute response times for dynamic, fast-evolving query associations.
  • To highlight the architectural and performance limitations of Hadoop for velocity-driven workloads and advocate for unified platforms handling both 'big' and 'fast' data.
  • To share practical insights from building two iterations of the same system, emphasizing lessons learned for real-time data processing in production-scale systems.

Proposed method

  • Initially used a Hadoop-based analytics stack with Pig for batch processing of Twitter log data to compute query co-occurrence patterns.
  • Replaced the Hadoop pipeline with a custom in-memory stream processing engine designed for low-latency, real-time query suggestion and spelling correction.
  • Implemented a stateful stream processing architecture that maintains and updates query relationship scores in real time as new tweets arrive.
  • Leveraged in-memory data structures to enable sub-second updates and support high-throughput, low-latency processing of tweet streams.
  • Designed the system to detect and respond to sudden query spikes (e.g., breaking news) by dynamically adapting related query suggestions within minutes.
  • Used a combination of real-time event processing and incremental computation to maintain up-to-date query relationships without full reprocessing.

Experimental results

Research questions

  • RQ1What are the performance and latency limitations of Hadoop-based batch processing when applied to real-time, low-latency query suggestion systems?
  • RQ2How can a system be architected to deliver relevant related query suggestions within 10 minutes of a breaking news event?
  • RQ3What architectural trade-offs exist between batch processing (Hadoop) and stream processing (in-memory engines) for real-time data analytics?
  • RQ4To what extent can existing stream processing engines (e.g., Storm, S4) handle both real-time processing and large-scale historical analytics over long time spans?
  • RQ5What design principles are necessary for a unified data processing platform that efficiently handles both 'big data' (volume) and 'fast data' (velocity) workloads?

Key findings

  • The initial Hadoop-based implementation could not meet the 10-minute latency target required for real-time response to breaking news, rendering it ineffective for production use.
  • Hadoop’s design for batch processing—particularly its reliance on disk I/O and long job cycles—makes it fundamentally unsuitable for low-latency, real-time data processing.
  • The custom in-memory processing engine successfully reduced latency to under 10 minutes, enabling timely related query suggestions during major news events.
  • The transition from Hadoop to an in-memory stream engine was necessary due to architectural mismatches between batch-oriented systems and real-time data demands.
  • Existing stream processing engines like Storm and S4 lack native support for long-term historical analytics and complex ad hoc queries over large data volumes.
  • A unified data processing platform combining the strengths of batch analytics (Hadoop) and stream processing (in-memory engines) is needed to handle both 'big' and 'fast' data effectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.