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

experimental: Allow query plan & parsed/validated document cache config #3755

Merged
merged 3 commits into from Feb 4, 2020

Commits on Feb 4, 2020

  1. experimental: Allow adjusting of query plan & parsed/validated docume…

    …nt cache.
    
    This introduces two experimental configuration options for existing internal
    cache stores:
    
    - `experimental_approximateDocumentStoreSizeMiB` is added to the `ApolloServer`
      constructor options and controls the _approximate_[1] size, in MiB, of the
      request pipeline document store, which is used to avoid repeated parsing and
      validation passes on queries which equate to the same `queryHash`[2].
    - `experimental_approximateQueryPlanStoreMiB` is added to the `ApolloGateway`
      constructor options and controls the _approximate_[1] size of the query plan
      cache, which is used to avoid recalculation on repeated queries which equate
      to the same `queryHash`[2].
    
    These are currently experimental because a more complete solution might
    more dynamically account for memory of various internal caches and vary
    their sizes based based on available memory and the overall server
    performance, rather than needing hard-coded values which are less than
    precise.
    
    [1]: "Approximate", because it's based on the `JSON.stringify`'d byte-length
         of the value being cached.
    [2]: The `queryHash` is a SHA-256 value of the incoming operation.
    abernix committed Feb 4, 2020
    Copy the full SHA
    ec92e66 View commit details
    Browse the repository at this point in the history
  2. Add CHANGELOG.md for #3755.

    abernix committed Feb 4, 2020
    Copy the full SHA
    5732767 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    4fce56e View commit details
    Browse the repository at this point in the history