keijack / python-eureka-client

A eureka client written in python. Support registering your python component to Eureka Server, as well as calling remote services by pulling the the Eureka registry.
MIT License
183 stars 43 forks source link

When the third-party service changes the IP address and re registers, the client cannot update the cache #61

Closed wanxiang110 closed 2 years ago

wanxiang110 commented 2 years ago

One: When the third-party service changes the IP address and re registers, the client cannot update the applications cache. Can you add functions?

Two: for python 3.7+ 647: return self.__eureka_availability_zones.keys()[0] error:TypeError: 'dict_keys' object is not subscriptable

keijack commented 2 years ago
  1. The cache will be updated in next heartbeat, for the mechanical of the eureka, the registry will only be pulled by the client, but not pushed by the server. And It's not efficient to pull the registry in every service call. If you want to update the registry more frequently, you can set renewal_interval_in_secs smaller, which is set to 30 seconds by default.

  2. This is a bug and it's fixed now in 0.10.4.