ceph / ceph/go-ceph

rgw/admin: Credentials cache is rebuilt per request

Open
#1,325 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
691
Forks
296
Avg merge
2d 16h
Merged PRs (30d)
11

Description

> I would also highly recommend moving the `aws.NewCredentialsCache(...)` to the API client factory function, as there is also no reason to instantiate this on _every_ request, and it would result in further performance increase and fewer allocs. My benchmarking of this showed about 10% faster req processing, which is significant when fetching bucket info for tens of thousands of buckets.
>
> However, this would effectively constitute a breaking change, as it would no longer be possible to change the access key / secret key after instantiating the API client. To this I would argue that it was never a very good idea to export credentials on the API struct in the first place.

_Originally posted by @dswarbrick in https://github.com/ceph/go-ceph/issues/1314#issuecomment-5269745655_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the RGW admin API client factory and the per-request use of aws.NewCredentialsCache. Move the cache creation to the factory, then verify that credentials are initialized once per client and assess the stated compatibility impact of changing credentials after client creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.