WebFaction
Community site: login faq

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 scaling. So, if I add more servers, how do I distribute the database? Do I create only one database to hold the user records with multiple servers? Or do I split the database too? Then 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 like to use postgres for my project and would like to know some basic things before I start. What I want to do is, create two servers for the application load balancing (please correct me if its not what I have to do). How will I manage the database across these without database integrity? How do you guyz have multiple instance and manage database? Do I need to go through sharding for this? What would be the best approach to have many instance without database integrity in accordance to postgresql. I would really appreciate if anyone could explain it to me. Thank you!

asked 23 Feb '14, 07:39

kany
112
accept rate: 0%


Adding more servers (plans) to your account would be horizontal scaling, but please bear in mind that the only automatic load balancing provided by our multiple server support is at the DNS level. Database replication needs to be handled elsewhere. There's no real one true method for duplicating data, especially in "real-time". This really depends on how frequently your data for this particular application is updated. If you have, for example, a WordPress blog that only gets a new entry every other day then you may find that putting together a simple script run as a daily cron job would suffice, simply merging the new / updated data across to the failover server(s). If you have a very busy application that is being updated many times an hour then you may wish to implement something more detailed perhaps at a code level which will write to all available servers.

permanent link

answered 23 Feb '14, 08:05

waynek
4254
accept rate: 27%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×84
×6
×4
×3

question asked: 23 Feb '14, 07:39

question was seen: 2,077 times

last updated: 23 Feb '14, 08:05

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM