Home > Net >  .net core consul for service, found that the service is in each request execution or in the client s
.net core consul for service, found that the service is in each request execution or in the client s

Time:10-30

As title, tested in each request from the consul access Service, found that the Service (). The Result of this step is slow, takes about two seconds, the basic, not with ah, is only when the client start from consul for Service? But it's lost services such as automatic registration and find the ah, from start to do micro service, strives for the great god give advice or comments,

CodePudding user response:

Never use.net service,
Then I said spring of micro service,
Since it is service, certainly need registry, routing center watch do you need, that you're right,
But if found service, this can be set in the registry, including the registry can set the discovery service frequency of heartbeat packets,
You said: find the Service (). The Result in this step slowly
Is found that the interval is too long,


CodePudding user response:

And micro service started, also need time,
Maybe after he started, at the right moment after registry heartbeat packet inspection time, so they are waiting for the next check will be registered

My side in the spring registry Settings in the cloud, for your reference,
Should be about the meaning of
 eureka: 
Server:
Enable - self - preservation: false # set to false, closed to protect themselves, would be inactive node
Eviction - interval timer - in - ms: 30000 # inactive node time interval (unit of milliseconds, the default is 60 * 1000)

  • Related