Confused about load balancing and horizontal scaling in postgresql
First rule of horizontal scaling of a database is to avoid it. At all cost. You should consider it only when no server you can possibly buy can handle your data. And there are servers which can handle enormous amounts of data today.
Horizontal scaling of a database will give you:

at least an order of magnitude more complicated system:

even in a simplest case of sharding you'd have to manage more servers, distribute load evenly, manage schema updates and shared tables in all nodes, make your frontend connect to correct server etc.;
if you use replication instead, then you'd have to manage replication delay, failing queries on a replica, secure transfer of data between primary and replicas, replicas going out of sync, updates have to be run against master etc.;


at least an order of magnitude more bugs, direct consequence of above complications;

at least an order of magnitude harder to debug bugs, direct consequence of above complications;

at least 2 times higher probability of hardware failure - you'd have at least 2 servers, probability of any of them failing is higher than one specific failing;

probably an order of magnitude worse performance than a single server for the same price, as better storage options like battery backed drive controller or SSDs, partitioning your data, smart placement of WAL files, bigger cache etc. would be far more important than buying another, slow server; remember that databases are mostly bottlenecked by storage.


You can scale horizontally clients connecting to a database (frontends are mostly bottlenecked by processor, so this makes sense), you should use replication for failover (so called warm standby server), you can partition your data within the same database (which would get you most of benefits of sharding with far less drawbacks). Just don't do horizontal scaling before you're of a comparable size to Google, Twitter or Facebook. So no 2 small EC2 instances, no.