Nishantha Pradeep
Nishantha Pradeep

Reputation: 87

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 ?

Upvotes: 0

Views: 949

Answers (2)

JosMac
JosMac

Reputation: 2302

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:

Upvotes: 2

Morten
Morten

Reputation: 654

  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 e.g. a boot.

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

Upvotes: 0

Related Questions