简体   繁体   中英

ArangoDB microservice dependent on other microservice

I need to call one service from the other so I want to be sure it's ready before I use it. In my case, both microservices are running in the same database.

In the startup script, I would like to wait until the dependency is operational and abort if it isn't ready after a specified time. So this leads to the questions:

  1. How do I detect whether another microservice is started?
  2. What is the best approach to wait for another microservice to start.
  3. If it doesn't start what is the right way to abort starting the current microservice.

Thanks.

Looks like it's actually easy. I set up the "provides" and "dependencies" in the respective foxx manifests. This prevents the dependent service from being mounted before the "provider" is ready to accept requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM