Bottomless, consumption-based storage for PostgreSQL built on Amazon S3
timescale.com
timescale.com
I'm curious about the tradeoffs. The article mentions increased latency of 10's of milliseconds. If you have a complex access (many joins or index hits), is that exacerbated from many round trips to load different files? From a cost perspective, I image that you now have to think about IOPS. If you have a very high usage database, would it make sense to have a more traditional file system where you aren't paying per operation?
Edit: On reread, I missed that this is only available for the hypertable concept, and is more of a "cold storage" for older metrics, presumably accessed infrequently. I am curious about a general "PG backed by S3"'s ramifications.
So I agree that it's good for cold storage, but it's a bit nuanced. For example, you rarely see small random queries to old historical data, but you do often see larger scans over historical data. And in those cases, the throughput you get from S3 is actually quite high (especially that we've engineered with with proper columnar compression and row group/columnar exclusion). Which is very different from a latency bounded workload where you have a lot of small random reads, which is much more common in CRUD-like workloads.
Also, with Timescale, you have the ability to build continuous aggregates (incrementally materialized views). So you can have the raw data (or even lower levels of rollups) that get tiered into S3, while the more frequently accessed rollups can remain in hot storage.
(Timescale co-founder)
Timescale gives users a lot more control. S3 is used for storage of older data while newer data is stored on faster disks. The workload patterns for use cases like time-series, events, and analytics fit this well. The time dimension often gives a clear separation between what should be stored in hotter storage and what should be stored in cooler storage, based on time-oriented nature of data.
We also leverage a compressed columnar format that makes our data space and scan efficient for time series workloads. Neon stores a database page friendly format that best supports their workloads.
(Timescale engineer)
As far as I understood, Neon is only scale-to-zero from the perspective of a tenant ("don't bill for idle"), not from the perspective of who's running the software.
Neon's compute nodes can scale down to zero, but the pageservers and safekeepers don't.
And since safekeepers are a Paxos quorum, there's at least 3 of them!
From a technical stand point when looking at S3 there is a minimum request first-byte time of 200ms and if you have multiple files to query on top of the list requests for the files in a bucket paths it can add up (you can save file/index metadata data in cache to help with this).
if the query is run once a day and isn't very latency sensitive I guess it doesn't matter but some solution that looks on the query data patterns and pre-loads data from s3 to hot/local cache storage or saves the file locally on the node for a period of time would surly help.
One scenario for this is ML models refresh of time series data where you might want to add new data with historical data and create a new model (even if it's incremental you'd still want to do regression testing with historical data). Of course there are code optimizations for these without the need of the DB to the the heavy lifting but that's just one thing that comes to mind.
Let us know how we can help :-)
Also just curious: What's your application?
Even without this new capability of S3-based storage, Timescale's native columnar compression often gets like 95% storage reduction, even while staying fully in the PostgreSQL ecosystem.
(We often see our users amazed about how much less storage/disk they require after migrating from RDS.)
https://docs.timescale.com/timescaledb/latest/how-to-guides/...
My team ingests petabytes of data each day in S3 that is then queriable in Athena, and it supports all the same features that are mentioned here, such as interfacing with other types of datasources like an existing PostgreSQL database.
It shouldn't be hard to use another block level storage.
Our experience is that isn't a common use case for Athena, while it is the primary use case for TimescaleDB.
So performance matters in the sense that querying data is our core offer, but we're talking about multiple seconds here, not milliseconds.
I think the distinction makes sense then, thanks.
The potential downside is unpredictable query performance. For example, suppose you have a query that calculates daily statistics from your time series data. The query takes 1 second to execute when you run it for yesterday's data, but 1 minute to run for a day six months in the past, because you've inadvertently shifted your work onto the slower storage layer.
I haven't heard great things about Athena, but I'd be curious to hear more about what works.
Then in terms of cost it's around $0.5 per query maybe? The average is a very bad number because most queries will be something like $0.0001, but then some will be hundreds of dollars. But that's the only number I have off the top of my head.
I use Timescale for internal analytics tools -- time-series metrics, logs, etc from hardware systems. Our deployments have very low CPU usage, so running on a single EC2 instance is feasible. Our main concern is always just running out of disk space. It would be amazing if this ends up being a config option in the open source version, where we can point the instance at an S3 bucket and provide the right IAM access.
The data tiering feature will be only available in the Timescale cloud offering, we do not have plans to support this feature in oss/self-hosted at the moment.
Thanks for sharing your use-case with TimescaleDB. I'm curious to understand how are you ingesting metrics today into TimescaleDB, do you manage your own schema, retention, compression and downsampling?
We at Timescale have built a product named Promscale for easy metrics and traces ingestion with automatic schema-management, compression, retention and downsampling capabilities with full SQL support. Have you tried Promscale (https://github.com/timescale/promscale) for your metrics use-case?
To learn more about Promscale join us in #promscale channel in our community slack (https://slack.timescale.com/)