[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] etcd-provider - service keys to register service for discovery
- From: Scott Lewis <slewis@xxxxxxxxxxxxx>
- Date: Fri, 25 Nov 2016 23:11:32 -0800
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0
On 11/25/2016 12:20 PM, Keimel, Christoph wrote:
I've been playing with the etcd discovery provider lately with the aim of replacing zeroconf for our escape game platform. It's very nice and really, really (!) fast. In the escape game deployment scenario the system will be running longer than 20 minutes, which is why I set TTL to 0 so the services will not be removed automatically. (The default TTL is 1200 seconds.)
This raises another issue though: As long as an application is shutdown gracefully the service key will be removed from etcd. But if you kill an application this is not the case. Unfortunately this is exactly what happens with the Raspberry Pi gateways on site. The guys power up the pi at the morning and at the evening they just kill the power to shut it down. The effect is that the keys will stay in etcd for ever. Since the keys are generated randomly for every session this leads to duplicates of services in etcd.
I had a look at EtcdDiscoveryContainer and I was wondering if we could use a key to register the service with etcd that doesn't change between session? What do you think?
Yeah, I imagine that you could publish/advertise a service with a
consistent key. I can't remember if this will require any changes to
the etcd provider (e.g. to allow the key to be explicitly set), but if
so I could probably arrange to at least help with the changes.