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

optimisation(carbonserver): separate grpc expandedGlobsCache from findCache into a separate one, and restore response caching in findCache; and use expandedGlobsCache in http find/render #520

Merged
merged 1 commit into from Feb 6, 2023

Conversation

timtofan
Copy link
Contributor

@timtofan timtofan commented Feb 3, 2023

This is expected to speed up http renders.

A few points about the new cache:

  • it's initialised without memory limit, same as find response and render response caches. Might be worth to review this in future for all 3 caches.
  • there is no toggle to disable this cache, it can be added later if needed.
  • 4 graphite metrics are introduced for visibility into cache performance:
    find_expanded_globs_cache_hit
    find_expanded_globs_cache_miss
    render_expanded_globs_cache_hit
    render_expanded_globs_cache_miss

@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch 3 times, most recently from 599aac7 to 9b75d8d Compare February 4, 2023 17:45
@timtofan timtofan changed the title optimisation(carbonserver): http render - re-use find glob cache optimisation(carbonserver): http - repurpose findCache from storing find http responses to store expanded globs; and re-use this cache in render for expanding globs Feb 4, 2023
@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch from 9b75d8d to 441584e Compare February 4, 2023 17:46
@timtofan timtofan changed the title optimisation(carbonserver): http - repurpose findCache from storing find http responses to store expanded globs; and re-use this cache in render for expanding globs optimisation(carbonserver): http - repurpose listener.findCache from storing find http responses to store expanded globs; and re-use this cache in render for expanding globs Feb 4, 2023
@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch 8 times, most recently from 7ffa61e to b61bb69 Compare February 5, 2023 11:02
@timtofan timtofan changed the title optimisation(carbonserver): http - repurpose listener.findCache from storing find http responses to store expanded globs; and re-use this cache in render for expanding globs feature(carbonserver): introduce a new cache for expanded globs and use it in both find and render http handlers; also switch grpc find/render from findCache to this new cache and restore grpc find response caching into findCache Feb 5, 2023
@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch 5 times, most recently from d3b124d to e7c8c7e Compare February 6, 2023 09:23
@timtofan timtofan changed the title feature(carbonserver): introduce a new cache for expanded globs and use it in both find and render http handlers; also switch grpc find/render from findCache to this new cache and restore grpc find response caching into findCache feature(carbonserver): separate grpc expandedGlobsCache from findCache into a separate one, and restore response caching in findCache; and use expandedGlobsCache in http find/render Feb 6, 2023
@timtofan timtofan changed the title feature(carbonserver): separate grpc expandedGlobsCache from findCache into a separate one, and restore response caching in findCache; and use expandedGlobsCache in http find/render optimisation(carbonserver): separate grpc expandedGlobsCache from findCache into a separate one, and restore response caching in findCache; and use expandedGlobsCache in http find/render Feb 6, 2023
@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch 3 times, most recently from 71046b9 to 0c79ca9 Compare February 6, 2023 10:12
…dCache into a separate one, and restore response caching in findCache; and use expandedGlobsCache in http find/render

This is expected to speed up http renders.

A few points about the new cache:
* it's initialised without memory limit, same as find response and render response caches. Might be worth to review this in future for all 3 caches.
* there is no toggle to disable this cache, it can be added later if needed.
* 4 graphite metrics are introduced for visibility into cache performance:
        find_expanded_globs_cache_hit
        find_expanded_globs_cache_miss
        render_expanded_globs_cache_hit
        render_expanded_globs_cache_miss
@timtofan timtofan force-pushed the atimofieiev/http-find-cache-in-render branch from 0c79ca9 to 676cb0e Compare February 6, 2023 10:20
@timtofan timtofan merged commit 22a5bc2 into master Feb 6, 2023
@timtofan timtofan deleted the atimofieiev/http-find-cache-in-render branch February 6, 2023 11:24
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.

None yet

3 participants