database - Scaling Postgres horizontaly -
let running business on top of postgresql database. after time traffic cannot handled single postgresql instance, want add more instances (scale horizontally) able handle growth.
your data relational, switching key/value solution not option.
how postgresql?
ps. postgresql version: 9.5
if read-heavy workload should add replicas. add many replicas need handle whole workload. can balance queries across replicas in round robin fashion.
if write-heavy workload should partition database across many servers. can put different tables on different machines or can shard 1 table across many machines. in latter case can shard table range of primary key or hash of primary key or vertically rows. in each of cases above may lose transactionality, careful , make sure data changed , queried transaction resided on same server.
Comments
Post a Comment