News for hackers. Stuff that matters.
Re:PostgREST: REST API for any Postgres database by derefr on Saturday November 21, 2020 @11:26AM (#25170560)
Anyone here using this in production? I’ve always thought it was a neat idea, but haven’t heard of anyone building their API-oriented-SaaS company around it.
Re:PostgREST: REST API for any Postgres database by np_tedious on Saturday November 21, 2020 @11:38AM (#25170658)
I've used it for admin tools at real jobs. And once powered a read only "consumer" (writes came from offline webscraping) hobby project with it to make a no-backend-code react app. I see no reason it couldn't work in prod, especially if you had a CDN or HTTP cache in front.

What I found most striking is that it relies on postgres for just about everything. Content obviously (sometimes straight from tables, sometimes via db views), but also users and permissions. I'd first assumed there would be a config file a mile long but it really is all Postgres.

Re:PostgREST: REST API for any Postgres database by lhenk on Saturday November 21, 2020 @11:38AM (#25170657)
We're using it at CYPEX to automatically make customer data consumable for our frontend.

https://www.cybertec-postgresql.com/en/products/cypex/

Re:PostgREST: REST API for any Postgres database by pojzon on Saturday November 21, 2020 @06:52PM (#25173637)
Tried at scale, but it was simply not performant enough. All the additional things that you can extract before getting to db have made it too slow and overloaded databases.

It may be good for small-medium projects but when you process millions of heavy computing requests - its not for that.

Re:PostgREST: REST API for any Postgres database by kiwicopple on Saturday November 21, 2020 @09:08PM (#25174299)
Hey, can you elaborate more on how you were using it and where it was failing? I'm genuinely curious as we use it at Supabase.

I assume you were using it with high throughput? We are benchmarking it at around 2000 request/s now [1], and finding it's better to scale it horizontally rather than vertically.

> process millions of heavy computing requests

Was this reads from the database? Was the compute happening inside a Postgres function/view?

[1] Benchmarks https://github.com/supabase/benchmarks/issues/2

Re:PostgREST: REST API for any Postgres database by pojzon on Sunday November 22, 2020 @05:07AM (#25176288)
Issue was with authenticating the requests. Pgcrypt was too much together with geospatial operations. No database instance could handle that - or it was so expensive it was not worth it.
Re:PostgREST: REST API for any Postgres database by kiwicopple on Sunday November 22, 2020 @05:23AM (#25176362)
Got it, good to know. So you moved all the geospatial operations out - what did you use? I want to make sure we can support enterprise later, even for these workloads.
Re:PostgREST: REST API for any Postgres database by pojzon on Sunday November 22, 2020 @07:49PM (#25182487)
Uh, We moved away from postgrest and went back to regular db + rest-service architecture.

The project (postgrest) has too many disadventages at that scale for us.

Re:PostgREST: REST API for any Postgres database by floatingsmoke on Saturday November 21, 2020 @11:43AM (#25170704)
I recently read that supabase.io is using this. https://supabase.io/docs/postgrest/server/about
Re:PostgREST: REST API for any Postgres database by danielbln on Saturday November 21, 2020 @11:42AM (#25170692)
We've used this in production for geospatial data delivery via GKE cloud run. Worked quite well.
Re:PostgREST: REST API for any Postgres database by theshetty on Saturday November 21, 2020 @11:43AM (#25170699)
It looks like, there are a few already using this in production

You can see it on this page: http://postgrest.org/en/v7.0.0/