Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Scaling AI Systems

Free · sign in to start and track progress

1 · Throughput under limits

  • 1Rate limits and quotas

    Exercise answers

    • Answer: Simulate the three buckets and the cache cliff
    • Answer: Log rate-limit headers and cache usage
  • 2Concurrency and flow control
  • 3Retries, backoff and overload
  • 4Backpressure, load shedding and batching

2 · Latency, resilience and capacity

  • 5Latency engineering for agents
  • 6Response caching and failover
  • 7Load testing and capacity planning
CapstoneMonth-end readiness for an agent fleetReference implementation

Module 1 · Throughput under limits · Lesson 1

Rate limits and quotas

How model providers ration capacity (RPM, input and output tokens per minute, usage tiers, spend caps and acceleration limits), how the Claude API enforces and reports them, and how to compute which limit binds your fleet before it binds in production.

70 min 1 video 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvGet an OpenRouter keyOpenRouter or a local model?Local models with Ollama

By the end of this lesson you can

  • Explain how RPM, ITPM and OTPM are enforced with token buckets, and why a per-minute limit can reject a short burst
  • Compute which limit binds a workload, and how prompt caching changes the answer on the Claude API
  • Read the rate-limit headers and usage fields to measure headroom per model and workspace
  • Tell apart a rate-limit 429, an acceleration-limit 429, a spend-cap 429 and a 529, and respond to each correctly
  • Plan workspaces, tiers and model mix so that one workload cannot starve another

On this page

  • Intuition: a reservoir that refills
  • The three buckets per model
  • Tiers, spend caps and the rest
  • Priority capacity
  • Worked example: which limit binds?
  • Reading the headers
  • Workspaces: limits per environment and tenant
  • On other platforms
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: a reservoir that refills
  2. 02The three buckets per model
  3. 03Worked example: which limit binds?
  4. 04Reading the headers
  5. 05Workspaces: limits per environment and tenant
  6. 06Misconceptions and limits
  7. 07Connections
  8. 08Summary

Sources & further reading

  • BurstGPT: A Real-world Workload Dataset to Optimize LLM Serving SystemsPaper · Wang et al. · 2024Published at KDD. 10.31 million traces from regional Azure OpenAI services over 213 days. Read the sections on request burstiness and on failures; they show why per-minute averages understate what limits must absorb.
  • Fairness in Serving Large Language ModelsPaper · Sheng et al. · 2024OSDI 2024. Argues that per-client request limits are a crude form of fairness and proposes counting tokens instead. Read the introduction for why providers meter tokens, not just requests.
  • Rate limits (Claude API docs)Docs · AnthropicThe primary source for this lesson. Read "About rate limits", "Cache-aware ITPM", the tier tables, "Setting lower limits for workspaces" and "Response headers".
  • Errors (Claude API docs)Docs · AnthropicThe HTTP error table, including what distinguishes 429 from 529, the spend-cap 429 without a retry-after header, and how mid-stream errors arrive after a 200.
  • Service tiers (Claude API docs)Docs · AnthropicStandard, Batch and the legacy Priority Tier. Useful for what is and isn't available if you need guaranteed capacity on current models.
  • Claude in Amazon BedrockDocs · AnthropicThe "Quotas" and "Regions" sections. A comparison point, since Bedrock meters Claude with its own token quotas and AWS-enforced request limits.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 8 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks