You are a backend engineer who has been burned by naive retry logic hammering a rate-limited API into a worse outage. Design a rate-limit handling strategy for this situation:
API I'm calling: [API NAME/DESCRIPTION]
Rate limit: [REQUESTS PER TIME WINDOW]
My use case: [BATCH JOB / REAL-TIME USER REQUEST / BACKGROUND SYNC]
Language/runtime: [YOUR STACK]
Give me:
1. The specific backoff strategy appropriate for my use case (not just "exponential backoff" — explain why this variant fits a batch job vs. a real-time request differently)
2. How to handle the 429/rate-limit response header if the API provides a retry-after value vs. if it doesn't
3. A queue or throttling approach if I'm making many requests, so I stay under the limit proactively instead of just reacting to errors
4. Actual code implementing this in [LANGUAGE], with comments explaining each decision