Start here. This is the direct spoken answer to practice first.
Why this question matters
Rate limiting is more than blocking attackers. A good design protects platform capacity while giving legitimate clients predictable behavior.
I would identify callers by API key, client id, user, tenant, or IP depending on the API. Then I would define limits such as per-minute bursts, daily quotas, and expensive-operation limits. The API would return 429 with useful retry information when a limit is exceeded. I would start with observability and gradual rollout so real clients are not surprised by a hidden policy change.