1

We are thinking of setting up a high availability PostgreSQL server with master-slave configuration (possibly multiple slaves). Should we use a direct link between a master and a slave or let them connect through a switch? We might add more servers (slaves) and also load generation servers (for benchmarking purposes).

amitlan
  • 121
  • 4

1 Answers1

1

Obviously if you want to add more servers, a switch or multiple switches (for failover and easy scaling) would be a better idea than a direct link.

Adding a load balancer would be more easy as well.

Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
  • yeah, we are realizing that on flexibility grounds, but were skeptical about data transfer rates between the servers, but turns out that isn't much of an issue. May switch become a bottleneck once master pushes more and more data into network in turn causing the first slave to also do the same (case of cascaded replication). There is added overhead of benchmarking load generation server – amitlan Feb 05 '13 at 06:06
  • Well you have to invest in a good switch as well :) – Lucas Kauffman Feb 05 '13 at 06:11
  • Juniper EX 2200T, 48-port 10/100/1000BaseT with 4 SFP uplink ports (optics not included). What say? – amitlan Feb 05 '13 at 06:19
  • 1
    It is extremely unlikely that even a fairly cheap switch will ever be a bottleneck. For example, a random consumer-grade 8-port switch going for $30 has a 16Gbps switching fabric, meaning it has 16x more bandwidth than you can get out of a single server's GigE copper connection. – Scrivener Feb 05 '13 at 06:40
  • @Scrivener when buying a switch you need to look at more than the bits it can process, the amount of packets the switch can process is important as well, if not more. – Lucas Kauffman Feb 05 '13 at 13:05