|
-
Nov 25th, 2008, 02:30 AM
#1
Load Balancing and DAL
I have no experience with multiple servers that handles database access, is this a hardware setup or is there something that should be put in a DAL to allow it to be horizontally scalable (scaled out)?
Pls. be gentle with on this one.
-
Dec 1st, 2008, 10:40 AM
#2
Fanatic Member
Re: Load Balancing and DAL
it can be either or.
I own a web hosting company where we have multiple racked servers linked together. Hardware is the best bet, as the chances of it "not responding" are...never. Plus, it doesnt take resources on the servers.
Software can be used. Basically have it monitor server 1. If server 1's load is higher than 4, then start moving files / requests / gets to server 2. Keep doing so until Server 1's load = Server 2's load. Then have it wait till server 1's load is 4.5..then do it until server 2's load is 4.5....(just an example)
Cant explain how to do it, but if you were decent in coding, it can be done.
-
Dec 1st, 2008, 07:02 PM
#3
Re: Load Balancing and DAL
You shouldn't have logic in your DAL for load balancing as Carter says. What you need is server hardware to do it. Basically you give your database server one address and the load balancer can scale and use any database under that address. Web server would work the same (so you really don't need to do anything on your end; your infrastructure people would, however).
-
Dec 2nd, 2008, 01:39 AM
#4
Re: Load Balancing and DAL
 Originally Posted by kasracer
You shouldn't have logic in your DAL for load balancing as Carter says.
Hmmmnn... Discussed here are some principles that I need to follow so my application would be scalable horizontally. Did I get the message wrong?
-
Dec 2nd, 2008, 10:45 AM
#5
Re: Load Balancing and DAL
Distributed programming allows you to spread your execution across multiple machines (think folding@home, SETI or render farms). Load balancing allows you to have multiple servers setup to pass users back and forth if one's load becomes too high.
In a load balancing setup users will be passed to different servers depending on which server has the lowest load.
-
Dec 31st, 2008, 09:48 AM
#6
Re: Load Balancing and DAL
You shouldn't need to cater to this in code.
As an example, you can have 4 web servers and 2 database servers. Set up a replication between the two database servers. Have 2 web servers pointing at DBServer1, and the other 2 web servers pointing at DBServer2.
Have an arrowpoint that handles any incoming web server request and sends it to any one of the 4 web servers.
That's called load balancing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|