Skip to content

Document when to use an LRO vs. a VLRO in REST APIs #373

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

Open
annelo-msft opened this issue Jun 20, 2022 · 2 comments
Open

Document when to use an LRO vs. a VLRO in REST APIs #373

annelo-msft opened this issue Jun 20, 2022 · 2 comments
Assignees
Labels
Azure Guidelines This issue relates to the Azure Guidelines.

Comments

@annelo-msft
Copy link
Member

In the DeviceUpdate API, some operations use the x-ms-long-running-operation tag, where others are represented as a resource. This is according to the guidance found in the current API guidelines:

✅ DO implement an operation as an LRO if the 99th percentile response time is greater than 1s.
In rare instances where an operation may take a very long time to complete, e.g. longer than 15 minutes, it may be better to expose this as a first class resource of the API rather than as an operation on another resource.
https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#long-running-operations--jobs

It would be great to clarify guidance regarding when specifically to use operations on another resource vs. a standard LRO, and what this pattern looks like.

@JeffreyRichter, @mikekistler, @johanste, @KrzysztofCwalina, @tg-msft, FYI

@JeffreyRichter
Copy link
Contributor

I'll kick start this:
Use a real resource instead of an LRO if

  • A client needs to LIST the operations (or subset thereof).
  • The operation result can live a long time (typically more than 24 hours).
  • The operation could take longer than a client would want to poll.
    • I admit this is wishy-washy but maybe > 5 minutes? I'm open to other ideas here or killing this bullet entirely.

@pj-ms
Copy link

pj-ms commented Apr 3, 2024

Hello, any update on this topic?

Say we are using A to create B (like using training job to create/train a model), I have some specific questions like:

  • is deleting the A allowed, where the B it created is still there
  • what to do with A, if B is deleted?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Guidelines This issue relates to the Azure Guidelines.
Projects
None yet
Development

No branches or pull requests

4 participants