2 ms·
is it still difficult to create a cluster of pg dbs. either for redundancy or speed ? Last time i advocated for using pg vs mongodb, the person replied that mo
by bsaul 3y ago
is it still difficult to create a cluster of pg dbs. either for redundancy or speed ?
Last time i advocated for using pg vs mongodb, the person replied that mongodb clustering was super easy.
- baq 3y agoMongo absolutely can be the right answer if you need to horizontally scale to tens or hundreds of TBs. Anything below that I’d rather have a small cluster of big Postgres instances. There’s value in a SQL RDBMS which you just don’t get anywhere else.
- Ozzie_osman 3y agoRead replicas are pretty easy on postgres using replication. That said, you need to be careful about replica lag. If you want to distribute your writes, that's a little trickier. There are options like Citus and such. But still not natively supported.
- KingOfCoders 3y agoSecond that. A client hat PG replica lag, was doing backups from the replica and found out during restoring a backup, that some hours of data were missing.
- jononor 3y agoOuch? Are there standard tools to monitor that? Any best practice to avoid? I am considering exactly tha kind of setup...
- 5Qn8mNbc2FNCiVV 3y agoI don't know about there being a standard tool but you can track the LSNs together with a timestamp on the write node and from there calculate the replica lag by checking what LSN the replica is at