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

Suggested API #11

Open
shlomi-noach opened this issue Feb 20, 2017 · 4 comments
Open

Suggested API #11

shlomi-noach opened this issue Feb 20, 2017 · 4 comments

Comments

@shlomi-noach
Copy link

Starting with the most basic usage, this Issue will present would-be API endpoints.

  • /write-request/<app-name>/<store-type>/<store-name>
    This is the primary request freno would serve: an app connecting and asking "is it OK to write?".
    examples:

    • /write-request/spokes/mysql/maincluster
    • /write-request/gh-ost/mysql/othercluster

    Initially we will only support the mysql store-type. Other stored may be added in the future.

Further comments to this issue will present other API endpoints

@miguelff
Copy link
Contributor

Hey @shlomi-noach I was thinking on providing sensible defaults to be able to spike new applications or services that require throttling functionality, without requiring configuration changes on freno itself. Thus, a request to:

  • <ENDPOINT_ROOT>/<storage-name> - Would default to storage type mysql, and an anonymous application, for the given storage. (Disabling anonymous - unregistered- applications, could be a matter of configuration too)

  • <ENDPOINT_ROOT>/<storage-name>/<app-name> - Would default to storage type myql, for the given application and storage.

  • <ENDPOINT_ROOT>/<storage-name>/<app-name>/<storage-type> - Would specifiy all the variables.

Also, is there any reason why we prefer to call <ENDPOINT_ROOT> write-request instead of the shorter write?

@shlomi-noach
Copy link
Author

@miguelff I was also thinking about defaults, and what I'm concerned about is that we would add an application that calls the API without specifying an app-name, and then another one and another one, and would never update the apps to specify their names, because that's life, and end up with lots of calls we're not sure where they came from.

Or maybe I'm just being pessimistic.

At least, we could keep the existing URI and just have the apps use the name default for app-name.

Same can go for mysql

Also, is there any reason why we prefer to call <ENDPOINT_ROOT> write-request instead of the shorter write?

No particular reason. If we find that shorter URIs make a substantial savings for network, we can alias it as much as we like. We can then go for w for writes, m for mysql etc.

@shlomi-noach
Copy link
Author

shlomi-noach commented Mar 24, 2017

Update: we have /check instead of /write-request:

  • /check/<app-name>/<store-type>/<store-name>
  • example: /check/gh-ost/mysql/main7

@shlomi-noach
Copy link
Author

TODO:

  • API documentation page

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

2 participants