Q1
Describe the differences between SQL and NoSQL databases. When would you choose one over the other, and can you give an example from a project where you made this decision?
Why they ask this:* They want to assess your understanding of database fundamentals and your ability to make architectural decisions based on specific use cases rather than defaulting to one technology.
Q2
Explain how you would design a caching strategy for a high-traffic API endpoint. What tools would you use, and how would you handle cache invalidation?
Why they ask this:* This tests your knowledge of performance optimization, common backend patterns (Redis, Memcached), and your understanding of trade-offs between consistency and performance in distributed systems.
Q3
Walk me through how you would implement and optimize a database query that's currently running slowly in production. What tools and techniques would you use?
Why they ask this:* They're evaluating your ability to diagnose real performance issues, use profiling tools, write efficient queries, and understand indexing—all critical mid-level backend competencies.
Q4
How do you handle authentication and authorization in your backend services? Can you explain the differences between JWT, OAuth 2.0, and session-based auth, and when you'd use each?