Outbound data transfer for Postgres

Hello, I setup an HA Postgres cluster following Postgres on Fly · Fly and I noticed that after a few hours outbound data transfer is reported to be over 290MB.

I have a almost totally idle Elixir/Phoenix app connected to the database and I’m wondering if the outbound traffic is all caused by my app (possible but I wouldn’t have expected such an high usage from and idle app) or if it could be due to the cluster activity/metrics collection.

I’m also not sure what outbound means in this context. Is data going outside of the Fly network or is it data leaving a Fly application/replica?

1 Like

This is a little confusing. “Outbound data transfer” is just transmit data from your VM interfaces. So it does include replication and data between your application and database.

We need to do some networking work to account for “internal” vs “external” data, hopefully we get this cleaned up in the next couple of months.

Thank you for your reply!

1 Like

@kurt any idea when this might be cleared up? I’ve been working on deploying a new app over the last few days, and currently see this in my dashboard:

This is a completely fresh, empty DB cluster. No data has been stored yet, there are 0 tables. My first thought seeing this amount of “outbound” data transfer is that somehow it’s been attacked and I’m going to get a large bill at the end of the month.

I can’t answer as to why you’re seeing this, but the free plan comes with 160GB of bandwidth iirc. Hopefully, that will help with the bill.

If you ever do get an unexpected bill, let us know and we’ll figure it out (and likely credit it)!

1 Like

I’m also seeing high numbers here on a database with almost no data and very few users. Could there be something related to stolon going on here? I have two replicas setup (just for testing Fly) but they all have very little data.

Just to clarify here:

  • Does the cost differ for cross-region traffic?
  • Should being charged for in-region data transfer be taken as an encouragement to optimize application->db communication?

Stolon and replication do a lot of traffic, even on idle DBs. It doesn’t really scale with usage but it’s kind of a scary number.

We’re going to turn off billing for postgres data transfer until we can otherwise exclude in region traffic. We’ll have to charge a (reduced) cross region rate at some point, but there’s no reason y’all should have to wait on us to do more networking work to reap those benefits. :slight_smile:

5 Likes

I just noticed this with my new environment as well. Is there any update, or is billing still disabled for postgres data?

You shouldn’t get billed for postgres data transfer. If your bill looks odd, definitely send an email to support@fly.io about it.

3 Likes

Thanks. I just stared using Fly a couple of days ago, so I’ve yet to see how the billing works. :slight_smile:

I did have one deployment I was considering that may result in a decent amount of in-region and cross-region traffic between systems (not postgres), so I’m looking forward to seeing what you implement for pricing of the traffic that isn’t leaving your network.