Recommended managed PostgreSQL hosting for Phoenix applications?

Hello,

I am looking for experiences / recommendations on worry-free managed PostgreSQL hosting with limitless and effortless horizontal scaling features.

Thank you.

1 Like

Supabase? Neon.tech?

2 Likes

Postgres isn’t a technology that does any of those things, at least not all together. It does not effortlessly scale horizontally, and certainly not without limits.

Don’t get me wrong, Postgres is amazing. And its vertical scaling will get you a long long way. But what you’re asking for isn’t a matter of vendor, it’s a matter of Postgres not being designed to be a horizontally scalable DB.

6 Likes

I should have mentioned that I will have to make queries based on geographical coordinates. I understand that Postgis extension can handle that. There will be hundreds of thousands of locations to scan, based on coordinates.

I have looked into AWS serverless PostgreSQL (Aurora), I think I can start with that. At some point I will have to implement sharding, which can be done at application level.

Do you know of any other DB system that can be horizontally scalable ?

A few hundred K points is well within even a small regular Postgres installation. We have IoT data with billions of data points in Postgres and it’s still humming along. I think people underestimate how far you can get without “horizontal” scale at the DB level these days.

Aurora is interesting. You do gain certain kinds of scale, but it’s also a lot of $$$ at smaller scales compared to what a good old fashioned Postgres install will do, and you’ll miss out on other extensions.

Again in particular for databases unless you have expertise already in some of the distributed options I just don’t see a good ROI on choosing them over Postgres.

10 Likes

NewSQL? Cloud Spanner, CockroachDB, YugabyteDB, TiDB, PlanetScale, YDB, Aurora DSQL.

Spanner is the only one that offers reasonable consistency guarantees (subject to my personal opinion). Cockroach is the most complete of the non-cloud options, but is closed source. Yugabyte and TiDB are not as complete as Cockroach from what I remember. PlanetScale is not a real NewSQL DB, it’s really Vitess, a MySQL auto-sharding layer which is the only “database” ever to escape from Google (unless you count LevelDB, which I wouldn’t). YDB escaped from Yandex (like ClickHouse). Finally, Aurora DSQL literally just came out (it’s AWS).

If the alternative is sharded Postgres then consistency guarantees are obviously off the table anyway. But in that case also check out Citus, which is a Postgres auto-sharding layer like Vitess.

You really shouldn’t bother with any of these, though. None of them are worth the risk versus Postgres, which will probably scale well enough for you anyway as mentioned above!

4 Likes

Can anyone confirm whether Aurora actually scales further (vertically) than vanilla Postgres? I understand they replaced the storage engine, so I would expect better performance (not like Postgres’s storage engine is hard to beat…), but I’ve also seen complaints about latency due to the replication (on this very forum, even).

I would imagine the main benefit of Aurora is easy operation (AWS’s bread and butter I suppose), since you don’t need to deal with failover etc because the DB is sanely replicated at the storage level. Also, the architecture probably lends itself better to read replica scaling (but they still can’t guarantee proper consistency from what I understand).

All of the above should apply to Neon too, I think, since the architecture is similar (disaggregated storage).

1 Like

Are you sure that you will need that at all? Because I see that people often say that then need “scale” when their project could fit RPi with room to spare.

6 Likes

Crunchydata is fantastic.

Most extensions, high performance, newest versions available almost immediately when they come out and a team of experts you can lean on if you have unique challenges.

Works with multiple infrastructure providers as well.

Depending on your data model, you can also run the Citus extension to horizontally scale any multitenant Postgres DB fairly effortlessly. It’s impressive.

Highly recommend.

4 Likes

I see they have two solutions:

Crunchy Postgres & Crunchy Postgres for Kubernetes

Which one you recommend ? or have more experience with ?

The offerings are all essentially the same thing, just a matter of where it’s being deployed.

For fully managed, I use Crunchy Bridge.

1 Like

Wow, for those prices you can buy custom hardware, host it in a datacenter and it will be still cheaper.

2 Likes

I found it fairly close to RDS with better service and support. I always just start out with the $10 plan and grow from there.

2 Likes