Ad Widget

Collapse

why Zabbix Server can't use Nginx TCP Proxy as a load balancing?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waydeechen
    Junior Member
    • Jun 2014
    • 16

    #1

    why Zabbix Server can't use Nginx TCP Proxy as a load balancing?

    HI:

    I tried to use Nginx TCP proxy or Citrix Netscaler to load balance Zabbix Server,But I failed,why?
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    Do you want to load balance Zabbix server or Zabbix Web Frontend?
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • waydeechen
      Junior Member
      • Jun 2014
      • 16

      #3
      Originally posted by jan.garaj
      Do you want to load balance Zabbix server or Zabbix Web Frontend?
      I want to load banance zabbix server,and failed

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        IMHO it's not good idea. Zabbix server has your own value/config cache. So what can happen if you load balance 2 Zabbix servers with one DB.
        Example:
        1st request from zabbix agent with critical value will handle Zabbix Server 1 - it will raise Event CRITICAL.
        2nd request from zabbix agent with normal value will handle Zabbix Server 2 (because we use load balancing), but this server doesn't have previous critical value in value cache, because previous critical value has been handled in Zabbix Server 1, so previous critical event will not be closed/cleared.

        IMHO if you balance zabbix server on, you will have serious problem with DB consistency.

        Maybe you solved this consistency problem :-) Could you describe your infrastructure schema for Zabbix server load balancing please?

        And let's go one step back: Why do you need to load balance zabbix server? Do you have some serious performance problem? Do you want to have HA?
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        • waydeechen
          Junior Member
          • Jun 2014
          • 16

          #5
          Originally posted by jan.garaj
          IMHO it's not good idea. Zabbix server has your own value/config cache. So what can happen if you load balance 2 Zabbix servers with one DB.
          Example:
          1st request from zabbix agent with critical value will handle Zabbix Server 1 - it will raise Event CRITICAL.
          2nd request from zabbix agent with normal value will handle Zabbix Server 2 (because we use load balancing), but this server doesn't have previous critical value in value cache, because previous critical value has been handled in Zabbix Server 1, so previous critical event will not be closed/cleared.

          IMHO if you balance zabbix server on, you will have serious problem with DB consistency.

          Maybe you solved this consistency problem :-) Could you describe your infrastructure schema for Zabbix server load balancing please?

          And let's go one step back: Why do you need to load balance zabbix server? Do you have some serious performance problem? Do you want to have HA?
          thanks, I know pacemaker+corsync to provide HA infrastructure for zabbix server; but no load balancing, So I test TCP proxy and failed ; Now I know why zabbix server can't load balancing, thanks

          Comment

          • jan.garaj
            Senior Member
            Zabbix Certified Specialist
            • Jan 2010
            • 506

            #6
            Actually, that was only problem with load balancing. It was not reason of your problem.

            I don't know your config, but I'll try to find your problem:
            Zabbix server receive some item value(s) from agent for host A. But IP of incoming network connection (IP of loadbalancer), doesn't match IP in Zabbix configuration of host A. It's "fake" information for Zabbix and probably is ignored. Eventually you can solve it, if you setup item type to Zabbix trapper and set loadbalancer IP into Allowed hosts for this item.
            And then you will need to solve consistency problem (for example agent has to be served always by the same zabbix server), problem how to define healthcheck, ... it will need some deep investigation.

            IMHO: it can be possible, but there will be a lot of workarounds/hacks, because it's no designated for loadbalancing.
            Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
            My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

            Comment

            Working...