Backend Developer Interview Questions & Answers
40 questions for Backend Developer interviews — 1 easy, 33 medium, 6 hard.
About the Backend Developer role
Designs APIs, data models and business logic for web and mobile products. Focuses on correctness, performance and security: writing efficient queries, adding caching, handling authentication and making integrations reliable with retries and idempotency. Collaborates closely with frontend, QA and DevOps, and participates in code reviews and on-call rotations.
How do access tokens and refresh tokens work together?
Show answer
What is the OWASP Top 10 and which items matter most for Node.js APIs?
Show answer
How do you use a MongoDB transaction in Mongoose?
Show answer
What is the MongoDB aggregation pipeline? Give an example.
Show answer
How do you handle a breaking API change request from a product manager close to a release?
Show answer
A security audit finds that users can see other users' orders by changing the order ID in the URL. How do you fix it?
Show answer
What is database normalisation and when would you denormalise?
Show answer
How would you add OTP-based login for an Indian mobile app?
Show answer
Explain the Node.js event loop and its main phases.
Show answer
Why is structured logging important and which libraries are used?
Show answer
What is a compound index and why does field order matter?
Show answer
What is HATEOAS and is it used in real projects?
Show answer
When would you choose NestJS or Fastify over Express?
Show answer
Your API's p99 latency is high during peak hours even though CPU is only 40 percent. What could be wrong?
Show answer
What is NoSQL injection in MongoDB and how do you prevent it?
Show answer
How would you design authentication for a system of ten microservices?
Show answer
How do you design a consistent error response format for an API?
Show answer
Tell me about a time you found a security issue in code and how you handled it.
Show answer
What are the common strategies for API versioning?
Show answer
Design endpoints for a simple e-commerce cart and checkout.
Show answer
Write a retry function with exponential backoff for a flaky API call.
Show answer
Where should a web app store tokens: localStorage or cookies?
Show answer
How do you implement role-based access control (RBAC) in an API?
Show answer
Compare offset pagination and cursor pagination.
Show answer
What is soft delete and what are its trade-offs?
Show answer
Tell me about a time a database change caused an issue and what you learned.
Show answer
What is idempotency and how do you implement idempotency keys for a payment API?
Show answer
How do you implement and secure webhooks that your API sends to customers?
Show answer
How do you implement filtering and sorting safely from query parameters?
Show answer
What is connection pooling and why is it important in Node.js?
Show answer
A mobile app team complains your API returns too much data and is slow on 4G. What would you change?
Show answer
What is the N+1 query problem and how do you fix it?
Show answer
Implement cursor-based pagination for a products endpoint.
Show answer
How do you implement rate limiting on a login endpoint?
Show answer
Compare Prisma, Sequelize and TypeORM for SQL databases in Node.js.
Show answer
Compare session-based authentication with JWT-based authentication.
Show answer
Tell me about an API you designed that you are proud of.
Show answer
When should you embed documents versus reference them in MongoDB?
Show answer
How do you manage database schema migrations in a Node.js project?
Show answer
Frequently asked questions
What does a Backend Developer do?
Designs APIs, data models and business logic for web and mobile products. Focuses on correctness, performance and security: writing efficient queries, adding caching, handling authentication and making integrations reliable with retries and idempotency. Collaborates closely with frontend, QA and DevOps, and participates in code reviews and on-call rotations.
Which skills are tested in a Backend Developer interview?
Expect questions on REST API design, SQL and MongoDB, JWT and OAuth, Redis caching, Unit testing. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Backend Developer interview?
Revise REST API Design, Databases: MongoDB, SQL and Redis, Authentication and Security first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.