LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-07-2006, 03:31 AM   #1
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
Load Balancing In Linux?


Hi! I've noticed that when you ping www.yahoo.com and ping it again, you will get different IPs. How do they do this? I have a theory that they've included it on their DNS entries such as www1.yahoo.com, www2.yahoo.com, www3.yahoo.com, etc. However, I am also thinking they've done this to balance the load on the servers. If this can be done in linux, how can I do it? I have my own mail server and would like to balance the load on each servers by having two running servers which can be act as both POP and SMTP.
 
Old 07-07-2006, 03:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it's a round robin DNS, which most DNS servers can do just fine. Often large sites will use the geographical location of the source address (you) to point you towards a local server to, to spread it around multiple data centres. just check out BIND for round robin dns.
 
Old 07-07-2006, 04:29 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by depam
If this can be done in linux, how can I do it? I have my own mail server and would like to balance the load on each servers by having two running servers which can be act as both POP and SMTP.
How many mails a day are you processing to require load-balancing?
And what hardware & which MTA are you using?


Cheers,
Tink
 
Old 07-07-2006, 10:22 AM   #4
depam
Member
 
Registered: Sep 2005
Posts: 861

Original Poster
Rep: Reputation: 30
Our company is using a single PC for the mail server. Having the following specs:

P4 3.2 LGA
120 GB Sata Drive
2 GB DDR Ram

We use xmail for receiving and exim for sending. We have an average of 1000+ mails per day (SMTP and POP).

I am just curious how I can do that?
 
Old 07-07-2006, 10:34 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i'm lost.... how do you expect to dns load balancing with one server??

if you wish to spread email across two servers then you'd actually use MX records with equal priorites, not necessarily dns round robins anyway.
 
Old 07-07-2006, 04:13 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by depam
Our company is using a single PC for the mail server. Having the following specs:

P4 3.2 LGA
120 GB Sata Drive
2 GB DDR Ram

We use xmail for receiving and exim for sending. We have an average of 1000+ mails per day (SMTP and POP).

I am just curious how I can do that?
Acid can't see how the balancing will work, and I can't
see a need for it. We're processing around 30+ K incoming
& outgoing mails off a single Sparc 550MHz machine with
with 2GB RAM. Internally we use Groupwise.



Cheers,
Tink
 
Old 07-07-2006, 04:46 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by Tinkster
Acid can't see how the balancing will work, and I can't
see a need for it. We're processing around 30+ K incoming
& outgoing mails off a single Sparc 550MHz machine with
with 2GB RAM. Internally we use Groupwise.
yeah all that, but then it is nice to know you have a 100% proven resilient infrastructure. active/passive or active/on-a-tape or active/oooh-bloody-hell are fine while they work, but knowing for sure that two boxes are concurrently performing as expected on a minute by minute basis is a great thing to know!
 
Old 07-07-2006, 10:59 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by acid_kewpie
yeah all that, but then it is nice to know you have a 100% proven resilient infrastructure. active/passive or active/on-a-tape or active/oooh-bloody-hell are fine while they work, but knowing for sure that two boxes are concurrently performing as expected on a minute by minute basis is a great thing to know!
True enough, and we have another machine with identical set-up
for fail-over.
But he was explicitly asking about load-balancing which
seems like overkill with that workload.


Cheers,
Tink
 
Old 07-08-2006, 11:09 AM   #9
depam
Member
 
Registered: Sep 2005
Posts: 861

Original Poster
Rep: Reputation: 30
Guys,

do you think the setup is overkill for the mail server? Another thing that I've noticed with our mail server is that even though it is already 2GB Mem, I still consume 99% of its memory.
 
Old 07-08-2006, 01:40 PM   #10
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
depam,

What is consuming all the memory? Allocated memory does not mean it's running out. Here's the output from my machine:
Code:
             total       used       free     shared    buffers     cached
Mem:          2025       1954         71          0         66        906
-/+ buffers/cache:        980       1044
Swap:         1961          3       1957
At first glance it appears that 1954/2025=96.4% of RAM in my machine is used, leaving only 3.6% or so for program execution. This is not so! If you look at the next line, you'll see that just about a gig of RAM is being used for buffering/caching. This is basically available memory, since as programs need more RAM, it is reallocated.

So here is the question:

WHAT is consuming all the RAM on your system? Is it Postfix? Email clients? clamav? spamd? Or, is it simply caching a lot, and you're only looking at the first line of the "free" command without looking further?

In other words, dig a little deeper. ps aux will give you some good info on each individual process using RAM, and top will enable you to monitor it in realtime. 99% utilization may not be a problem at all.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
load balancing cirogl Linux - Enterprise 3 05-25-2006 04:46 PM
Setting Up a linux router - with load balancing ? yahooadam Linux - Networking 5 01-30-2006 09:37 AM
How to do load balancing tkt Linux - Networking 0 04-27-2005 01:22 AM
Load Balancing otisthegbs Linux - Networking 4 02-10-2005 02:16 PM
Load Balancing Linux Router Setup remigus Linux - Networking 2 12-02-2002 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:50 AM.

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