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

  1. if read-heavy workload should add replicas. add many replicas need handle whole workload. can balance queries across replicas in round robin fashion.

  2. 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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -