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

storage: simplify mirror implementation #1375

Merged
merged 3 commits into from
Jul 25, 2023

Commits on Jul 19, 2023

  1. storage: implement simpler first token request

    Nydusd uses a registry backend which generates a surge of blob requests without
    auth tokens on initial startup. This caused mirror backends (e.g. dragonfly)
    to process very slowly, the commit fixes this problem.
    
    It implements waiting for the first blob request to complete before making other
    blob requests, this ensures the first request caches a valid registry auth token,
    and subsequent concurrent blob requests can reuse the cached token.
    
    This change is worthwhile to reduce concurrent token requests, it also makes the
    behavior consistent with containerd, which first requests the image manifest and
    caches the token before concurrently requesting blobs.
    
    Signed-off-by: Yan Song <[email protected]>
    imeoer committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    f5cdf41 View commit details
    Browse the repository at this point in the history
  2. storage: remove auth_through option for registry mirror

    The auth_through option adds user burden to configure the mirror
    and understand its meaning, and since we have optimized handling
    of concurrent token requests, this option can now be removed.
    
    Signed-off-by: Yan Song <[email protected]>
    imeoer committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    0bb64c3 View commit details
    Browse the repository at this point in the history
  3. storage: adjust token refresh interval automatically

    - Make registry mirror log pretty;
    - Adjust token refresh interval automatically;
    
    Signed-off-by: Yan Song <[email protected]>
    imeoer committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    dc83210 View commit details
    Browse the repository at this point in the history