The invention discloses a method for realizing
high availability and load balancing of Influxdb-proxy on the basis of zookeeper, and the method comprises the following steps that S1, the Influxdb-proxy is started,
service information is registered to a zookeeper father node, and a temporary child node is generated; S2, the zookeeper monitors the operation state of each influxdb-
proxy service in real time through a watcher, after a certain service is abnormally offline, the zookeeper can actively delete the temporary node of the service, and meanwhile, the zookeeper informs a
client of node change; and S3, the
client obtains the available influxdb-
proxy service address from the zookeeper again. The method for realizing
high availability and load balancing of the Influxdb-proxy based on thezookeeper has the advantages that the availability is high; the operation and maintenance cost can be reduced, the stability of the influxdb cluster is improved; the influxdb cluster can be guaranteedto continuously provide the service for the outside, loss caused by hardware,
software and
human error proneness is reduced,
concurrency is improved, the zookeeper can be configured with multiple influxdb-proxy, load balance is realized, and influxdb cluster performance is improved.