
|
View Full Version : Load Balance/Sharing on web servers
qhasxeem 03-20-2002, 10:28 AM I have two web servers with the same info.
How do I load balance or load share that?
Example:
Visitor 1 goes to site 1
Visitor 2 goes to site 2
Visitor 3 goes to site 1
etc.
The web servers are just the same servers and have the same info. One is just a backup and I would like to use that also.
p1net 03-20-2002, 10:35 AM It is possible do this with DNS. Check out ....
http://www.webopedia.com/TERM/R/Round_Robin_DNS.html
and
http://www.engelschall.com/pw/apache/rewriteguide/#ToC29
:stickout
qhasxeem 03-20-2002, 10:47 AM thanks. :)
Now, does anyone know how to create ROUND ROGIN DNS on a COBALT RAQ server?
allan 03-20-2002, 10:48 AM The problem with round robin DNS is that it does jnot take into account the health of a server. If a server should fail, the DNS server has no way of knowing that and will still direct traffic to the site.
A better solution is to use a networked load balancer, which sits in front of the servers, and will redirect traffic to a server based on the selected metrics.
F5, Cisco and Nortel all have excellent products. If you are looking for something cheaper, you can get a Coyote Point, Redhill Networks, or ClickArray load balancer for around $3,000-$4,000, less if you can find one on E-Bay.
avara 03-20-2002, 03:06 PM If you are using scripts on your site (e.g. PHP), bear in mind that sessions can often get lost as users get switched between the servers. This can create quite a bit of difficulty for dynamically generated sites.
allan 03-20-2002, 03:13 PM Originally posted by avara
If you are using scripts on your site (e.g. PHP), bear in mind that sessions can often get lost as users get switched between the servers. This can create quite a bit of difficulty for dynamically generated sites.
Correct, which is another reason why I recommend a network load balancing solution, they allow you to maintain persistency when required.
RyanK 03-20-2002, 03:49 PM Depending on the technology that the site is using you need to setup the round robin DNS as well as session management application so that you can have what's called "sticky sessions" which allows sessions to co-exist on several servers.
qhasxeem 03-20-2002, 04:11 PM For those that might want to know.
I found out to set round robin on my DNS server.
1. Create A records
1.2.3.1 www1.myname.com
1.2.3.2 www2.myname.com
1.2.3.3 www3.myname.com
2. Create CN records
www cname www1.myname.com
www cname www2.myname.com
www cname www3.myname.com
You MUST have BIND for this to work. And as pointed out, this isn't load balancing but rather load sharing. All people from ISP1 will come to #1, all ISP2 will come to #2, etc because the ISP cached the information.
jambler 03-20-2002, 04:22 PM The august 2001 issue of Linux Magazine (Vol. 3 Issue 8), has a great article on this issue in particular, and does not require any additional hardware. The link they provided in the magazine was: http://www.LinuxVirtualServer.org
I'm pretty sure you can find this article in the LM archive on their site. The LVS I believe covers all the issues of session managment and other concerns similar. Have a look, and good luck.
bitserve 03-21-2002, 03:54 AM I've used ipvs for not only load balancing but for just plain port forwarding. It's a very useful kernel module.
Devorius 03-21-2002, 04:39 AM F5, Cisco and Nortel all have excellent products. If you are looking for something cheaper, you can get a Coyote Point, Redhill Networks, or ClickArray load balancer for around $3,000-$4,000, less if you can find one on E-Bay.
That sounds like a load of BS to me. These companies prey on ignorance, as I'm pretty sure you could set this up using an small intermediary server and the right software.
allan 03-21-2002, 08:03 AM Originally posted by Devorius
That sounds like a load of BS to me. These companies prey on ignorance, as I'm pretty sure you could set this up using an small intermediary server and the right software.
Sure, as people mentioned the LVS project is a great way to deploy load balancing. However, the Cisco, Nortel and F5 products can parse more than a million simultaneous sessions. Most servers cannot do that. Also, because they are switch based (the new F5s are as well), the decision making process occurs within the ASIC so they can load balance at wire speed.
jambler 03-21-2002, 01:05 PM Originally posted by Devorius
These companies prey on ignorance
LoL, prey on ignorance? I beg to differ, if you look at the pricing of those products and their intended rules. Its far from what an ignorant person would and should be implimenting that technology for. Cisco, while somewhat over priced, makes excellent hardware, and if I had the money to burn I'd be using at least a few of their products right now.
UmBillyCord 03-21-2002, 01:20 PM Originally posted by Devorius
That sounds like a load of BS to me. These companies prey on ignorance, as I'm pretty sure you could set this up using an small intermediary server and the right software.
I have not looked at all the products you said prey on ignorance, but many of those products, as well as Radwares LB'er, provide full IP routing and Layer 4 through Layer 7 switching which can support multiple gigabits traffic. I assure you, as uuallan put so well ...
Most servers cannot do that.
And if you get one that can, you usually paid almost as much as many of these lower priced LBs run.
2. Create CN records
www cname www1.myname.com
www cname www2.myname.com
www cname www3.myname.com
Don't forget the trailing ".". If you do, your "round robin" will turn into "single elimiation". :)
Devorius 03-21-2002, 05:48 PM Sure, as people mentioned the LVS project is a great way to deploy load balancing. However, the Cisco, Nortel and F5 products can parse more than a million simultaneous sessions.
Hm .. to use that up it would take about 8,640,000,000,000 hits/sessions per day, give or take a few million.
Right.. I'm sure we all have this much traffic, and need these overpriced products.
Give me a break. Unless you have anywhere close to those numbers, you can do it with an intermediary server.
jambler 03-21-2002, 05:54 PM you dont need "8,640,000,000,000 hits/sessions per day", all you need is a million at once. just like a car, 90%+ of its time is spent rusting away, the other 10%- you actually drive it. And your right, some webhost with even a few hundred customer doesnt really have a need for those products. Why do you think theyre not advertising to you. "Mission critical" systems use them, banks, isps, DC, Gov, etc etc etc. People that consider even a minute worth of downtime to be uncalled for. And, can flip the bill. : )
allan 03-21-2002, 06:00 PM Originally posted by Devorius
Right.. I'm sure we all have this much traffic, and need these overpriced products.
Give me a break. Unless you have anywhere close to those numbers, you can do it with an intermediary server.
Again, just because you do not need them, does not mean everyone thinks the same way that you do. A lot of companies consider load balancing to be a valuable asset to their service.
Also, an intermediary server is a single point of failure. Load balancers are generally deployed in pairs, preventing that problem. Of course you can deploy LVS on a pair of servers as well :). But not all companies want to use an open source project, and LVS does not have some of the extended capabilities that these other products do.
e5p1der 03-21-2002, 08:19 PM Jambler, granted you are correct in that assumption, but then you are comparing apples to oranges then. The servers can handle that load but I wouldn't compare them to an F5 or Cisco product that specializes in that type of thing.
WHRKit 03-23-2002, 02:26 AM Take a look at BigIp or other hardware load balancers. They are not cheap but offer several good options!
The Fish
|