Design a Random Number Generation API
SoFiSoftware Engineer · OnsiteLast updated
Design a Random Number Generation API evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Design a service exposing REST and streaming endpoints for generating random numbers at scale. Specify API contracts and versioning, entropy sources and CSPRNG vs. PRNG choices, seeding and reproducibility, rate limiting and quotas, multi-tenant isolation, security and abuse prevention, observability, deployment and scaling strategy, and SLAs for latency and availability.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.