APIs
14 topics in apis.
What is an API
API design is a core skill for backend engineers and a key topic in system design interviews.
API Gateway
In a microservices architecture, clients should not need to know about individual service addresses.
REST vs GraphQL
Choosing between REST and GraphQL is a common API design decision and interview question.
WebSockets
WebSockets power real-time features: chat applications, live notifications, stock tickers, collaborative editing, and online gaming.
Webhooks
Webhooks enable event-driven integrations without continuous polling. They are used by virtually every SaaS platform (Stripe, GitHub, Slack, Twilio) to.
Idempotency
Network failures are inevitable. Clients will retry requests. Without idempotency, retries can cause catastrophic bugs — a payment system that charges.
Rate Limiting
Without rate limiting, a single client can overwhelm your service (intentionally via DDoS or unintentionally via a bug).
API Design Best Practices
APIs are contracts — once published, they are hard to change without breaking clients. Good design from the start saves years of technical debt.
gRPC
gRPC is a high-performance RPC framework by Google using Protocol Buffers and HTTP/2 for efficient, typed service-to-service communication in microservice.
Authentication
Authentication verifies who a user is. In distributed systems, stateless token-based auth (JWT, OAuth 2.0) replaces server-side sessions for horizontal.
Authorization
Authorization controls what authenticated users can do. RBAC, ABAC, and policy engines enforce permissions across distributed systems without hardcoding.
WebRTC
WebRTC enables peer-to-peer real-time audio, video, and data communication directly between browsers without plugins or intermediate servers for media.
RBAC
Role-Based Access Control assigns permissions to roles, not individual users. Users inherit permissions through role membership, simplifying access.
SSO
Single Sign-On lets users authenticate once and access multiple applications without re-entering credentials, using protocols like SAML 2.0 and OpenID.