Skip to content

Delay startup till dependencies ready #28

@karolz-ms

Description

@karolz-ms

Problem description

Many services require dependencies (databases, async comm facilities etc.) to be available to do any work. While it is ultimately required for robust services to be resilient when dependencies are missing or misbehaving, starting everything at once and relying on health checks/retries unnecessarily slows down the startup and results in a lot of noise in the logs.

Aspire customers have been using and recommending https://github.com/davidfowl/WaitForDependenciesAspire and experimenting with it (e.g. https://github.com/afscrome/WaitForDependenciesAspire fork) which shows this is an unmet need.

Use cases

  • Wait till dependency has successfully started
  • Wait till dependency service is ready to serve traffic (endpoint created)
  • Wait till dependency is healthy
  • Wait till dependency is done running (ran successfully) -- e.g. for database seeding

Related issues

https://github.com/microsoft/usvc/issues/69 (the health check feature) will be required for "wait till dependency is healthy" use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-orchestratorAffects DCP usage in Microsoft AspireenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions