-
Notifications
You must be signed in to change notification settings - Fork 155
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
[leo_gateway] Allow user to choose strong consistency or performance of inner cache #459
Comments
For 4KB Objects, the difference is significant. It would increase from ~30000 ops to ~45000 ops |
Thanks for your proposal. I've understood your request but there are some issues in it.
Actually, I've been considering the metadata-cache feature from last week. If we reached the consensus, I'll share that. |
Sorry I don't understand the concern, this suggestion does not aim to remove the check completely but rather allow user to choose.
To me, one of the strengths of LeoFS would be low latency and so I would like to improve it in this aspect. Once again, I just want to give the freedom to user given that the code/flow change is not much. |
At the beginning of implementation of the cache feature, we considered consistency between gateway-node(s) and a storage cluster. Our viewpoint is users expect strong consistency, we chose the strong consistency solution. If it's inconsistency between http-cache and inner-cache, we need to fix |
@yosukehara Just for your consideration. |
@ZhaoX In our company, LeoFS has been used by lots of services. We cannot handle their needs both a strong consistency and an weak consistency with the LeoGateway's configuration. In order to improve LeoFS performance, we've implemented concurrency of read-operation in LeoStorage.
By the feature, LeoFS performance is dramatically improved: |
@yosukehara Thank you for your reply. |
@ZhaoX Sorry I made the mistakes in the environment session, it is done with 1.2.20-dev |
@ZhaoX Thank you for you concern about this issue. But after a second thought, the benefit of the design not as huge as I first suggested. |
Description
When using the
inner cache
inleo_gateway
, ETag of cache is compared with the one in backendleo_storage
for every cache hit.The round trip is not favorable for small read intensive workload, users may want to relax the consistency for better performance.
Proposal
Reference to the expire mechanism in
http cache
, allow the user to choose from "Strictly checked" to "check once 5 minutes" by setting thecache.cache_expire
Setting to
0
means checking every time and other values mean check oncex
secondsRelated PRs
leo-project/leo_gateway#36
The text was updated successfully, but these errors were encountered: