Setting OUT_OF_SERVICE for one app causes all apps with the same instanceId to register as such

30 views
Skip to first unread message

Alessandro De Simone

unread,
Dec 2, 2016, 7:09:51 AM12/2/16
to eureka_netflix
Hello everyone,

I'm using a custom made C# library to register and query instances in Eureka. So we use the REST Api. The "instancedId" I use is the servername + port to allow multiple instances of the same app on one machine (generally for testing purposes).

Everything works great but recently I wanted to allow a service to be set as OUT_OF_SERVICE using PUT /eureka/v2/apps/appID/instanceID/status?value=OUT_OF_SERVICE.

However OUT_OF_SERVICE is set to all apps running on the same host. 
For instance, the request "PUT /eureka/v2/apps/myapp/myserver-80/status?value=OUT_OF_SERVICE" also sets this status for unrelated instances like  myotherapp/myserver-80

This issue seems related to https://github.com/Netflix/eureka/issues/690 which was closed one year ago (I don't find the commit however). I tried v1.6.1 but the issue persists.

1) am I using the instanceid correctly ? My instanceId is unique within a specified app. Maybe the instanceid must be unique in the whole directory? By default the instanceId is the hostname, so I suppose it must be unique only within the app.

2) if yes, why do we have to specify appID and instanceId in the REST API if only the instanceid is taken into account?

Am I missing something ?

Thanks,

Alessandro
Reply all
Reply to author
Forward
0 new messages