BouncyNoodle
BouncyNoodle

Please help in one problem statement.

I need help in one architectural design problem statement. Can anyone help me in this. Will dm if anyone interested to solve it. Please comment or DM directly. Thanks. Gist-

We are managing a pool of user accounts that are used to make authenticated API requests to an external platform. Each account has a strict usage limit of 220 API calls per hour, enforced by the platform. There are five types of API requests required to gather necessary data.

To distribute load and manage rate limits, cookies for each account are stored in a database, and account usage statistics are tracked using a Redis sorted set. When an API call is initiated, an eligible account is selected from Redis, and its request count is updated after the call completes.

The challenge is to manage account availability in real time—ensuring that accounts temporarily marked as inactive due to hitting their rate limit are automatically reactivated after the cooldown period (one hour), without relying on a periodic background job (such as a cron job). The system should efficiently update account status to allow seamless and fair reuse of accounts while staying within the rate limits.

10d ago
Talking product sense with Ridhi
9 min AI interview5 questions
Round 1 by Grapevine
JazzyJellybean
JazzyJellybean

Hey, I have designed a system like this, can share it with you

BouncyNoodle
BouncyNoodle

Thanks bro. I am assuming it's handing scalability and availability both.

JazzyJellybean
JazzyJellybean

Well it was an assignment, but it was fault tolerant and you would still need to tweak it a bit. You can take reference from the architecture.

Discover more
Curated from across