Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There should be a way to have a running sequence of modules in the deployments #1105

Closed
gauravagarwal28 opened this issue Apr 18, 2019 · 3 comments

Comments

@gauravagarwal28
Copy link

image

The modules in my images are failing because the edgeHub module has not yet started and thus the IoT Clients are not getting initialized.

No module should be started until the edgeHub starts.
Also, I have a server module that is dependent on a postgres module.

I keep retrying the connection in my server module until the postgres module starts.
It would be much better if we could have a provision to specify the dependency of a module on another module.

@myagley
Copy link
Contributor

myagley commented Apr 18, 2019

Thanks for the issue. I understand the issues that you are facing.

However, IoT Edge doesn't support starting modules in a particular order to encourage building resiliency into your module. This was a deliberate choice.

From the perspective of a module, there is no difference in a module starting before a dependency and that dependency crashing. Start up order may help in the first instance, but won't help if the Edge Hub (or any other module your module depends on) crashes or is updated. You need to build in this resiliency. The IoT Hub SDK will retry operations for you, and you should be able to adjust it's timeouts.

Kelsey Hightower (of Kubernetes fame) does a good job of capturing this philosophy in one of his posts: https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c. The bit about start up order comes near the end.

@damonbarry
Copy link
Member

Question answered, and no further activity. Closing...

@luiscantero
Copy link

See StartupOrder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants