IT.COM

www1 or www2 or load balancing???

Spaceship Spaceship
Watch
Impact
18
Hi guys

I am using a free hosting account.
Sometimes the free host goes down.SO i signed up for 2 free hosts so that I can switch between them easily whenver I want.
All these days I used to do it manually.
Is there any of doing it automatically?
I heard somewhere that www1 or www2 points to different server with different nameserver?

I also heard that a loadbalancer can be used?

Can anybody tell me how use all this and help me with my queries?

Regards
BBalegere
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
A post from cvxdes might be able to help you.

cvxdes said:
What I suggest is have 2 or 3 servers, all at different data centers, and then, on the main server, set it like this:
www.namepros.com => Master Server (Should be most powerfull)
mysql.namepros.com => Possibly a VPS, or master server
www1.namepros.com => server 1
www2.namepros.com => server 2
www3.namepros.com => server 3

Then, in your config file, mod it so it chooses at random either www, www1, www2, or www3. Then, change the mysql to be either at a dedicated server for sql, or for the main server. Now, all you have to do is copy the files and have them on all 3 servers.

This way, all 3 servers will be able to work at the same time at random, and distribuite load. Also, you wont have to wait for XX minutes for your posts to load across the sql databases on all the different servers.

I think that'll also be a good idea because the forums have been a bit slower the past few weeks, and to be quite honest, Ive stayed away from them. It does seem a bit faster, now.
 
0
•••
I believe what Joey posted is if you're using load balancing servers. In your case, do you have a domain for this site?
 
0
•••
If you want good hosting go to www.forums.DigitalPoint and ask for a sponsor they will buy you a host.
 
0
•••
You can't have free hosting and do load balancing. You could however host your DB on one free host, and host your forum on another. This would easily be done by changing your mysql database to user.freehostingdomain.com instead of localhost. Make sure you allow the IP through cPanel if you are using it.

Or you could host the forum on 2 free hosts, then mysql on another, and make a small php script to check to see if one is up, if it is then direct to that free host forum (same db so if someone posts on another one of your hosting accounts it will show on the other one) otherwise it will direct to secondary.

Wouldn't be too hard but if I were you I would seriously consider moving to a paid host so you won't have to worry about it.

Thanks!
 
0
•••
Is there any 3rd party service which does this?
Camron said:
You can't have free hosting and do load balancing. You could however host your DB on one free host, and host your forum on another. This would easily be done by changing your mysql database to user.freehostingdomain.com instead of localhost. Make sure you allow the IP through cPanel if you are using it.

Or you could host the forum on 2 free hosts, then mysql on another, and make a small php script to check to see if one is up, if it is then direct to that free host forum (same db so if someone posts on another one of your hosting accounts it will show on the other one) otherwise it will direct to secondary.

Wouldn't be too hard but if I were you I would seriously consider moving to a paid host so you won't have to worry about it.

Thanks!
 
0
•••
Camron said what I was going to upon your reply. You're just not going to find third party services that will setup load balancing for you for free. My advice is if that site means that much to you, find a paid host (can be done for as a little as $5-$6 a month) that won't go down on you.
 
0
•••
Technically it's not load balancing. Load balancing is balancing your load ;).

This is keeping your site up, faster etc. However this idea is really only good for a dedicated server or vps as if one free host is heavily overloaded (aren't they all ;)) you will still get the same speed as hosting it all on one :).

Good luck!
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back