InterviewStack.io LogoInterviewStack.io

Application Programming Interface Design and Scalability Questions

Designing application programming interfaces that remain reliable, performant, and maintainable at high scale. Candidates should understand how interface decisions affect scalability, availability, latency, and operational complexity and be able to reason about trade offs between client complexity and server responsibility. Core areas include stateless interface design, pagination and cursor strategies for large result sets, filtering and search optimization, payload minimization, batching and streaming, and techniques to reduce server load while preserving client experience. Resilience and operational controls include rate limiting and quota management, throttling, backpressure and flow control, retry semantics and idempotency patterns, error format design and explicit identification of retryable errors, and strategies for graceful degradation under overload. Evolution and compatibility topics include backward compatible versioning strategies, deprecation policies, contract design and testing approaches to avoid breaking consumers. Infrastructure and deployment considerations include API gateway and edge patterns, interaction with load balancers and traffic distribution, caching and content delivery, routing fault tolerance, health checks and canary rollout strategies, and observability through metrics, distributed tracing, and logging to support capacity planning and incident response. Security considerations such as scalable authentication and authorization, credential and key management, and permission models are also important. Candidates should be prepared to discuss concrete patterns, trade offs, algorithms, and operational playbooks for designing and running high traffic application programming interfaces.

MediumTechnical
0 practiced
Implement a Python module that batches outbound HTTP API calls up to N requests per second and maps responses back to original callers. The module should support per-call timeouts, retries, and an asynchronous interface (asyncio). Provide clear pseudocode showing batching, concurrency, and error handling.
MediumTechnical
0 practiced
Given table posts(id BIGINT PRIMARY KEY, created_at TIMESTAMP, title TEXT), write a SQL query implementing keyset pagination to return the next 50 posts after a given cursor (last_created_at, last_id). Explain which indexes you would use and how to handle ties when created_at is not unique.
MediumTechnical
0 practiced
Design a consistent taxonomy of error codes and map them to HTTP statuses so clients can programmatically distinguish retryable server errors, client input errors, authentication failures, and rate limits. Provide concrete examples for 429, 503, 409, 422 and how to include machine-readable error codes.
MediumTechnical
0 practiced
Draft a secure webhook contract that includes payload schema, headers for signature verification, a deduplication idempotency header, retry semantics and backoff expectations, and versioning approach. Describe how the receiver should validate and safely process incoming webhooks to avoid replay and injection attacks.
MediumSystem Design
0 practiced
Design rate limiting for a login endpoint that must enforce 100 attempts per minute per IP and 10 attempts per minute per account across a globally distributed fleet. Discuss counter implementations (fixed window, sliding window log, sliding window counter), storage choices (in-memory, Redis), consistency challenges, and methods to mitigate IP spoofing and coordinated attacks.

Unlock Full Question Bank

Get access to hundreds of Application Programming Interface Design and Scalability interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.