Software:Apache Druid

From HandWiki
Short description: Analytical database software
Apache Druid[1]
Apache Druid logo.svg
Original author(s)Metamarkets
Developer(s)Apache Software Foundation
Repositorygithub.com/apache/druid
Written inJava
Operating systemCross-platform
Type
LicenseApache License 2.0
Websitedruid.apache.org

Druid is a column-oriented, open-source, distributed data store written in Java. Druid is designed to quickly ingest massive quantities of event data, and provide low-latency queries on top of the data.[2] The name Druid comes from the shapeshifting Druid class in many role-playing games, to reflect that the architecture of the system can shift to solve different types of data problems.

Druid is commonly used in business intelligence-OLAP applications to analyze high volumes of real-time and historical data.[3] Druid is used in production by technology companies such as Alibaba,[3] Airbnb,[3] Cisco,[4][3] eBay,[5] Lyft,[6] Netflix,[7] PayPal,[3] Pinterest,[8] Reddit,[9] Twitter,[10] Walmart,[11] Wikimedia Foundation[12] and Yahoo.[13]

History

Druid was started in 2011 by Eric Tschetter, Fangjin Yang, Gian Merlino and Vadim Ogievetsky[14] to power the analytics product of Metamarkets. The project was open-sourced under the GPL license in October 2012,[15][16] [17]and moved to an Apache License in February 2015.[18][19]

Architecture

Architecture of a Druid cluster

Fully deployed, Druid runs as a cluster of specialized processes (called nodes in Druid) to support a fault-tolerant architecture[20] where data is stored redundantly, and there is no single point of failure.[21] The cluster includes external dependencies for coordination (Apache ZooKeeper), metadata storage (e.g. MySQL, PostgreSQL, or Derby), and a deep storage facility (e.g. HDFS, or Amazon S3) for permanent data backup.

Query management

Client queries first hit broker nodes, which forward them to the appropriate data nodes (either historical or real-time). Since Druid segments may be partitioned, an incoming query can require data from multiple segments and partitions (or shards) stored on different nodes in the cluster. Brokers are able to learn which nodes have the required data, and also merge partial results before returning the aggregated result.

Cluster management

Operations relating to data management in historical nodes are overseen by coordinator nodes. Apache ZooKeeper is used to register all nodes, manage certain aspects of internode communications, and provide for leader elections.

Features

  • Low latency (streaming) data ingestion.
  • Arbitrary slice and dice data exploration.
  • Sub-second analytic queries.
  • Approximate and exact computations.

Performance

In 2019, researchers compared the performance of Hive, Presto, and Druid using a denormalized Star Schema Benchmark based on the TPC-H standard. Druid was tested using both a “Druid Best” configuration using tables with hashed partitions and a “Druid Suboptimal” configuration which does not use hashed partitions.[22]

Tests were conducted by running the 13 TPC-H queries using TPC-H Scale Factor 30 (a 30GB database), Scale Factor 100 (a 100GB database), and Scale Factor 300 (a 300GB database).

Scale Factor Hive Presto Druid Best Druid Suboptimal
30 256s 33s 2.09s 3.21s
100 424s 90s 6.12s 8.08s
300 982s 452s 7.60s 20.02s

Druid performance was measured as at least 98% faster than Hive and at least 90% faster than Presto in each scenario, even when using the Druid Suboptimized configuration.

See also

References

  1. "Apache Druid at GitHub". github.com. https://github.com/apache/druid. 
  2. Hemsoth, Nicole. ""Druid Summons Strength in Real-Time"". http://www.datanami.com/datanami/2012-11-08/druid_summons_strength_in_real-time.html. , Datanami, 8 November 2012
  3. 3.0 3.1 3.2 3.3 3.4 druid. "Druid | Powered by Druid". https://druid.apache.org/druid-powered.html. 
  4. Butler, Brandon (20 June 2016). "Under the hood of Cisco's Tetration Analytics platform". http://www.networkworld.com/article/3086250/cisco-subnet/under-the-hood-of-cisco-s-tetration-analytics-platform.html. 
  5. "Druid at Pulsar - ebay的专栏 - 博客频道 - CSDN.NET". http://blog.csdn.net/ebay/article/details/50205611. 
  6. (in en) Streaming SQL and Druid by Arup Malakar, https://www.youtube.com/watch?v=ovZ9iAkQllo, retrieved 2020-01-29 
  7. "The Netflix Tech Blog: Announcing Suro: Backbone of Netflix's Data Pipeline". http://techblog.netflix.com/2013/12/announcing-suro-backbone-of-netflixs.html. 
  8. (in en) Pinterest: Powering Ad Analytics with Apache Druid, https://www.youtube.com/watch?v=LBXtK0DSQIw, retrieved 2020-01-29 
  9. "Scaling Reporting at Reddit - Upvoted" (in en-US). https://www.redditinc.com/blog/scaling-reporting-at-reddit. 
  10. "Interactive Analytics at MoPub: Querying Terabytes of Data in Seconds" (in en-us). https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/interactive-analytics-at-mopub.html. 
  11. Nayak, Amaresh (2018-02-23). "Event Stream Analytics at Walmart with Druid" (in en). https://medium.com/walmartlabs/event-stream-analytics-at-walmart-with-druid-dcf1a37ceda7. 
  12. "Conferences - O'Reilly Media". https://conferences.oreilly.com/strata/strata-ny/public/schedule/detail/60986. 
  13. "Complementing Hadoop at Yahoo: Interactive Analytics with Druid". http://yahooeng.tumblr.com/post/125287346011/complementing-hadoop-at-yahoo-interactive. 
  14. "Druid: A Real-time Analytical Data Store". http://static.druid.io/docs/druid.pdf. 
  15. Tschetter, Eric. ""Introducing Druid"". https://druid.apache.org/blog/2012/10/24/introducing-druid.html. , druid.apache.org, 24 October 2012
  16. Higginbotham, Stacey. ""Metamarkets open sources Druid, its in-memory database"". http://gigaom.com/2012/10/24/metamarkets-open-sources-druid-its-in-memory-database/. , GigaOM, 24 October 2012
  17. "Metamarkets Open Sources Druid, Streaming Real-Time Data Store" (in en-US). 2012-10-24. https://news.yahoo.com/metamarkets-open-sources-druid-streaming-130000813.html. 
  18. Harris, Derrick (2015-02-20). "The Druid real-time database moves to an Apache license". https://gigaom.com/2015/02/20/the-druid-real-time-database-moves-to-an-apache-license/. 
  19. "Druid Gets Open Source-ier Under the Apache License". https://metamarkets.com/2015/druids-now-open-source-ier-under-an-apache-license/. 
  20. "Druid Project Documentation". https://druid.apache.org/docs/latest. 
  21. Yang, Fangjin; Tschetter, Eric; Léauté, Xavier; Ray, Nelson; Merlino, Gian; Ganguli, Deep. ""Druid: A Real-time Analytical Data Store"". http://static.druid.io/docs/druid.pdf. , Metamarkets, retrieved 6 February 2014
  22. Correia, José; Costa, Carlos; Santos, Maribel Yasmina (2019). Abramowicz, Witold; Corchuelo, Rafael. eds. "Challenging SQL-on-Hadoop Performance with Apache Druid" (in en). Business Information Systems. Lecture Notes in Business Information Processing (Cham: Springer International Publishing) 353: 149–161. doi:10.1007/978-3-030-20485-3_12. ISBN 978-3-030-20485-3. https://link.springer.com/chapter/10.1007/978-3-030-20485-3_12. 

External links