Skip to content

Use cases for Timestream vs Aurora RDS

0

We are currently using Timestream as the database for our IoT data streams. We have some devices using IoT core and the send data to a lambda function in binary Protobuf form. The lambda deserializes and writes to Timestream using the boto API. Timestream is very convenient as it's a managed service. However, I recently came across Aurora RDS which is also managed.

How would a Postgres table in Aurora RDS partitioned on time compare to Timestream? Conceptually it feels very similar, though I don't understand the pros / cons of each.

asked 2 years ago684 views

2 Answers
2
Accepted Answer

While both Amazon Timestream and Amazon Aurora RDS (with PostgreSQL) are managed database services, they are designed for different use cases and have distinct advantages.

Timestream is purpose-built for time series data, making it particularly well-suited for IoT and operational applications. It offers several advantages for your current use case:

  1. Optimized for time series: Timestream is specifically designed to handle high-volume time series data efficiently, which aligns well with IoT data streams.

  2. Automatic data lifecycle management: It automatically moves older data to a cost-optimized storage tier, potentially reducing costs for long-term data storage.

  3. Scalability: Timestream can handle trillions of events per day, scaling automatically to meet demand.

  4. Query performance: Its purpose-built query engine is optimized for time series analysis, potentially offering faster query performance for time-based operations.

  5. Serverless: Timestream is fully serverless, reducing operational overhead.

Aurora RDS with PostgreSQL, on the other hand, is a more general-purpose relational database. While it can handle time series data using time-based partitioning, it has different strengths:

  1. Flexibility: As a relational database, it offers more flexibility for complex queries and joins across different types of data.

  2. Familiarity: If your team is already familiar with PostgreSQL, the learning curve might be lower.

  3. Ecosystem: PostgreSQL has a rich ecosystem of extensions and tools that might be beneficial for certain use cases.

  4. ACID compliance: For applications requiring strict transactional integrity, Aurora PostgreSQL provides full ACID compliance.

When comparing a time-partitioned PostgreSQL table in Aurora to Timestream:

  1. Query complexity: Complex queries involving multiple tables or non-time-series operations might be easier to implement in PostgreSQL.

  2. Storage efficiency: Timestream's automatic tiering might be more cost-effective for long-term storage of time series data.

  3. Write performance: Timestream is optimized for high-volume inserts, which could be advantageous for IoT data streams.

  4. Query performance: For time-based queries, Timestream's purpose-built engine might outperform PostgreSQL, especially for large datasets.

  5. Data model: Timestream's data model is specifically designed for time series, which might be more intuitive for IoT data.

In your case, given that you're already using Timestream for IoT data streams, it likely remains the better choice unless you have specific requirements that Aurora PostgreSQL would address better, such as complex relational queries or the need for strict ACID compliance. Timestream's optimization for time series data, automatic scaling, and lifecycle management align well with IoT use cases. However, if you find yourself needing more relational database features or have workloads that go beyond time series analysis, Aurora PostgreSQL could be a viable alternative to consider.

Sources
Amazon Timestream in AWS GovCloud (US) - AWS GovCloud (US)
What is Amazon Timestream for LiveAnalytics? - Amazon Timestream

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Can data queried from Timestream be joined with RDS tables?

2

Can data queried from Timestream be joined with RDS tables? No. You could unload to S3 and then use Athena query multiple sources. https://docs.aws.amazon.com/timestream/latest/developerguide/export-unload.html

Also to your original question, I would append Scheduling Query(Native Timestream feature) feature which is heavily used in IoT use-cases https://docs.aws.amazon.com/timestream/latest/developerguide/scheduledqueries.html

AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.