Contents
    Architecture

    Time Series vs Streaming Databases

    While both time series databases and streaming databases are used to handle time-related data, their underlying technologies are built to serve different purposes.

    Time series databases' main purpose is to store, manage, and analyze data points indexed by time. Each data point usually consists of a timestamp and associated values.

    A time series database (TSDB) can be easily recognized by the following characteristics:

    • Its architecture is time-centric, meaning the data is organized mainly around timestamps
    • It supports managing data lifecycles, therefore, it automatically archives or deletes older data.
    • It is designed to handle high-frequency inserts, e.g. from IoT (Internet of Things) devices or real-time monitoring systems.
    • Its specialty is performing aggregations, such as averages, minimum, maximum, and trends over time periods.

    A streaming database has a different main purpose: it is focused on real-time processing that allows us to query and analyze the data on the fly as it streams in. The distinctive traits of a streaming database are as follows:

    • It is suited for event-driven architecture, where computations or alerts based on specific conditions can be triggered by connecting with event-driven systems.
    • It is usually connected or integrated with a data streaming platform, e.g., Apache Kafka or AWS Kinesis.

    Which one to use

    When making a decision on which database type to use, you might find the following consideration useful:

    • A TSDB can be used if you want to store everything from continuous monitoring and metrics collection, such as server uptime, CPU usage, memory utilization, network bandwidth, etc.
    • It is well-suited for handling large volumes of high-frequency writes and query metrics over defined time ranges, allowing for real-time monitoring and long-term trend analysis.
    • For IoT applications, the TSDB is the best fit.
    • TSDBs are also perfect for financial market analysis, as financial data is often time-sensitive and needs to be indexed correctly.
    • Streaming databases are the best option in event-driven architectures where timely decision-making is critical. Examples of such architectures include tracking user behavior on websites, processing financial transactions, or managing supply chain logistics.
    • When you need to process and evaluate data as it enters your system in real time, a streaming database is the right choice for you.
    • Among the applications that are best served by streaming databases, we could name fraud detection, live dashboards, recommendation engines, and IoT device anomaly monitoring, since they require instant insights.