Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



Web Server/MySQL Load Balancing


7 replies to this topic - - - - -

#1 Ferret

    Neowinian Wise One

  • 4,661 posts
  • Joined: 01-April 03
  • Location: Lincolnshire, UK !

Posted 30 April 2012 - 00:35

Hello chaps,

Hopefully you can help me here :)

I've got myself a dedicated Win Server 2008 box running my web server and SQL server for my forum (Got it nice and cheap considering the specs ;)).

Anyway, I also have another dedicated Win Server 2003 box sat idling that i'm paying for, that i'd like to utilize.

Both boxes are in different locations, but I would like to share the load between the 2 - So if one goes offline, the other box can take the load.
A duplication, but with different OS's. This must be possible, but whats the best way of going about this ?

I would like to have the Win Server 2008 box take 90% (atleast) of the load if possible as it has far high specs and a better pipe to it. With the secondary server just taking the lightest load possible.

Thanks,
Ferret !


#2 OP Ferret

    Neowinian Wise One

  • 4,661 posts
  • Joined: 01-April 03
  • Location: Lincolnshire, UK !

Posted 02 May 2012 - 00:15

Please..... I'm sure someone knows how to get this kinda setup going.

Thanks :)

#3 +remixedcat

    meow!

  • 9,463 posts
  • Joined: 28-December 10
  • Location: Pink and Purple and Black palace in the sky....
  • OS: Windows Server 2012 Standard/Windows 7 x64 SP1
  • Phone: I use telepathy and cat meows to communicate

Posted 02 May 2012 - 00:17

Ever look into hardware load balancers?? That and VMWare cloud can do it as well.

#4 pupdawg21

    Neowinian²

  • 234 posts
  • Joined: 16-June 09

Posted 02 May 2012 - 00:39

An easy simple way but not resilient to outages or necessarily fully balanced would be to just use DNS.

Configure the entire site on both servers and put in entries for your domain containing the public IPs of both Hosted servers.

This way traffic would round robin between the (2) servers based solely on whichever IP is served first to the client. However, when one goes down a user might inadvertantly be sent to the server that's down on their 1st attempt. Not ideal but it would make both servers be utilized but not at the 90% / 10% ratio that you desire.

You would need to work out a way to keep the database data in sync between the (2) mysql instances.

#5 hjf288

    Korean Crazy Man!

  • 2,414 posts
  • Joined: 19-April 03
  • Location: United Kingdom

Posted 02 May 2012 - 00:57

HaProxy?

#6 mbowman

    Neowinian²

  • 133 posts
  • Joined: 15-November 11

Posted 02 May 2012 - 11:18

How much lag would be behind having one server as the database server and the other as the web server seeing as they're at different locations?

Maybe if you have lots of images you could use the 2003 server for hosting these images?

Simple ways of reducing the loads.

#7 The_Decryptor

    THE ALPHA CEPH!

  • 18,355 posts
  • Joined: 28-September 02
  • Location: Sol System
  • OS: WinLin X 10.9 Ill-tempered Badger

Posted 02 May 2012 - 11:28

If they're in different locations, how are you sharing SQL access? Are you pointing them at the same physical server, or are you doing replication or such over the net?

If they were in the same location you could use something like nginx to proxy access to the servers (And have it serve static content, leaving the main servers to handle dynamic content)

#8 OP Ferret

    Neowinian Wise One

  • 4,661 posts
  • Joined: 01-April 03
  • Location: Lincolnshire, UK !

Posted 05 May 2012 - 14:49

View PostThe_Decryptor, on 02 May 2012 - 11:28, said:

If they're in different locations, how are you sharing SQL access? Are you pointing them at the same physical server, or are you doing replication or such over the net?

I'm going for replication over the net for the SQL.

What I might try is what pupdawg21 suggested. It's not the ideal situation is I was hoping for, but it's better than nothing :)

Thanks chaps.