HTTP methods, status codes and idempotency
What do the main HTTP methods mean, which status codes should an API return, and what does idempotent mean?
The 20 theoretical questions asked most often today. Open a question to read the full answer.
What do the main HTTP methods mean, which status codes should an API return, and what does idempotent mean?
When would you choose REST, GraphQL or gRPC for an API?
What's the difference between session-based auth and JWTs, and what are OAuth 2.0 and OpenID Connect for?
What are the most common API security vulnerabilities (the OWASP API Security Top 10), and how do you prevent them?
What's the difference between offset and cursor (keyset) pagination, and when do you use each?
How do you choose between a SQL (relational) and a NoSQL database?
What is database normalization, and when would you denormalize?
How do database indexes work, and when don't they help?
A query or endpoint is slow. How do you find and fix the problem? What is the N+1 query problem?
What does ACID mean, and what are transaction isolation levels?
What caching strategies do you know, and how do you handle cache invalidation?
What does the CAP theorem say, and what consistency models do distributed systems offer?
How does leader-follower replication work, and what problems does replication lag cause?
What is sharding, how do you choose a shard key, and what problem does consistent hashing solve?
How does load balancing work, and why should services be stateless to scale horizontally?
How do you implement rate limiting? Compare the main algorithms.
What's the difference between a message queue (RabbitMQ, SQS) and an event stream (Kafka)? When do you use each?
What's the difference between processes, threads and async I/O (event loop), and when does each fit?
Monolith or microservices: what are the trade-offs, and how do you decide?
How do you make calls to other services resilient? Explain timeouts, retries with backoff and circuit breakers.