skip to main content
research-article

Samza: stateful scalable stream processing at LinkedIn

Published:01 August 2017Publication History
Skip Abstract Section

Abstract

Distributed stream processing systems need to support stateful processing, recover quickly from failures to resume such processing, and reprocess an entire data stream quickly. We present Apache Samza, a distributed system for stateful and fault-tolerant stream processing. Samza utilizes a partitioned local state along with a low-overhead background changelog mechanism, allowing it to scale to massive state sizes (hundreds of TB) per application. Recovery from failures is sped up by re-scheduling based on Host Affinity. In addition to processing infinite streams of events, Samza supports processing a finite dataset as a stream, from either a streaming source (e.g., Kafka), a database snapshot (e.g., Databus), or a file system (e.g. HDFS), without having to change the application code (unlike the popular Lambda-based architectures which necessitate maintenance of separate code bases for batch and stream path processing).

Samza is currently in use at LinkedIn by hundreds of production applications with more than 10, 000 containers. Samza is an open-source Apache project adopted by many top-tier companies (e.g., LinkedIn, Uber, Netflix, TripAdvisor, etc.). Our experiments show that Samza: a) handles state efficiently, improving latency and throughput by more than 100X compared to using a remote storage; b) provides recovery time independent of state size; c) scales performance linearly with number of containers; and d) supports reprocessing of the data stream quickly and with minimal interference on real-time traffic.

References

  1. Databus. https://github.com/linkedin/databus.Google ScholarGoogle Scholar
  2. MongoDB. https://www.mongodb.com.Google ScholarGoogle Scholar
  3. Powered by samza. https://cwiki.apache.org/confluence/display/SAMZA/Powered+By.Google ScholarGoogle Scholar
  4. RocksDB. http://rocksdb.org.Google ScholarGoogle Scholar
  5. Trident. http://storm.apache.org/Trident-tutorial.html.Google ScholarGoogle Scholar
  6. D. J. Abadi, Y. Ahmad, M. Balazinska, U. Cetintemel, M. Cherniack, et al. The design of the Borealis stream processing engine. In Proc. CIDR, pages 277--289, 2005.Google ScholarGoogle Scholar
  7. T. Akidau, A. Balikov, K. Bekiroğlu, S. Chernyak, J. Haberman, et al. Millwheel: fault-tolerant stream processing at internet scale. Proc. VLDB, pages 1033--1044, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. T. Akidau, R. Bradshaw, C. Chambers, et al. The dataflow model: a practical approach to balancing correctness, latency, and cost in massive-scale, unbounded, out-of-order data processing. Proc. VLDB, 8(12):1792--1803, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Amazon. DynamoDB streams. http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html.Google ScholarGoogle Scholar
  10. Amazon. Kinesis. https://aws.amazon.com/kinesis/.Google ScholarGoogle Scholar
  11. L. Amini, H. Andrade, R. Bhagwan, F. Eskesen, R. King, et al. SPC: a distributed, scalable platform for data mining. In Proc. IWMSSP, pages 27--37. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Apache. Beam. http://beam.incubator.apache.org.Google ScholarGoogle Scholar
  13. Apache. Flink. https://flink.apache.org.Google ScholarGoogle Scholar
  14. Apache. Hadoop. http://hadoop.apache.org/.Google ScholarGoogle Scholar
  15. Apache. Kafaka - powered by. https://cwiki.apache.org/confluence/display/KAFKA/Powered+By.Google ScholarGoogle Scholar
  16. A. Auradkar, C. Botev, S. Das, et al. Data infrastructure at LinkedIn. In Proc. ICDE, pages 1370--1381, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. AWS. Lambda. https://aws.amazon.com/lambda/.Google ScholarGoogle Scholar
  18. R. Castro Fernandez, M. Migliavacca, E. Kalyvianaki, and P. Pietzuch. Integrating scale out and fault tolerance in stream processing using operator state management. In Proc. SIGMOD, pages 725--736. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. K. Chandy and L. Lamport. Distributed snapshots: Determining global states of distributed systems. TOCS, pages 63--75, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, D. A. Wallach, et al. Bigtable: A distributed storage system for structured data. TOCS, 26(2):4:1--4:26, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Condie, N. Conway, P. Alvaro, J. M. Hellerstein, et al. Mapreduce online. In Proc. NSDI, pages 20--25, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. E. P. Corporation. Benchmarking top nosql databases. Technical Report, page 19, 2015.Google ScholarGoogle Scholar
  23. Couchbase. Couchbase. http://www.couchbase.com.Google ScholarGoogle Scholar
  24. J. Dean and S. Ghemawat. Mapreduce: simplified data processing on large clusters. CACM, 51(1):107--113, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. L. Engineering. Benchmarking apache kafka: 2 million writes per second (on three cheap machines). https://engineering.linkedin.com/kafka.Google ScholarGoogle Scholar
  26. R. Fernandez, P. Pietzuch, et al. Liquid: Unifying nearline and offline big data integration. In Proc. CIDR, page 8.Google ScholarGoogle Scholar
  27. R. C. Fernandez, M. Migliavacca, E. Kalyvianaki, and P. Pietzuch. Making state explicit for imperative big data processing. In Proc. ATC, pages 49--60. USENIX, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. A. S. Foundation. Apache HBase. http://hbase.apache.org/.Google ScholarGoogle Scholar
  29. Y. Gu, Z. Zhang, F. Ye, H. Yang, M. Kim, H. Lei, and Z. Liu. An empirical study of high availability in stream processing systems. In Proc. Middleware, page 23, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. V. Gulisano, R. Jimenez-Peris, M. Patino-Martinez, C. Soriente, and P. Valduriez. Streamcloud: An elastic and scalable data streaming system. TPDS, 23(12):2351--2365, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. P. Hintjens. ZeroMQ: Messaging for Many Applications. O'Reilly Media, Inc., 2013.Google ScholarGoogle Scholar
  32. J.-H. Hwang, M. Balazinska, A. Rasin, U. Cetintemel, et al. High-availability algorithms for distributed stream processing. In Proc. ICDE'05, pages 779--790, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. G. Jacques-Silva, F. Zheng, D. Debrunner, K.-L. Wu, V. Dogaru, et al. Consistent regions: Guaranteed tuple processing in ibm streams. Proc. VLDB, 9(13):1341--1352, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. Kreps, N. Narkhede, et al. Kafka: A distributed messaging system for log processing. In Proc. NetDB, pages 1--7, 2011.Google ScholarGoogle Scholar
  35. S. Kulkarni, N. Bhagat, M. Fu, et al. Twitter heron: Stream processing at scale. In Proc. SIGMOD, pages 239--250, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Lakshman and P. Malik. Cassandra: A decentralized structured storage system. In Proc. SIGOPS OSR, pages 35--40, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. W. Lin, Z. Qian, J. Xu, S. Yang, J. Zhou, and L. Zhou. Streamscope: continuous reliable distributed processing of big data streams. In Proc. NSDI, pages 439--454, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. B. Liu, Y. Zhu, and E. Rundensteiner. Run-time operator state spilling for memory intensive long-running queries. In Proc. SIGMOD, pages 347--358. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. N. Marz and J. Warren. Big Data: Principles and Best Practices of Scalable Realtime Data Systems. Manning Publications Co., 1st edition, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Meehan, N. Tatbul, S. Zdonik, C. Aslantas, U. Cetintemel, et al. S-store: Streaming meets transaction processing. Proc. VLDB, pages 2134--2145, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Microsoft. Azure event hub. https://azure.microsoft.com/en-us/services/event-hubs/.Google ScholarGoogle Scholar
  42. MySQL. Mysql. http://www.mysql.com.Google ScholarGoogle Scholar
  43. L. Neumeyer, B. Robbins, A. Nair, and A. Kesari. S4: Distributed stream computing platform. In Prod. ICDM Workshop, pages 170--177. IEEE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. S. A. Noghabi, S. Subramanian, P. Narayanan, S. Narayanan, G. Holla, et al. Ambry: Linkedin's scalable geo-distributed object store. In Proc. SIGMOD, pages 253--265. ACM, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. C. Olston, B. Reed, U. Srivastava, R. Kumar, and A. Tomkins. Pig latin: a not-so-foreign language for data processing. In Proc. SIGMOD, pages 1099--1110. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Oracle. Package java.util.stream. https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html.Google ScholarGoogle Scholar
  47. M. Pundir, L. M. Leslie, I. Gupta, and R. H. Campbell. Zorro: Zero-cost reactive failure recovery in distributed graph processing. In Proc. SoCC, pages 195--208. ACM, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. L. Qiao, K. Surlaker, S. Das, T. Quiggle, B. Schulman, et al. On brewing fresh espresso: Linkedin's distributed data serving platform. In Proc. SIGMOD, pages 1135--1146. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. T. Rabl, S. Gómez-Villamor, M. Sadoghi, et al. Solving big data challenges for enterprise application performance management. Proc. VLDB, 5(12):1724--1735, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. S. Sanfilippo. Redis. http://redis.io.Google ScholarGoogle Scholar
  51. Z. Sebepou and K. Magoutis. Cec: Continuous eventual checkpointing for data stream processing operators. In Proc. IEEE/IFIP DSN, pages 145--156, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. M. Stonebraker, U. Çetintemel, and S. Zdonik. The 8 requirements of real-time stream processing. SIGMOD Record, 34(4):42--47, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. A. Thusoo, J. S. Sarma, N. Jain, Z. Shao, P. Chakka, et al. Hive: A warehousing solution over a map-reduce framework. Proc. VLDB, 2(2):1626--1629, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. A. Toshniwal, S. Taneja, A. Shukla, K. Ramasamy, J. M. Patel, et al. Storm@ twitter. In Proc. SIGMOD, pages 147--156, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. V. K. Vavilapalli, A. C. Murthy, C. Douglas, S. Agarwal, M. Konar, et al. Apache hadoop YARN: Yet Another Resource Negotiator. In Proc. SOSP, page 5. ACM, 2013.Google ScholarGoogle Scholar
  56. R. Wagle, H. Andrade, K. Hildrum, C. Venkatramani, et al. Distributed middleware reliability and fault tolerance support in systems. In Proc. DEBS, pages 335--346, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. L. Xu, B. Peng, and I. Gupta. Stela: Enabling stream processing systems to scale-in and scale-out on-demand. In Proc. IC2E, pages 22--31, 2016.Google ScholarGoogle ScholarCross RefCross Ref
  58. M. Zaharia, M. Chowdhury, M. J. Franklin, S. Shenker, and I. Stoica. Spark: cluster computing with working sets. In Proc. HotCloud, page 95, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. M. Zaharia, T. Das, H. Li, et al. Discretized streams: an efficient and fault-tolerant model for stream processing on large clusters. In Proc. HotCloud, pages 10--10, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Samza: stateful scalable stream processing at LinkedIn
            Index terms have been assigned to the content through auto-classification.

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image Proceedings of the VLDB Endowment
              Proceedings of the VLDB Endowment  Volume 10, Issue 12
              August 2017
              427 pages
              ISSN:2150-8097
              Issue’s Table of Contents

              Publisher

              VLDB Endowment

              Publication History

              • Published: 1 August 2017
              Published in pvldb Volume 10, Issue 12

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader