简体   繁体   中英

PostgreSQL streaming replication for high load

I am planning to migrate my production oracle cluster to postgresql cluster. Current systems support 2000TPS and in order to support that TPS, I would be very thankful if someone could clarify bellow.

1) What is the best replication strategy ( Streaming or DRBD based replication)

2) In streaming replication, can master process traffic without slave and when slave come up does it get what lost in down time ?

About TPS - it depends mainly on your HW and PostgreSQL configuration. I already wrote about it on Stackoverflow in this answer . You cannot expect magic on some notebook-like configuration. Here is my text " PostgreSQL and high data load application ".

1) Streaming replication is the simplest and almost "painless" solution. So if you want to start quickly I highly recommend it.

2) Yes but you have to archive WAL logs. See below.

All this being said here are links I would recommend you to read:

But of course streaming replication has some caveats which you should know:

  1. There is no “best solution” in this case. Which solution you pick depends on your requirements.
    • Do you need a guarantee of no data lost?
    • How big a performance hit can you tolerate?
    • Do you need failover or just a backup?
    • Do you need PITR (Point In Time Recovery)?
  2. By default, I think a failed slave will be ignored. Depending on your configuration, the slave might take a long time to recover after eg a boot.

I'd recommend you read https://www.postgresql.org/docs/10/static/different-replication-solutions.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM