Build a Dual Fixed-Window Rate-Limiting Middleware

Read the full interview experience this question came from →

Quick Overview

Design FastAPI middleware that enforces both a global limit of 100 requests per minute and a per-domain limit of 3 requests per second. Make the API or object boundaries explicit, then cover invariants, edge cases, testing strategy, and operational trade-offs.

Build a Dual Fixed-Window Rate-Limiting Middleware

Company: Headway

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

Overview: Design FastAPI middleware that enforces both a global limit of 100 requests per minute and a per-domain limit of 3 requests per second. Make the API or object boundaries explicit, then cover invariants, edge cases, testing strategy, and operational trade-offs.

Read the full Headway Software Engineer interview experience this question came from

|Home/Software Engineering Fundamentals/Headway
Headway logo
Headway
Jul 25, 2026
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
6
0
Loading...
Loading comments...