Skip to content
  • API styles · API Design

API styles

LearnViaNotes @learnvianotes· 1 min read

REST for web/mobile, GraphQL for complex UIs, gRPC for microservices, WebSockets for real-time. Architecture choice shapes everything downstream.

Full comparison

CriterionRESTGraphQLgRPCWebSocket
ProtocolHTTP/1.1HTTP/1.1HTTP/2WS over TCP
PayloadJSON/XMLJSONBinary (protobuf)Any
TypingUntypedSchema-typedStrongly typedUntyped
StreamingNoSubscriptionsNative 4 modesNative
CachingHTTP cacheApp-levelNo HTTP cacheNo
Browser support✓ Native✓ NativeNeeds proxy✓ Native
Best usePublic APIsComplex UIsInternal svcsReal-time

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report