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

[config] use LRU cache for configuration store #274

Merged
merged 5 commits into from
Feb 24, 2017
Merged

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Feb 24, 2017

  • prevent memory leaks with long running instances
  • offers TTL

The important change here is when new configuration is loaded it overrides all existing configuration for those hosts.

When path routing is not enabled nothing really happens as there can be just one service for each host.
But when path routing is enabled and first you load two services for host 'a' and next time just one service for host 'a' it removes the first service. Which is more correct.

* new configuration always overrides the old one
* if there is a service with some host and new one comes in
  it will override the original
so we can expire configuration after some timeout
@mikz mikz merged commit c60999c into master Feb 24, 2017
@mikz mikz deleted the configuration-store-lru branch February 24, 2017 11:45
@mikz mikz removed the in progress label Feb 24, 2017
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

Successfully merging this pull request may close these issues.

2 participants