In the process of system update, we encountered another problem: netcore application loaded on IIS will not start automatically with IIS startup, but must be triggered by browsing access. You can't register with the consul before you start.
Therefore, every time the program is updated, the netcore program cannot be registered with consul, because netcore cannot start automatically.
There seems to be nothing wrong. When IIS stops, the service registered by Consumer will turn red xx due to health check.
When IIS is started, the node will be restored after passing the health check.
Within a few seconds between IIS stop and health check, if a request occurs, consul thinks that the service is normal, but the node is actually inaccessible, resulting in the service being unavailable for several seconds.
It seems that compared with the first time, we shortened the unavailable time of the service from 1 minute to a few seconds. But it's not enough, it needs to be optimized!
Stop IIS at this time, Consume's service will be cancelled immediately, and Consume's service will be re-registered after it is started!
/article /9696 1627 195/
/posts/2065 438+06/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS