Cluster IP or Load balance or ?

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Cluster IP or Load balance or ?

Post by BanditBBS »

Ok, now that this has been out longer and has more users I'd like to get a consensus. I talked about this before, but I want to approach the topic again.

How are people handling load balancing between all their log server nodes? We can do it via F5(which we are doing) and then users browse to that IP and our systems send logs to that IP. We then of course get the benefits of the F5 load balancer, but the big drawback is the F5 rewrites the source IP in the packet, so everything seems to be coming from it instead of the real sources.

We could use DNS Round Robin, but what happens if a host goes down then....

I've been researching clustering options for linux and most seem to be for application clusters and we don't need that for NLS as the nodes all talk to each other already. If you know a good option, point it out.

The other option would be to use the F5 just for browsing and setup the systems to send logs to either of the node IPs. The issue with that is not true load balancing and also, if a node goes down, no logs from systems sending there during the node outage.

Ideas? Inputs?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cluster IP or Load balance or ?

Post by jolson »

I'd like to add HAProxy into the mix - though the configuration might be difficult. Not sure about the benefits or downfalls of HAProxy versus the F5 load balancer.

One thing to keep in mind is that even though elasticsearch will load balance the data on the backend, the inbound logs are not load balanced. If you were to send a billion logs to a single instance of logstash in a short period of time, you'd certainly knock it over or encounter some issues - and also face the risk of having a single point of failure.

I am not familiar with F5 balancers - do they have a transparent load balancing option? I understand that this is trickier to implement, but it could be worth looking into if you want the whole shebang. This way, you'd retain the source IP addresses of your end hosts as well as having logstash redundancy/load balancing.

That's my two cents.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Cluster IP or Load balance or ?

Post by BanditBBS »

jolson wrote:I'd like to add HAProxy into the mix - though the configuration might be difficult. Not sure about the benefits or downfalls of HAProxy versus the F5 load balancer.

One thing to keep in mind is that even though elasticsearch will load balance the data on the backend, the inbound logs are not load balanced. If you were to send a billion logs to a single instance of logstash in a short period of time, you'd certainly knock it over or encounter some issues - and also face the risk of having a single point of failure.

I am not familiar with F5 balancers - do they have a transparent load balancing option? I understand that this is trickier to implement, but it could be worth looking into if you want the whole shebang. This way, you'd retain the source IP addresses of your end hosts as well as having logstash redundancy/load balancing.

That's my two cents.
Yes, there is transparent option, but if we did that(enabled the feature) we'd have to change a million other things we've done for customers with the F5.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cluster IP or Load balance or ?

Post by jolson »

I assume it's not possible to disable source-IP re-writing based on destination addresses? For instance, if destination address were to equal one of the NLS nodes, don't re-write the source IP. Of course this is assuming that all traffic will flow through the F5 anyway.

I've been looking through options, and can't find one that absolutely shines above the rest. I typically like to recommend round-robin-dns, as it's easy to setup and requires little maintenance - but you do risk losing log information/web GUI connectivity if a node goes down. You could reduce the TTL to 60 seconds, but there's no guarantee that the DNS provider would respect that - plus client would likely cache for longer than 60 seconds.

I also understand that Logstash is working on a high availability mechanism, so there is hope for future improvement in this area: https://github.com/elastic/logstash/issues/2633

Anyone else have thoughts here?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Cluster IP or Load balance or ?

Post by eloyd »

Some thoughts:

Code: Select all

Do you have to use the same proxy that you're using for customers?  
Different IP for browsing than for sending logs (virtual interface if needed)
Light(er) weight Squid proxy just for NLS
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Cluster IP or Load balance or ?

Post by BanditBBS »

I was thinking about using HAProxy or something that I can install on the nodes and use a virtual IP between them. You have something that's simple to install as I have never installed any :(
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Cluster IP or Load balance or ?

Post by eloyd »

I'd look into Squid.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Cluster IP or Load balance or ?

Post by benhank »

we are testing out HA. We have set op a VIP on the netscaler. I am setting up my devices to send to the vip. I am rebuilding one of my NLS boxes. By browsing to the vip, i can get to my 2nd node.
I haven't configured any devices to send to the vip yet .
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Cluster IP or Load balance or ?

Post by BanditBBS »

Dangit, most of this topic is useless now as I found out its not the F5 changing the source IP but the router that does the NAT between our data centers. So my question now, any harm in the nodes being far away from each other? right now both are in Chicago. can I move the one to San Francisco so items there can just send directly to that node and items in Chicago just send directly to the Chicago node. I was planning on sending logs from devices from SF to Chicago, so syncing the two servers shouldn't be anymore load, right? Anyone see an issue with that?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Cluster IP or Load balance or ?

Post by jolson »

This is something that you shouldn't have problems doing, but keep in mind that some of your settings will need to be more fine-tuned than your standard deployment since your nodes are so far apart.

Take a look at the following:
https://www.elastic.co/guide/en/elastic ... ster_nodes
Since your nodes will be further apart, it's more likely that there will be a connectivity issue. The minimum_master_nodes setting is very important here - it should be set to a quorum of your total amount of nodes.

You might also take a look at the fault detection settings and set them appropriately: https://www.elastic.co/guide/en/elastic ... -detection

Since shards are migrated dynamically between nodes, your cluster will take up more bandwidth as your amount of log data grows - but that's a given.

Besides the above, you'll need to do some port forwarding - port 9300-9400 (selected dynamically) are important for node-to-node communication.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked