pgsql-general
❮
Describing the natural architecture for an internet-facing Postgres based app: feedback sought
- Jump to comment-1guyren@relevantlogic.com<guyren@gmail.com>Apr 28, 2026, 3:25 AM UTCComing from a Rails/PHP/etc world. All of those communities generally hold that the database should be treated as a dumb data bucket with all the logic in the middleware.
I’ve long thought someone should write up what the alternative architecture using Postgres to its fullest would look like. In order to differentiate it, I start from the security advantages and work forward.
I’d love to get some feedback on it. Harsh criticism is most useful… :-)
lydb.xyz/zero-authority-architecture https://lydb.xyz/zero-authority-architecture/- Jump to comment-1Laurenz Albe<laurenz.albe@cybertec.at>Apr 28, 2026, 5:20 AM UTCOn Tue, 2026-04-28 at 13:24 +1000, guyren@relevantlogic.com wrote:
Coming from a Rails/PHP/etc world. All of those communities generally hold that
No harsh critizism, but I am wary of all extremist positions.
the database should be treated as a dumb data bucket with all the logic in the middleware.
I’ve long thought someone should write up what the alternative architecture using
Postgres to its fullest would look like. In order to differentiate it, I start from
the security advantages and work forward.
I’d love to get some feedback on it. Harsh criticism is most useful… :-)
Just as I think that it is silly to keep the database as dumb as possible,
I doubt that it is a good position to put all the smarts into the database.
One obvious disadvantage is that if you put much of the processing into
the database, most of the load will be on the database server, which is
difficult to scale.
Why not let each component do what it is best at?
Yours,
Laurenz Albe- Jump to comment-1Guyren Howe<guyren@gmail.com>Apr 29, 2026, 5:42 AM UTCThanks for the feedback.
If you’re doing a small business application, running code in the database isn’t a concern.
If you’re doing a larger application, you’re probably sharding anyway. If you have more database servers and fewer web servers, is that actually an issue?
Updated the piece to discuss this.
On 28 Apr 2026 at 15:20 +1000, Laurenz Albe <laurenz.albe@cybertec.at>, wrote:On Tue, 2026-04-28 at 13:24 +1000, guyren@relevantlogic.com wrote:
Coming from a Rails/PHP/etc world. All of those communities generally hold that
the database should be treated as a dumb data bucket with all the logic in the middleware.
I’ve long thought someone should write up what the alternative architecture using
Postgres to its fullest would look like. In order to differentiate it, I start from
the security advantages and work forward.
I’d love to get some feedback on it. Harsh criticism is most useful… :-)
No harsh critizism, but I am wary of all extremist positions.
Just as I think that it is silly to keep the database as dumb as possible,
I doubt that it is a good position to put all the smarts into the database.
One obvious disadvantage is that if you put much of the processing into
the database, most of the load will be on the database server, which is
difficult to scale.
Why not let each component do what it is best at?
Yours,
Laurenz Albe- Jump to comment-1Laurenz Albe<laurenz.albe@cybertec.at>Apr 29, 2026, 7:54 AM UTCOn Wed, 2026-04-29 at 15:42 +1000, Guyren Howe wrote:
If you’re doing a larger application, you’re probably sharding anyway.
No, but sharding is absolutely non-trivial. Your application has to be designed
If you have more database servers and fewer web servers, is that actually an issue?
for it, and your data must be so that they can be split across shards with as few
interconnections as possible. Spinning up more application servers is much easier.
Yours,
Laurenz Albe