Ask HN: Cheapest way to run a time-series database in cloud?

I need to run a database (preferably Postgres-based, currently using TimescaleDB) to store about 20M rows of price data per day, with the option to discard or offload data after 7d to cold storage.

It's just a hobby project that doesn't make me any money, so I want to run this as cheaply as possible. I was experimenting with TimescaleDB cloud but the pricing there starts at $40 a month not including storage.

I tried running it myself on Fly.io but the DB imploded within hours of setting it up and was extremely difficult to recover, so I had to give up on that.

12 points | by cedws 17 days ago

10 comments

  • patricklorio 17 days ago
    Highly recommend clickhouse. You can set the partition key to be based on date and delete old data in chunks. Makes life really easy. Also found it much more performant than timescaledb out of the box. Not sure about hosted options but can imagine that translates to better performance for the dollar.
  • mongrelion 17 days ago
    Is the cloud a must? What kind of performance are you after? You could repurpose an old desktop computer / server, slap a 4TB HDD on it and have it run at home or in your office.

    The longer you use it, the cheaper it gets.

  • CitrusFruits 17 days ago
    I know you said preferably Postgres based, but influxdb has strictly usage based pricing so that might be worth a look. Also you're an open source project and have tight budgetary constraints sometimes you can always ask for a discount, the worst they can say is no.

    https://www.influxdata.com/influxdb-cloud-pricing/

  • GauntletWizard 17 days ago
    Prometheus on a decent digital ocean box? A $20/mo vps will handle that load easily, though you may need to buy extra storage depending on data shape.
    • CitrusFruits 17 days ago
      If you're considering a VPS I'd also check out Hetzner. They only have Germany and Finland locations, but if latency isn't an issue (or if you're in Europe) you can get really good prices there.
      • uaas 16 days ago
        They have US locations too, for some time now.
  • xzhuang1984 17 days ago
    Have you tried GreptimeCloud https://greptime.com/product/cloud

    The price looks cheaper https://greptime.com/pricing

  • rozenmd 17 days ago
    Probably Cloudflare's Workers analytics engine (basically serverless clickhouse)
  • 999900000999 17 days ago
    Supabase is postgres backed and is 25$ a month.
  • hodgesrm 16 days ago
    Run ClickHouse locally on Hetzner. Their prices are pretty hard to beat. We've been using them for years.
  • higeorge13 17 days ago
    Clickhouse on a cheap hetzner vm or server?
  • serguzest 17 days ago
    checkout ClickHouse cloud maybe they have cheaper options for your usage