RE: multiple spamd machines
--- Dan Barker [EMAIL PROTECTED] wrote: You can try it with one machine, multiple IP's/multiple spamd's with the -i. Mmm, interesting idea, but why would anyone do that instead of just using a single instance of spamd and increasing max-children? Oh--! You were just giving me a way to try this idea. I get it. ;) Thanks! Dan snip Best way to see is to try it. Indeed, although I don't have both machines online... just trying to get my ducks in a row before taking the plunge. /snip __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Re: multiple spamd machines
OK, distilling this conversation a little bit, can anyone comment on this: You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com. IN A127.0.0.1 spa.yourdomain.com. IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. Why? Does dnscache randomize for you? I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. But using the DNS-based approach as you do, it *will* fail over?? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no? Thanks! __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Re: multiple spamd machines
email builder wrote: OK, distilling this conversation a little bit, can anyone comment on this: You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com. IN A127.0.0.1 spa.yourdomain.com. IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. Why? Does dnscache randomize for you? I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. But using the DNS-based approach as you do, it *will* fail over?? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no? Thanks! Hi, Yes, if I telnet spa.yourdomain.com, then telnet spa.yourdomain.com I will connect first to one server, then the next. That how ever is not fail over, that's dns round robin. If machine one really failed, then queries to that machine would still fail (I think, haven't tested it) How ever, if I use the syntax -d 127.0.0.1, x.x.x.x, it will always connect first to 127.0.0.1 and I believe, will only fail over to x.x.x.x if the 127.0.0.1 spamd daemon is down (different from being overloaded) Best way to see is to try it. Regards, Rick
RE: multiple spamd machines
--- Bowie Bailey [EMAIL PROTECTED] wrote: From: email builder [mailto:[EMAIL PROTECTED] OK, distilling this conversation a little bit, can anyone comment on this: You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com. IN A127.0.0.1 spa.yourdomain.com. IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. Why? Does dnscache randomize for you? I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. But using the DNS-based approach as you do, it *will* fail over?? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no? DNS will not fail over, but it should give you crude 50/50 load balancing. Sometimes the server will get one IP and sometimes it will get the other. The server should either rotate or randomize the IPs. You will need to test your DNS server to see how it works. This is assuming that you will query the server each time. Local caching can kill this scheme. OK, so that makes sense, and that to me is an argument to use: spamc -d 127.0.0.1 123.4.5.678 -H If I understand, this will do the same thing as the DNS-based scheme, but will always give round robin results (man page says it is randomized I think), and it has the benefit of no worries about DNS cache causing problems. Thoughts? As far as I know, there is no way to weight the traffic toward a particular server without some sort of load balancing or proxy solution. Sounds reasonable. So if the processing capabilities of my two SpamAssassin servers is *vastly* different, it seems like I should just forget the idea of trying to use the underpowered one unless I can figure out a way to load balance... yeah? __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Re: multiple spamd machines
--- Rick Macdougall [EMAIL PROTECTED] wrote: email builder wrote: OK, distilling this conversation a little bit, can anyone comment on this: You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com.IN A127.0.0.1 spa.yourdomain.com.IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. Why? Does dnscache randomize for you? I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. But using the DNS-based approach as you do, it *will* fail over?? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no? Thanks! Hi, Yes, if I telnet spa.yourdomain.com, then telnet spa.yourdomain.com I will connect first to one server, then the next. That how ever is not fail over, that's dns round robin. If machine one really failed, then queries to that machine would still fail (I think, haven't tested it) Understood. How ever, if I use the syntax -d 127.0.0.1, x.x.x.x, it will always connect first to 127.0.0.1 and I believe, will only fail over to x.x.x.x if the 127.0.0.1 spamd daemon is down (different from being overloaded) But if I understood the man page, if you add -H, then it will randomize between 127.0.0.1 and x.x.x.x, right? This is roughly the same thing as the DNS-based solution you are using, isn't it? Or am I missing something? Best way to see is to try it. Indeed, although I don't have both machines online... just trying to get my ducks in a row before taking the plunge. Many thanks for your advice! __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: multiple spamd machines
email builder wrote: Hello, Since I have not been able to tackle the excessive CPU usage of spamd on a single machine (see the thread spamd still burning CPU in 3.0.1), I am hoping that the people who said I am simply maxing out spamd's capabilities are right: I am moving to a multiple box solution. I will be putting a machine online that will likely do little else than run spamd. I may or may not continue to run a couple spamd children on the original machine, just to help out. I have two questions: 1) Is it a waste of a whole machine to just run spamd? I suppose I will be watching its resource usage, but am wondering if it will be available to be used as a MySQL server and/or something like NFS. 2) I am clueless about how to serve spamd in more than one place. How do I tell spamc that I have more than one spamd listening for requests in more than one place? Also, one spamd will be running a lot more children and will thus take more requests -- do I somehow (how???) need to load balance or will it happen automatically by simply seeing that one of my machines' spamd currently has no available children? U, I am lost here. Anyone know of any good reading I can do? Links? Tips? How-to's? Reading man spamc, I see: -d host In TCP/IP mode, connect to spamd server on given host (default: localhost). If host resolves to multiple addresses, then spamc will fail-over to the other addresses, if the first one cannot be connected to. So do I just do this: /usr/bin/spamc -u username -d 127.0.0.1 123.45.6.789 Again, is load balancing going to be an issue with this configuration? Remember, one of these addresses will be underpowered compared to the other. Ah, then this: -H For TCP/IP sockets, randomize the IP addresses returned from a DNS name lookup (when more than one IP is returned). This provides for a kind of hostname-base load balancing. I am not sure how to use this one, but it looks a little more like what I want. Can anyone offer pointers on how to implement this? Hi, You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com. IN A127.0.0.1 spa.yourdomain.com. IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. To do true load balancing you need a hardware or software load balancer running, linux will do it if you ever need/want to get into that. I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. Regards, Rick
Re: multiple spamd machines
Thanks so much for your reply. Further thoughts/questions inline below: Since I have not been able to tackle the excessive CPU usage of spamd on a single machine (see the thread spamd still burning CPU in 3.0.1), I am hoping that the people who said I am simply maxing out spamd's capabilities are right: I am moving to a multiple box solution. I will be putting a machine online that will likely do little else than run spamd. I may or may not continue to run a couple spamd children on the original machine, just to help out. I have two questions: 1) Is it a waste of a whole machine to just run spamd? I suppose I will be watching its resource usage, but am wondering if it will be available to be used as a MySQL server and/or something like NFS. 2) I am clueless about how to serve spamd in more than one place. How do I tell spamc that I have more than one spamd listening for requests in more than one place? Also, one spamd will be running a lot more children and will thus take more requests -- do I somehow (how???) need to load balance or will it happen automatically by simply seeing that one of my machines' spamd currently has no available children? U, I am lost here. Anyone know of any good reading I can do? Links? Tips? How-to's? Reading man spamc, I see: -d host In TCP/IP mode, connect to spamd server on given host (default: localhost). If host resolves to multiple addresses, then spamc will fail-over to the other addresses, if the first one cannot be connected to. So do I just do this: /usr/bin/spamc -u username -d 127.0.0.1 123.45.6.789 Again, is load balancing going to be an issue with this configuration? Remember, one of these addresses will be underpowered compared to the other. Ah, then this: -H For TCP/IP sockets, randomize the IP addresses returned from a DNS name lookup (when more than one IP is returned). This provides for a kind of hostname-base load balancing. I am not sure how to use this one, but it looks a little more like what I want. Can anyone offer pointers on how to implement this? Hi, You are darn close there... What you want is /usr/bin/spamc -u username -d spa.yourdomain.com -H And spa.yourdomain.com has two ptr records, one to 127.0.0.1 and the other to 123.45.6.789 in Bind talk that would be spa.yourdomain.com. IN A127.0.0.1 spa.yourdomain.com. IN A123.45.6.789 and in tinydns +spa.yourdomain.com:127.0.0.1:3600 +spa.yourdomain.com:123.45.6.789:3600 I'm not sure if you really need the -H, I know I don't using dnscache as my local dns server. Why? Does dnscache randomize for you? To do true load balancing you need a hardware or software load balancer running, linux will do it if you ever need/want to get into that. Ideally, I'd not like to have to take that up just yet. ;) I haven't tested using a -d 127.0.0.1,123.45.6.789 to see if spamc will fail over to the second host if all the connections are busy on the first host. I could be wrong but I don't think it will fail over to the second host because the first host will just place it in the queue to be processed. I could very well be wrong though. But using the DNS-based approach as you do, it *will* fail over? Why? It seems like if spamd tries to queue up any request it gets, then it would happen to you, too. Spamd should not have any way of knowing if you used DNS to resolve it or the addresses were listed on the command line, no? Thanks! __ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com