Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Two servers joined together
Old 06-04-2012, 08:59 AM Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Im thinking of using two servers to reduce down time and improve performance of my website.
I need to ask some technical questions and one of them is database sharing across those two servers.
Other files are static, more or less.
How complex can that be to use same database (or two exactly same db's) over two servers?

I found the Ultra Monkey project which is appear to be exactly what i need.

Quote:
Ultra Monkey is a project to create load balanced and highly available network services. For example a cluster of web servers that appear as a single web server to end-users. The service may be for end-users across the world connected via the internet, or for enterprise users connected via an intranet.


Did someone tried using it or can recommend a different one?
miki86 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-04-2012, 10:17 AM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It is called "clustering" and search engines run it a HUGE scale with no problems.


Are you running Windows or Linux boxes?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-04-2012, 12:59 PM Re: Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Im on linux, Centos 5.8 x86. I have only one server at the moment but i would like to research a little this topic because i have absolutely no idea.

Im guessing that two servers would need to be on same OS?
Hardware or network they are on is irelevant?

I also found this ones:
HA Proxy
Pound
Nginx - isn't nginx actually a web server? i didn't know it has such capability.
Linux Virtual Server (LVS)

By looking at the release date i see that some of them are outdated.

So, if i would like to use two servers as the main data handlers i would need a third one with some of the scripts/proxies or how are they called i mentioned above, or i can set the script to run on one of those two servers?

btw i came across this terms "Load Balancers and High Availability Clusters".
Are those scripts capable to run in different modes, like connecting two hdd's to a RAID controller, to work as one (for better performance) or in mirror mode (if one server fails other takes over)?

Last edited by miki86; 06-04-2012 at 01:04 PM..
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-04-2012, 01:12 PM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep you do need to be on the same OS, hardware doesn't really that much and for networking, as long as the servers can "talk" to each other they do not need to be on the same physical network topology

Redhat/Centos clustering documentation is found here -> http://www.centos.org/docs/5/html/Cl...asics-CSO.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-04-2012, 06:05 PM Re: Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Thanks Chris for the info you provided.

I looked at the documentation and i can tell you that it looks very confusing for a linux noob like me.
I can't know until i try right?

Im gonna buy a $2 box just so i can play with this. I have a cluster module in webmin so things will be a little easier, i think.
I really am curious and want to see how it will turn out.

I'll get back with the results, as soon as i actually try something.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-05-2012, 05:23 AM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'm actually just getting to grips with webmin on my Centos 6 box which is tucked away behind me in a corner, so I can broaden my horizons from shell, cPanel and Plesk.

sometimes typing "apt-get upgrade" and other such arcane spells gets a bit wearing.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-05-2012, 05:31 AM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Oh and if you want to play with a "Windows like" Linux distro and desktop, install "Mint" and LXDE on an old machine.

It is not as restricted/restrictive as Ubuntu with it's disabled "root" user and LXDE is the most "user friendly" desktop GUI I've used.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-05-2012, 07:13 AM Re: Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Quote:
Originally Posted by chrishirst View Post
sometimes typing "apt-get upgrade" and other such arcane spells gets a bit wearing.
I know exactly what you mean
Webmin looks terrible, but it's useful. I configured my server and installed webmin in the end when i didn't needed it.

My friend uses a Mint and he always praises it, maybe i'll try it once.

Ok i decided to go with Crossroads load balancer and managed to get it start in demo mode on my test server and this is the output i got:

Code:
3083708112 INFO: +--------------------------------------------+
3083708112 INFO: | Welcome to xr V2.74                        |
3083708112 INFO: | Copyright (c) Karel Kubat <karel@kubat.nl> |
3083708112 INFO: | Distributed under GPLV3.                   |
3083708112 INFO: +--------------------------------------------+
3083708112 INFO: Invoking command line: 'xr -v -s tcp:0:800 -b XXX.XXX.XXX.XXX:80'
3083708112 INFO: Limits for coredump size (bytes): hard limit 4294967295, soft limit 0
3083708112 INFO: Limits for cpu time (sec): hard limit 4294967295, soft limit 4294967295
3083708112 INFO: Limits for data segment size (bytes): hard limit 4294967295, soft limit 4294967295
3083708112 INFO: Limits for max file size (bytes): hard limit 4294967295, soft limit 4294967295
3083708112 INFO: Limits for locked mem size (bytes): hard limit 32768, soft limit 32768
3083708112 INFO: Limits for max open files: hard limit 1024, soft limit 1024
3083708112 INFO: Limits for max processes: hard limit 139264, soft limit 139264
3083708112 INFO: Limits for max resident set size (bytes): hard limit 4294967295, soft limit 4294967295
3083708112 INFO: Limits for max stack size (bytes): hard limit 4294967295, soft limit 10485760
3083708112 INFO: XR running as PID 11606
3083708112 INFO: Listening for activity on fd 3
3083708112 INFO: Back end start states of 1 backends:
3083708112 INFO:  XXX.XXX.XXX.XXX:80 is available
3083708112 INFO: Starting wakeup thread.
3083708112 INFO: Starting checkup thread.
3083708112 INFO: Awaiting activity on fd 3
3083708112 INFO: Got activity on fd 3
3083708112 INFO: Accepted connection from YYY.YYY.YYY.YYY as client fd 5
3083708112 INFO: Balancer is serving 0 clients
3083708112 INFO: Current back end states:
3083708112 INFO:   Back end XXX.XXX.XXX.XXX:80: 0 connections, max 0, status available, anticipated 0
3062725520 INFO: Verifying DOS protection
3062725520 INFO: Creating target list for the TCP dispatcher
3062725520 INFO:   Candidate target: XXX.XXX.XXX.XXX:80
3062725520 INFO: Starting least-connections dispatcher
3062725520 INFO: Will dispatch client to back end XXX.XXX.XXX.XXX:80 on fd 6
3062725520 INFO: Dispatching client fd 5 to XXX.XXX.XXX.XXX:80, fd 6
3083708112 INFO: Got activity on fd 3
3083708112 INFO: Accepted connection from YYY.YYY.YYY.YYY as client fd 7
3083708112 INFO: Balancer is serving 1 clients
3083708112 INFO: Current back end states:
3083708112 INFO:   Back end XXX.XXX.XXX.XXX:80: 1 connections, max 0, status available, anticipated 0
3052235664 INFO: Verifying DOS protection
3052235664 INFO: Creating target list for the TCP dispatcher
3052235664 INFO:   Candidate target: XXX.XXX.XXX.XXX:80
3052235664 INFO: Starting least-connections dispatcher
3052235664 INFO: Will dispatch client to back end XXX.XXX.XXX.XXX:80 on fd 8
3052235664 INFO: Dispatching client fd 7 to XXX.XXX.XXX.XXX:80, fd 8
3083708112 INFO: Got activity on fd 3
3083708112 INFO: Accepted connection from YYY.YYY.YYY.YYY as client fd 9
3083708112 INFO: Balancer is serving 2 clients
3083708112 INFO: Current back end states:
3083708112 INFO:   Back end XXX.XXX.XXX.XXX:80: 2 connections, max 0, status available, anticipated 0
3041745808 INFO: Verifying DOS protection
3041745808 INFO: Creating target list for the TCP dispatcher
3041745808 INFO:   Candidate target: XXX.XXX.XXX.XXX:80
3041745808 INFO: Starting least-connections dispatcher
3041745808 INFO: Will dispatch client to back end XXX.XXX.XXX.XXX:80 on fd 10
3041745808 INFO: Dispatching client fd 9 to XXX.XXX.XXX.XXX:80, fd 10
3083708112 INFO: Got activity on fd 3
3083708112 INFO: Accepted connection from YYY.YYY.YYY.YYY as client fd 11
3083708112 INFO: Balancer is serving 3 clients
3083708112 INFO: Current back end states:
3083708112 INFO:   Back end XXX.XXX.XXX.XXX:80: 3 connections, max 0, status available, anticipated 0
3031255952 INFO: Verifying DOS protection
3031255952 INFO: Creating target list for the TCP dispatcher
3031255952 INFO:   Candidate target: XXX.XXX.XXX.XXX:80
3031255952 INFO: Starting least-connections dispatcher
3031255952 INFO: Will dispatch client to back end XXX.XXX.XXX.XXX:80 on fd 12
3031255952 INFO: Dispatching client fd 11 to XXX.XXX.XXX.XXX:80, fd 12
3062725520 INFO: Done dispatching to back end fd 6 at XXX.XXX.XXX.XXX:80
3052235664 INFO: Done dispatching to back end fd 8 at XXX.XXX.XXX.XXX:80
3041745808 INFO: Done dispatching to back end fd 10 at XXX.XXX.XXX.XXX:80
3031255952 INFO: Done dispatching to back end fd 12 at XXX.XXX.XXX.XXX:80
It's installed on a test server only, im scared to try it on my real one because i think i'll mess something up.
There is no webmin module for Crossroads or XR how they call it, but they have a good pdf document explaining what can be done with it.

Im not sure though if i need to install XR on both of my servers, because it's binding to IP address and acts like webserver instead of those two webservers.

btw Webmin cluster module is for managing several servers with ease, like installing, changing user stuff...not what i need.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-05-2012, 08:17 AM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Im not sure though if i need to install XR on both of my servers, because it's binding to IP address and acts like webserver instead of those two webservers.
That's "load shedding" or load balancing, the client makes a HTTP request to the IP that the balancer, is on which then "decides" which of the peers are ready to handle the request, clustering is where the servers are linked together and synchronised and can then act as a single entity, which is what SEs do.

If you are going down the load balancing route you need three machine at a minimum. Two servers (or more, ideally in the same physical location) plus the balancer machine which in an ideal situation should have multiple network interfaces.

Are you looking for speed? Redundancy/Failover? DOS protection?

Because reading your post thoroughly this time it not quite as obvious as it seemed to be.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-05-2012, 09:17 AM Re: Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Im trying to maximize the uptime and increase speed, that is if one server fails the other one should take over.
Synchronization is necessary and i thought that load balancers are the ones who control all that.

I was confused because reading about load balancers i saw they mention "clusters" and "high availability" but those are two separate things?

Load balancers connect multiple servers and present them as one while making a cluster of servers is actually joining them to work as one.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-05-2012, 04:29 PM Re: Two servers joined together
chrishirst's Avatar
Defies a Status

Posts: 43,970
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Clustering is done for speed and high availabilty because all the machines in the cluster can work together when more power is required, and should one fail, the others take up the slack. "Cloud" computing is an example of clustering on a big scale.

Load balancing is used for reliability and redundancy and/or for systems that need to allow for "burst loading".
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-05-2012, 05:45 PM Re: Two servers joined together
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
After doing some research i realized that clustering is not easy to setup.
I found a pdf instruction but i don't think i can pull that off, at least remotely, because it involves some heavy networking and formating of partitions which i can't use.

The other option (and i think best possible) i had was with load balancers which are easy to use but require multiple servers, im not quite sure how the two mysql servers handle those requests as one.

Third option is to use constant synchronization between two servers, using rsync or csync2, MySQL Cluster (they recommend one extra server for management).By setting the TTL for nameserver to low number, other server will take over. And that is the worst solution possible.

I think i'll go with load balancers if i decide to do something like this.
I'll leave it like it is for now.
miki86 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Two servers joined together
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39380 seconds with 11 queries