Definition of an API in software engineering
A functional abstraction layer and contract for software communication
Primary benefit of Connection Pooling
Reduces overhead by reusing existing TCP connections
Asynchronous I/O benefit
Allows a single thread to handle multiple concurrent I/O-bound tasks
Data Parallelism vs Task Parallelism
Data parallelism splits data across tasks
Difference between Over-fetching and Under-fetching
Over-fetching is receiving unneeded data
Purpose of an API Gateway
Centralized entry point for routing, rate limiting, and security
The ‘Circuit Breaker’ pattern
Prevents a system from trying to execute an operation that’s likely to fail
What is ‘Chatty’ API behavior
Making many small requests instead of a few bulk/batched requests
Benefit of using Gzip or Brotli in APIs
Reduces payload size to improve transfer speed
Role of ETag in API caching
A unique identifier for a resource version used to validate if a cache is still fresh
Rate Limiting vs Throttling
Rate limiting sets a hard cap
Idempotency in APIs
The property where multiple identical requests have the same effect as a single request
Optimizing ‘N+1’ query problem
Using batching or eager loading to fetch related data in one call
Horizontal vs Vertical scaling for APIs
Horizontal adds more instances