jhipster / jhipster-registry

JHipster Registry, based on Spring Cloud Netflix Eureka and Spring Cloud Config
Apache License 2.0
698 stars 657 forks source link

Self preservation disable in config files but documentation mention it as activated #426

Closed jfougere closed 4 years ago

jfougere commented 4 years ago

Eureka self preservation mode was switched off quite some time ago by this PR https://github.com/jhipster/jhipster-registry/pull/84

But the documentation included in the replica page still mention the settings like this: enable-self-preservation: true

See: https://github.com/jhipster/jhipster-registry/blob/6c7747c34d80fe10c0435686d121e9193f14b9ee/src/main/webapp/app/registry/replicas/replicas.component.html#L123

I suppose this documentation should be fixed.

pascalgrimaud commented 4 years ago

unless I'm wrong, this property should be 'false' for development in local, but needs to be 'true' if you want to replicate the Registry.

jfougere commented 4 years ago

@pascalgrimaud I'm no expert but I don't think so. My understanding is that it serves to stop unregistering instances when no heartbeat are received past a certain threshold. cf https://dzone.com/articles/the-mystery-of-eurekas-self-preservation

For info, I looked into that because we had "zombies" instances never unregistered from the registry after some abrupt shutdown. Searching for solutions I found https://github.com/jhipster/generator-jhipster/issues/3654 and the changes made were to switch the property off.

The application-prod.yml & especially the peer1 and peer2 files were changed, so to my point of view the document in replicas.component.html should also reflect this change.

What do u think ?

pascalgrimaud commented 4 years ago

Ok I see. In this case, you're right and our documentation needs to be updated I don't use Eureka for my customer, we prefer using Consul :)