Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

add a etcd monitor #946

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from
Open

add a etcd monitor #946

wants to merge 3 commits into from

Conversation

felipejfc
Copy link

This monitor is cleaner than redisMonitor because of how etcd works, using watchers is just simpler.
There should be a big improvement in networking usage on big clusters using this monitor because it only traffic data when it's necessary.
The etcd lib used already supports specifying many etcd nodes(for clustered etcd setup) and automatically handle reconnects.

Example usage

app.configure('development', function() {
  app.set('monitorConfig', 
    {
      monitor: pomelo.monitors.etcdmonitor,
      etcdNodes: ["localhost:2379","localhost:2389","localhost:2399"],
      period: 2000,
      prefix: "pomelo-1"
    })
})

New constants

DEFAULT_ETCD_PERIOD
The default period that the servers will use to refresh ttl on their keys @ etcd.

@cynron
Copy link
Member

cynron commented Mar 31, 2017

awesome! thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants