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

Use app definition for task in same version. #170

Open
janisz opened this issue Feb 2, 2017 · 1 comment
Open

Use app definition for task in same version. #170

janisz opened this issue Feb 2, 2017 · 1 comment
Labels

Comments

@janisz
Copy link
Contributor

janisz commented Feb 2, 2017

With #145 and #164 we put a plaster on Marathon app task differences. We should obtain app definition for task in version defined in task. We can use /v2/apps/{app_id}/versions/{version} endpoint to get this information. What's more we can cache app definitions and to reduce calls to marathon. Only drawback of this solution is versions could not be available since it could be configured to keep last n entries. We need to think what we should do in that circumstances.

@janisz janisz added the bug label Feb 2, 2017
@janisz
Copy link
Contributor Author

janisz commented Feb 3, 2017

App definition for given version is immutable so we can cache it. This will reduce Marathon queries but will increase memory usage (one app definition JSON takes approx 2.36K). We need to handle applications that was not changed but only scaled. This means we need to persist App Definitions. Cache entry could be evicted if it's not used within sync interval. We could use https://github.com/golang/groupcache but then we need to think about data peristency if one or more instance goes down (e.g. version update).

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

No branches or pull requests

1 participant