Interview knowledge
Video

API Design in System Design Interviews w/ Meta Staff Engineer

by Hello Interview27 Jul 2025

Read the original →

Summary AI-generated

Summarised by an AI assistant when this source was saved. Double-check against the original.

In summary, the most interesting aspect of this transcript is the strategic framework for selecting API protocols based on context: defaulting to REST for external client-facing systems, leveraging RPC/gRPC for high-performance internal microservice communication, and utilizing GraphQL for flexible, client-driven data fetching, all while emphasizing the critical interview skill of maintaining brevity and avoiding unnecessary technical deep dives.

  • Prioritize brevity in interviews, spending no more than 5 minutes on API design to avoid derailing the broader system architecture discussion.
  • REST is the default choice for external APIs, utilizing standard HTTP methods (GET, POST, PUT, PATCH, DELETE) and plural nouns for resource paths.
  • GraphQL solves data overfetching and underfetching by allowing clients to request exact fields in a single query, though it requires batching strategies to avoid the N+1 database problem.
  • RPC and gRPC are superior for internal microservice-to-microservice communication due to binary protocols, reduced HTTP overhead, and significantly faster data transfer.
  • Implement pagination for large datasets, using offset-based methods for simplicity and cursor-based methods to maintain consistency under heavy write loads.
  • Enforce security via authentication tokens (JWTs or session IDs) in HTTP headers rather than trusting client-provided user IDs in request bodies.

Notes this inspired

  • REST frameworkGrowing

    REST favours plural nouns. Use path parameters for mandatory parameters, and use query parameters for optional ones. Rest is good for public facing Apis, easy to reason about. Http for external is…

  • RPC methodsGrowing

    RPC tends to be more for internal service communication. REST has a bit more overhead with http. Rpc tends to use more efficient formats like protobuf and grpc rather than http. This…

  • GraphQLGrowing

    This is good for when clients need to choose which fields to use and make complex joins in 1 query. With graphql, it's easy to introduce the n+1 query problem where you…