Skip to content

Expert · Choosing a stack and getting hired · topic 54 of 54 · 30 min

Backend interview preparation

Explanation

Backend interviews in India usually have a coding test, a DSA round, a backend fundamentals round, an SQL round, and for experienced people a system design round, followed by HR. You prepare by practising common questions aloud, building one strong project you can explain well, and following a steady revision plan.

What the hiring process usually looks like

  1. Online coding test: 60 to 90 minutes on a test platform, usually 2 or 3 programming problems and some MCQs on SQL, operating systems and networks.
  2. DSA round: a live interview on data structures and algorithms (arrays, strings, hash maps, sorting, sometimes trees). They watch how you think, not only the final answer.
  3. Backend fundamentals round: HTTP, REST, status codes, authentication, caching, plus questions about your project.
  4. SQL round: write queries live, such as joins, GROUP BY and "second highest salary".
  5. System design round: mostly for people with 2 or more years of experience. Freshers may get a small version, like "design a URL shortener".
  6. HR or managerial round: your background, why this company, notice period, salary expectations.

Some companies replace the DSA round with a take-home assignment: build a small API in 2 or 3 days. Service companies hiring many freshers often do the test plus one technical round plus HR. Product companies usually have more technical rounds.

Think of it like this: An interview is like a driving licence test. The written test checks you know the rules (fundamentals and SQL). Driving on the test track shows you can control the vehicle (coding). The examiner then sits with you on a real road and asks "why did you slow down here?" (your project discussion). You pass by practising all three, not by memorising the rule book.

Common backend questions with short answers

QuestionShort model answer
What happens when you type a URL and press Enter?DNS finds the IP address, the browser opens a TCP connection and a TLS (HTTPS) session, sends an HTTP request, the server routes it and replies, and the browser renders the HTML and loads CSS, JS and images.
PUT vs PATCH?PUT replaces the whole resource with what you send. PATCH changes only the fields you send.
What does idempotent mean?Doing the same request many times has the same effect as doing it once. GET, PUT and DELETE are idempotent; POST is not by default.
401 vs 403?401: we do not know who you are (not logged in or bad token). 403: we know you, but you are not allowed.
What is a database index? Any downside?A sorted structure (usually a B-tree) that finds rows fast without scanning the whole table. It uses space and makes inserts and updates slower.
What is a transaction? What is ACID?A group of statements that succeed or fail together. ACID: Atomicity, Consistency, Isolation, Durability.
INNER JOIN vs LEFT JOIN?INNER JOIN keeps only rows that match on both sides. LEFT JOIN keeps every row of the left table and fills NULL where there is no match.
SQL vs NoSQL?SQL: fixed tables, joins, strong transactions; good for money and linked data. NoSQL: flexible documents or key-values; good for changing shapes and very large simple reads.
How do you store passwords?Never plain or encrypted. Hash with a slow algorithm like bcrypt or Argon2, which adds a random salt to each password.
Sessions vs JWT?Session: a random id in a cookie, data kept on the server, easy to log out. JWT: a signed token holding the data, no server lookup, but hard to cancel before it expires.
What is SQL injection and how do you stop it?User input is pasted into a SQL string and changes the query. Stop it with parameterised queries (placeholders), never string joining.
What is CORS?A browser rule that blocks a page from reading responses from another origin unless the server allows it with Access-Control-Allow-Origin.
What is caching? What is the hard part?Keeping a copy of slow results in fast storage like Redis. The hard part is invalidation: removing or updating the copy when the data changes.
Vertical vs horizontal scaling?Vertical: a bigger machine. Horizontal: more machines behind a load balancer; needs stateless servers.
What is rate limiting?Capping how many requests a client can make in a time window (for example 5 logins per minute); extra requests get 429 Too Many Requests.
Why use a queue or background job?Slow work (emails, PDFs, image resizing) is done later by a worker, so the API can reply fast and retry failures.
How does Node.js handle many requests on one thread?The event loop: while waiting for the database or network, Node handles other requests; callbacks run when results arrive. CPU-heavy work blocks it.
What is the N+1 query problem?Loading a list with 1 query, then running 1 more query per item. Fix it with a JOIN or a single IN (...) query.
Offset vs cursor pagination?Offset: LIMIT 20 OFFSET 40, simple but slow and shaky on big, changing tables. Cursor: "after id 1234", fast and stable.

How to explain your project

  1. The problem: who uses it and what pain it removes (one sentence).
  2. The stack and why: language, framework, database, where it is hosted.
  3. Your part: exactly what YOU built. Say "I", not "we", for your own work.
  4. One hard bug: what went wrong, how you found it (logs, a failing test), and how you fixed it.
  5. What you would improve with more time: tests, caching, a queue, better security.
output
"I built a canteen order API for my college, because students waited 15 minutes
in the lunch queue. It uses Node.js with Express and PostgreSQL, deployed on a
cloud platform. I wrote the order and payment-status endpoints and the tests.
The hardest bug: two students could order the last samosa at the same time.
I fixed it with a transaction and a stock check inside it. Next, I would add
Redis caching for the menu and a background job for receipts."
A 60-second project explanation that follows the five steps.

One strong portfolio project

  • Idea: a "college canteen order API". Students see the menu and order; canteen staff mark orders Preparing, Ready and Collected.
  • Auth: sign up and log in with bcrypt-hashed passwords, and JWT or session cookies; two roles, student and staff.
  • Menu: staff-only create, update and delete; stock count per item.
  • Orders: the total is calculated on the server; stock is reduced inside a transaction.
  • Order history with pagination; validation with clear 400 errors in one JSON error format.
  • Unit and integration tests, OpenAPI docs, rate limiting on login.
  • Deployed with a live URL, plus a README with setup steps, sample requests and seed data.
Tip: One finished, deployed project with tests and a clear README beats five half-finished clones. Interviewers often open your GitHub during the call, so make the README answer "what, why, how to run".

Resume tips

  • One page for freshers. A plain layout (no tables or images for text) so applicant tracking systems can read it.
  • Put projects near the top, each with a live link, a GitHub link and 2 lines of what you built.
  • Use true numbers where you have them: "API handles 200 test orders in under 1 second in load tests".
  • List only skills you can answer questions on. Group them: languages, frameworks, databases, tools.
  • Match words from the job post where they are true for you (for example "REST API", "PostgreSQL", "Docker").
Careful: Never claim a skill or an experience you cannot explain; one follow-up question exposes it. Never buy fake experience letters or pay for "guaranteed placement": background checks catch them, and companies can withdraw offers.

A 30-day revision plan

DaysFocusDaily work (about 3 hours)
1-7Web and backend basicsHTTP, REST, status codes, auth. Say 5 table questions aloud. 2 easy DSA problems.
8-14SQL and databasesJoins, GROUP BY, subqueries, indexes, transactions. 8 to 10 SQL problems. 2 DSA problems.
15-21Your projectAdd tests, docs and deployment. Write and practise your 60-second explanation. 2 DSA problems.
22-27Design and mock interviewsSmall system designs (URL shortener, rate limiter). 2 or 3 mock interviews with friends. 2 DSA problems.
28-30Polish and applyRevise weak areas from mocks, update resume and LinkedIn, apply to 10 or more roles.

Watch the lesson

Backend interview preparation · 1/7

Coding test DSA Backend basics SQL System design HR

Backend interviews follow a common pattern. Knowing it removes half the fear.

Prefer a video by a teacher? Find free videos on “backend developer interview questions and answers for freshers india” on YouTube ↗

In real life: How Priya turned rejections into an offer

Priya cleared online tests but failed three technical rounds: she froze on "what happens when you type a URL" and could not explain her group project. She followed a 30-day plan, built her own canteen order API with tests and a live link, and practised her project story and the common questions aloud with a friend every evening. In her next interview she was asked about the N+1 problem and about a hard bug; she explained both with examples from her own code and got the offer.

Practice (0/3 done)

Task 1 · Code · SQL

A classic SQL interview question: return the second highest DIFFERENT salary from the employees table, in one column named second_highest. Careful: two people share the top salary.

Task 2 · Practice

Write (and then say aloud in under 2 minutes) your answer to "What happens when you type www.irctc.co.in in the browser and press Enter?"

Task 3 · Practice

Write a 60 to 90 second explanation of one backend project you built, using the five steps: problem, stack and why, your part, a hard bug, what you would improve. Record yourself saying it and listen once.

Quick quiz

Question 1

1.In which round are you most likely to be asked "design a URL shortener"?

Question 2

2.Why can ORDER BY salary DESC LIMIT 1 OFFSET 1 give the wrong second highest salary?

Question 3

3.What is the best answer to "How do you store passwords"?

Question 4

4.When explaining a team project, what should the "your part" step do?

Question 5

5.Which plan is most likely to work in the month before interviews?

Read more (free)

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

← Previous: Beyond REST: GraphQL, WebSockets and webhooks