2

Please correct me if I am wrong but I guess handling more requests and load by adding more machines or balancing the load between multiple servers is horizontal scalling. So, if I add more servers, how do I distribute the database? Do I create one database to hold the user records with multiple servers? Or do I split the database too? What about database integrity? How to synchronize it? Or else what do I do? I am a newbie and really confused but eager to learn. I would really appreciate if you could explain it to me. Thank you!

1 Answers1

1

In this type of setup, your database tier may not necessarily need to scale horizontally or at the same rate as your web tier. It's typically the web layer that scales behind a load balancing solution.

For database scale-out, look into sharding.

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • Thank you for the answer. I would like to use postgres for my project and would like to know some basic things before I start. I was thinking of using two small ec2 instances. But I got confused about the database. How do I go about creating the database. Do I need to go through sharding for this? Could you please elaborate a little more. Thank you. – Benjamin Smith Max Feb 22 '14 at 23:17
  • @Benjamin It's outside of my realm... [The people here would know more](http://dba.stackexchange.com). – ewwhite Feb 22 '14 at 23:19