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

Add async API #1

Open
anjackson opened this issue May 17, 2019 · 0 comments
Open

Add async API #1

anjackson opened this issue May 17, 2019 · 0 comments

Comments

@anjackson
Copy link
Contributor

anjackson commented May 17, 2019

The default synchronous API is brittle with long-running tasks, particularly when the service is under high load. Very long socket connect/read timeouts are hard to ensure as the kernel or network layers can override client settings.

We should add an async API endpoint that:

  • Takes a POST request that defines the render parameters.
  • Returns a render task resource (202 Accepted + Location ?)
  • Other location returns 403 Forbidden or 504 Gateway Timeout until the item is ready.
  • When done, returns a 200, returning the full GET URL.

Then need to mod the client to launch and poll until timeout rather than rely on socket timeouts. As well as timing out, the client would give up polling if the response was anything other than 403 Forbidden or 504 Gateway Timeout.

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

No branches or pull requests

1 participant