All of the above suggestions are valid, I think. I think this is a matter of circumstance around your problem.
Depending on whether you can start A yourself, you can use a third element, such as Gas, to ensure that A does not appear (and does not work or gets stuck) if B is not ready.
If, on the other hand, A starts automatically and you cannot change it, it depends on whether you can control when the initialization process occurs. If you plan to initialize the entire dependency chain, and it should work, but if you donβt know or cannot control when B enters the network and A starts no matter what, then there is no choice but to interrogate until B will be up.
Personally, I saw that the survey is not so bad as long as the expected one is available, it starts quickly or quickly recovers in the event of a failure.
On the other hand, can you control how clusters begin their configuration? You could avoid this problem by first creating the first application cluster.
source share