Backend Developer interview questions
Backend interviews focus on how you design APIs, model data, keep systems secure and reason about performance. Expect deep questions on your main language and framework, SQL, and what happens when traffic or data grows.
12 questions with answer notes · 4 rounds · By the JOBSPOT 360 team
How the selection process usually works
-
1
Online assessment
Coding problems plus MCQs on your language, SQL and HTTP.
-
2
Language and framework
Internals of PHP/Laravel, Java/Spring, Node.js, Python/Django or .NET, depending on the stack.
-
3
Database and design
Writing SQL queries, schema design, indexing, transactions and basic system design.
-
4
Managerial / HR
Past projects, production incidents you handled, then offer discussion.
Rounds vary between companies. Smaller teams often merge the technical and managerial rounds, while larger companies may add an extra technical round.
Skills to brush up on
- PHP, Java, Node.js, Python or C#
- A framework such as Laravel, Spring Boot, Express or Django
- SQL and relational database design
- REST API design
- Authentication and authorisation
- Caching (Redis)
- Queues and background jobs
- Git and Linux basics
- Unit and integration testing
Technical questions
-
01 What is the difference between PUT, PATCH and POST? Which HTTP status codes do you use for common cases?
How to answer: PUT replaces, PATCH partially updates, POST creates. Know 200, 201, 204, 400, 401, 403, 404, 409, 422 and 500 and when each applies. -
02 What is the N+1 query problem and how do you fix it?
How to answer: Loading a list and then querying a relation for each row. Fix it with eager loading (for examplewith()in Laravel or JOIN FETCH in JPA). -
03 Write a SQL query to find the second highest salary in each department.
How to answer: Use a window function like DENSE_RANK() partitioned by department, or a correlated subquery. Mention how ties are handled. -
04 Explain ACID and the transaction isolation levels.
How to answer: Atomicity, consistency, isolation, durability. Read uncommitted, read committed, repeatable read and serializable, and which anomalies each prevents. -
05 How do you store passwords securely, and how do you prevent SQL injection and CSRF?
How to answer: Hash passwords with bcrypt or argon2, never encrypt them. Use parameterised queries or an ORM, and CSRF tokens or SameSite cookies. -
06 Session-based auth or JWT: what are the trade-offs?
How to answer: Sessions are easy to revoke and suit browser apps. JWTs are stateless and suit APIs and mobile apps, but are hard to revoke before they expire. -
07 When would you move work to a queue?
How to answer: For slow or unreliable work that the user does not need to wait for: emails, report generation, third-party API calls. Mention retries and idempotency. -
08 What do you cache, where, and how do you invalidate it?
How to answer: Cache expensive reads that change rarely. Use TTLs or clear on write events, and watch out for stale data and cache stampedes. -
09 Explain dependency injection and why frameworks use it.
How to answer: Classes receive their dependencies rather than creating them, which makes code testable and swappable. Give an example from your framework's service container.
Scenario questions
-
01 An API endpoint has become slow as data grew. Walk me through fixing it.
How to answer: Measure with logs or a profiler, check the query plan with EXPLAIN, add the right indexes, remove N+1 queries, paginate, then cache if needed. -
02 Design the database schema for an e-commerce order system.
How to answer: Users, products, orders and order_items, with the price copied onto order_items at purchase time. Discuss stock updates inside a transaction. -
03 A payment webhook may be delivered twice. How do you make sure the order is not processed twice?
How to answer: Make the handler idempotent: store the provider's event ID with a unique constraint and skip events you have already seen.
Resume tips for this role
- Describe the scale you worked at: requests per minute, table sizes, number of users.
- Mention specific backend wins such as query optimisations, a queue you introduced or a caching layer.
- List your database and infrastructure tools (MySQL, PostgreSQL, Redis, Docker, AWS) separately from languages.
- Link a project with a documented API, such as a README with sample requests or a Postman collection.
Free resources to study
This guide is written by the JOBSPOT 360 team from common interview patterns for this kind of role. It is not provided by any employer, and real interviews will differ. Read our editorial policy.