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

Faster memory client #520

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Faster memory client #520

wants to merge 23 commits into from

Conversation

elcasteel
Copy link
Contributor

Add an implementation of the memory resource client that does not clone resources as they are written and read. In gloo edge, we use the memory client to hold proxies that are only generated by the gloo pod. Because proxies can be quite large, the clones take up significant space and GC resources and we can make decisions about when clones are necessary outside of the client.

@solo-changelog-bot
Copy link

Issues linked to changelog:
solo-io/gloo#7166

Copy link
Member

@EItanya EItanya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the behavior of this type is exactly the same without the clone, should the other client extend this one so we ensure the other behavior remains the same?

@elcasteel
Copy link
Contributor Author

I think we need locks around more of the methods in this client - we should not be able to call Write and List at the same time.
Also, I was planning to let the caller clone resources that it intends to modify after reading but given that we've recently learned that clones can modify the original, I'm going to add methods to return a cloned resource.

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.

4 participants