LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-03-2016, 05:57 AM   #1
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Rep: Reputation: Disabled
master slave load balancing


Hi,

I have a server and I need to make load balancing for it(master,slave)
So I know I need to create a slave. But how can I install load balancing on master so it would work on slave aswell?

Any help or links are appreciated.
 
Old 02-03-2016, 08:53 AM   #2
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
First question is what kind of server is it? What service is it providing? web/mail/file/...

What operating system are you on?

Are you trying to have an automatic failover, or do you just want to switch over manually when there is a problem?
 
Old 02-04-2016, 03:52 AM   #3
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Sorry for not replying.

I finally know more information about the server.
So my "load balancer" is running debian Linux.
Other terminals are windows 2008 servers.
I need to load balance RDP connections(remote desktops).
I'm an intern and I'm really bad with Linux I have been reading a lot but didn't find anything worth trying.

So in short my debian server needs to balance windows RDP between 2 or 3 windows servers.
 
Old 02-04-2016, 03:58 AM   #4
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Ok, then what you want to look into is haproxy with TCP load balancing.

According to this link it even support RDP cookies ...
http://www.loadbalancer.org/blog/loa...nd-rdp-cookies
 
Old 02-04-2016, 05:35 AM   #5
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
This was not very clear. I copied haproxy.cfg and changed stuff I need. But I couldn't find where to put the startup script.
Apart from that if I did everything good should this balancing work? Because my debian server isn't connected to anywhere.
 
Old 02-04-2016, 05:42 AM   #6
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Quote:
Originally Posted by boxstep View Post
But I couldn't find where to put the startup script.
With the limited info you have given us here, I'm going to make the following assumptions (isn't that fun )
  • You have already installed haproxy from the debian repository
  • You are running debian jessie
The install scripts already exist, you just need to run 'systemctl restart haproxy' to make your changes take effect.

Quote:
Originally Posted by boxstep View Post
Apart from that if I did everything good should this balancing work?
Yes, but that's a huge assumption.

Quote:
Originally Posted by boxstep View Post
Because my debian server isn't connected to anywhere.
I don't know what this means.
 
Old 02-04-2016, 05:49 AM   #7
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
cant restart haproxy getting some errors. tried restarting whole server still getting error. the error outputs just loaded started etc etc.. and failure=1.

and for the startup script
"You will need to change your HAProxy start up scripts:" this line is from that link you gave me
where is this script located?
 
Old 02-04-2016, 05:58 AM   #8
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Ah, I see now. You are following the instructions in the link I provided. That is now what I intended. There should be tons of links on the internet explaining how to setup TCP load balancing, and they'll be easy enough to follow.

Configuring the RDP session cookie is more advanced and will require installing a specific development version (might be in a more stable version as well, I have no idea). I only provided the link as some extra information if you want to take your configuration to the next level. It's always best to start simple.
 
Old 02-04-2016, 07:07 AM   #9
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
can you please link me to that? I can't seem to find anything I can follow...
 
Old 02-04-2016, 07:20 AM   #10
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Here is one of many examples

http://www.linickx.com/load-balance-...g-with-haproxy
 
1 members found this post helpful.
Old 02-05-2016, 02:06 AM   #11
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
One more question. I managed to set up the connection, but all counters are at 0. How can I make them live?

http://s16.postimg.org/q28yeu3yt/Capture.png
 
Old 02-05-2016, 02:20 AM   #12
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Is it working? Have you tried connecting RDP to the haproxy server?
Anything in the haproxy log file?
 
1 members found this post helpful.
Old 02-05-2016, 02:22 AM   #13
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
I'm not sure if its working or not, no error logs. And no I have not tried to connect RDP. The servers are linked
and at first table some numbers are changing. but at the second table nothing is changing except for time.
 
Old 02-05-2016, 02:24 AM   #14
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
The first table is the "stats" server. The one that you are connecting to to see that image. That's why it is updating. Try to connect RDP and see if it works. Then the other table should update.
 
1 members found this post helpful.
Old 02-05-2016, 02:26 AM   #15
boxstep
LQ Newbie
 
Registered: Feb 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
I just tried to connect with remote desktop connection to the ip of my debian server, it connected me to 1 of the windows servers.. so I guess its working?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPVSADM not load balance MySQL Master-Master tquang Linux - Server 1 06-26-2013 09:42 PM
MySQL Master-Slave Replication - How to make the slave read-only? saagar Linux - Server 1 08-31-2010 08:13 AM
Ldap Master slave aravindhcl Linux - Server 1 12-26-2007 07:26 PM
Master and slave? Siiiiiii Linux - Hardware 4 05-27-2006 03:53 PM
Slave to Master? s9722 Linux - General 6 02-23-2004 10:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration