Service Communication and API Design Questions
Design and specify APIs and interservice communication patterns for systems that must scale. Topics include REST design and best practices, API versioning and deprecation strategies, backward compatibility and API evolution, contract design between services, choosing protocols such as gRPC versus HTTP for internal or external communication, security and authentication patterns at the API level, performance and scalability considerations, observability and monitoring of service interactions, and strategies for evolving interfaces without breaking consumers.
MediumTechnical
49 practiced
Implement a cursor-based pagination endpoint in Python (Flask or FastAPI) for a messages table with columns id (bigint PK) and created_at (timestamp). Provide the SQL query to fetch the next page given a cursor composed of created_at and id, and explain how you handle ordering and stable pagination when new rows are inserted between pages.
EasyTechnical
41 practiced
Explain HTTP caching strategies relevant to APIs, including Cache-Control directives, ETag and If-None-Match, Last-Modified and If-Modified-Since, and patterns like stale-while-revalidate. For which types of endpoints would you prefer CDN caching vs client caching?
EasyTechnical
51 practiced
Explain three common API versioning strategies: URI versioning (e.g., /v2/resource), header-based versioning, and media-type versioning (content negotiation). For each approach describe advantages, disadvantages, example usage, and how a client would request version v2.
HardTechnical
55 practiced
You must implement observability for API calls but keep tracing storage costs under control. Propose a sampling strategy (head sampling, tail sampling, adaptive sampling) that preserves fidelity for SLO breaches and high-impact flows, and describe how you would reconstruct partial traces for debugging when sampling drops some spans.
HardTechnical
51 practiced
Design an enterprise-grade API deprecation policy with workflow: announcement cadence, sunset headers and dates, telemetry to detect clients using deprecated endpoints, automated warnings in SDKs, compatibility shims, and criteria to force-retire an endpoint. Describe tooling and signals you would build to support the policy.
Unlock Full Question Bank
Get access to hundreds of Service Communication and API Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.