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

[Feature Request]: Support for Multiple API Keys with Random Selection #72

Closed
G-TTYg opened this issue Dec 31, 2024 · 2 comments
Closed
Labels
feature New feature or request

Comments

@G-TTYg
Copy link

G-TTYg commented Dec 31, 2024

Problem Description

Currently, the project likely only supports a single API key. When the API call limit is reached (e.g., hitting a rate limit), or if the single API key encounters an issue, the entire project can be affected, either failing to function correctly or experiencing reduced efficiency. This is particularly problematic in scenarios requiring frequent API calls where a single key's limitations become a bottleneck.

Solution Description

I would like the ability to configure multiple API keys within the project. When the project needs to make an API call, it should randomly select one of the configured keys to use. This would effectively distribute API call requests, preventing a single key from hitting the rate limit and improving the project's stability and availability.

Alternatives Considered

No response

Additional Context

No response

@G-TTYg G-TTYg added the feature New feature or request label Dec 31, 2024
@Amery2010
Copy link
Collaborator

Previously, there was a need to implement too many keys, but this also led to unsolvable situations. For example, attachment uploads contain user information. For example, files uploaded by key A cannot be accessed by key B. If a random key is used, the attachment cannot be parsed.
If you want to solve this problem, you need to consider setting up a lightweight user system, which will be implemented in later versions.

@Amery2010
Copy link
Collaborator

Available in v1.6.0.
Use , to separate multiple keys, such as key1,key2,key3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants