Backend Engineering
November 29, 2026
•
13 min read

Backend Developer Interview Questions for Freshers (2026): 30 Questions With Answers

30 backend developer interview questions freshers actually get: HTTP and APIs, databases, backend fundamentals, beginner system design and project questions, each with a model answer and what the interviewer is testing.

M
MockExperts Editorial Team
Updated Dec 4, 2026
Backend Developer Interview Questions for Freshers (2026): 30 Questions With Answers

What Backend Interviews for Freshers Actually Test

Entry-level backend interviews are less about memorising definitions and more about whether you understand how a request travels through a system: from the client, over HTTP, into your API, through the database and back. Most loops for freshers combine an online coding assessment, a backend fundamentals round, a project deep-dive and sometimes a beginner system design question. Formats vary by company, so confirm the rounds with your recruiter.

RoundWhat it checksHow to prepare
Online assessmentArrays, strings, hash maps, basic trees and graphsTimed practice on easy and medium problems
Backend fundamentalsHTTP, REST, SQL, indexes, caching, authThe 20 questions in sections 1 to 3 below
Project deep-diveWhether you really built what your resume saysExplain design choices, trade-offs and bugs out loud
Beginner system designStructured thinking, not scaleSection 4: URL shortener, rate limiter, job queue
💡

Your resume decides half the interview. Interviewers pick follow-up questions from the projects you list. If your resume says "built a REST API with Redis caching", expect "what did you cache, and how did you invalidate it?". Prepare answers for your own projects first.

1. HTTP and API Questions

Q1. What happens when you type a URL into the browser and press Enter?

The browser resolves the domain to an IP address through DNS, opens a TCP connection (plus a TLS handshake for HTTPS), and sends an HTTP request. The server, often behind a load balancer, routes it to an application that may query a database or cache, then returns a response with a status code, headers and a body. The browser renders the HTML and fetches further assets.

What they're testing: whether you can see the whole path, not just your code.

Q2. What is the difference between GET and POST?

GET reads data, should not change server state, and sends parameters in the URL, so responses can be cached and bookmarked. POST sends data in the request body to create or trigger something and is not cached by default. Never use GET for actions that change data.

What they're testing: HTTP semantics and safe API design.

Q3. What does idempotent mean? Is PUT idempotent? Is PATCH?

An operation is idempotent if repeating it gives the same result as doing it once. GET, PUT and DELETE are idempotent by definition: sending the same PUT twice leaves the resource in the same state. POST is not. PATCH can be either, depending on the change: "set name to Asha" is idempotent, "increment count by 1" is not.

What they're testing: whether you understand why retries are safe for some requests and dangerous for others.

Q4. Explain these status codes: 200, 201, 400, 401, 403, 404, 409, 429, 500, 503.

200 OK; 201 Created after a successful POST; 400 bad input; 401 not authenticated (who are you?); 403 authenticated but not allowed; 404 not found; 409 conflict, such as a duplicate email; 429 too many requests (rate limited); 500 an unexpected server error; 503 the service is temporarily unavailable, for example overloaded or in maintenance.

What they're testing: the 401 vs 403 distinction is the classic trap.

Q5. What makes an API RESTful?

Resources are identified by URLs (/users/42/orders), HTTP methods express the action, requests are stateless (each carries what the server needs, such as a token), and responses use standard status codes and a consistent format. Good REST APIs also version their contract and paginate large lists.

What they're testing: consistency and clean resource naming.

Q6. Offset pagination vs cursor pagination: when would you use each?

Offset pagination (?page=3&limit=20) is simple and allows jumping to a page, but gets slow on large tables and can skip or repeat rows when data changes. Cursor pagination (?after=last_seen_id) uses an indexed column to fetch the next set, stays fast and stable on large or fast-changing data, but cannot jump to an arbitrary page. Feeds and logs usually use cursors.

What they're testing: awareness that the simple approach breaks at scale.

2. Database Questions

Server racks in a data center
Most backend fresher interviews spend more time on databases than on any single language.

Q7. SQL vs NoSQL: how do you choose?

Choose SQL (PostgreSQL, MySQL) when data is relational and you need joins, transactions and strong consistency, such as orders and payments. Choose a NoSQL store when the access pattern fits it: a document store for flexible, nested records, a key-value store like Redis for caching and sessions, or a wide-column store for very high write volume. Many systems use both.

What they're testing: choosing by access pattern, not by trend.

Q8. How does a database index work, and what does it cost?

Most indexes are B-trees: a sorted structure that lets the database find rows in logarithmic time instead of scanning the whole table. The cost is extra storage and slower writes, because every insert or update must also update the index. Index columns you filter, join or sort on often, not every column.

What they're testing: that you know indexes are a trade-off.

Q9. What is ACID?

Atomicity: a transaction fully happens or not at all. Consistency: it moves the database from one valid state to another. Isolation: concurrent transactions don't see each other's half-finished work. Durability: once committed, data survives a crash. The bank transfer example (debit one account, credit another) is the standard way to explain it.

What they're testing: whether you can explain it with an example, not just expand the acronym.

Q10. Two users try to book the last seat at the same time. How do you prevent a double booking?

Make the database enforce it. Options: a unique constraint on (show_id, seat_id) so the second insert fails; a transaction with SELECT ... FOR UPDATE to lock the row while checking availability; or an atomic conditional update like UPDATE seats SET booked_by = ? WHERE id = ? AND booked_by IS NULL and checking that one row changed. Checking availability in application code and then writing is a race condition.

What they're testing: concurrency thinking, the most common gap in fresher answers.

Q11. What is the N+1 query problem?

Fetching a list (1 query) and then running one more query per item (N queries), for example loading 100 posts and then each post's author separately. Fix it with a join, a single WHERE id IN (...) query, or your ORM's eager loading. It often appears silently through ORMs.

What they're testing: whether you have looked at the queries your code actually runs.

Q12. What is normalisation, and when would you denormalise?

Normalisation organises data so each fact is stored once, avoiding update anomalies. Denormalisation deliberately duplicates some data, such as storing an order's total or a post's comment count, to make frequent reads faster, at the cost of keeping copies in sync.

What they're testing: trade-offs between write correctness and read speed.

Q13. Write a query to find the second-highest salary.

SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(salary) FROM employees); Or, with window functions, rank salaries with DENSE_RANK() OVER (ORDER BY salary DESC) and pick rank 2, which also generalises to the Nth highest and handles ties.

What they're testing: subqueries and window functions. Also practise "top N per group".

3. Backend Fundamentals

Q14. Process vs thread?

A process is a running program with its own memory space. Threads live inside a process and share its memory, which makes communication cheap but requires care with shared data (locks, race conditions). Processes are isolated: one crashing doesn't take down another.

What they're testing: OS basics behind concurrency.

Q15. How does Node.js handle many requests on a single thread?

JavaScript runs on one thread with an event loop. Slow I/O, such as database or network calls, is handed off and the loop keeps serving other requests; when the I/O finishes, its callback or promise continues. This works well for I/O-heavy APIs, but CPU-heavy work blocks the loop, so it belongs in worker threads or a separate service.

What they're testing: async vs blocking, whichever language you use.

Q16. How would you use a cache like Redis, and how do you keep it correct?

Use the cache-aside pattern: read from the cache, and on a miss read from the database and store the result with a TTL. When data changes, update the database and delete or update the cache key. Cache data that is read often and changes rarely. The hard part is invalidation: stale data is the trade-off you accept for speed.

What they're testing: whether you know caching creates a consistency problem.

Q17. Sessions vs JWT for authentication?

With sessions, the server stores session data and the client holds a session ID cookie; logging out is easy because you delete the session. A JWT is a signed token holding claims that the server can verify without a lookup, which suits stateless services, but it can't be revoked before expiry without extra work, so keep JWTs short-lived and pair them with refresh tokens.

What they're testing: trade-offs, not "JWT is better".

Q18. How should passwords be stored?

Never store plain text or use reversible encryption. Store a slow, salted hash using an algorithm built for passwords, such as bcrypt, scrypt or Argon2. The salt defeats precomputed tables and the slowness makes brute force expensive. Fast hashes like MD5 or plain SHA-256 are not suitable for passwords.

What they're testing: security basics every backend engineer must know.

Q19. What is SQL injection and how do you prevent it?

It happens when user input is concatenated into a SQL string, letting an attacker change the query. Prevent it with parameterised queries or prepared statements (or an ORM that uses them), validate input, and give the database user only the permissions it needs.

What they're testing: whether you have written safe database code.

Q20. What is CORS and why does it exist?

Browsers block a page from reading responses from a different origin unless that server allows it. CORS is how the server opts in, using headers like Access-Control-Allow-Origin. It protects users' browsers, not your API: tools like curl ignore it, so CORS is not a substitute for authentication.

What they're testing: a frequent real-world bug for freshers building full-stack projects.

4. Beginner System Design Questions

For freshers, these test structure rather than massive scale. Clarify requirements, sketch the API and data model, then discuss one or two bottlenecks.

Q21. Design a URL shortener.

APIs: POST /shorten returns a short code; GET /{code} redirects. Store code to URL in a table with an index on code. Generate codes by base62-encoding an auto-increment ID or a random string with a uniqueness check. Reads far outnumber writes, so cache popular codes in Redis. Mention expiry and click analytics as extensions.

Q22. How would you build a rate limiter for an API?

Use a token bucket per user or API key: tokens refill at a fixed rate and each request spends one; with no tokens, return 429. Store counters in Redis so all API servers share them, and use atomic operations so concurrent requests can't overspend.

Q23. A user uploads a large file. How do you handle it?

Don't stream big files through your API server. Issue a pre-signed URL so the client uploads directly to object storage (such as S3), then record the file's metadata. Do slow processing, like thumbnails or virus scans, asynchronously in a background job.

Q24. When and how would you use a message queue?

When work doesn't need to finish inside the request, such as sending emails, generating reports or processing payments' follow-ups. The API publishes a job to a queue and returns quickly; workers process it with retries. Because jobs can be delivered more than once, make handlers idempotent, for example by storing a processed-job ID.

Q25. An endpoint is slow. How do you investigate?

Measure before changing anything: check logs and response times, then find where time goes. Common causes are missing indexes (use EXPLAIN), N+1 queries, slow external calls, or large payloads. Fix the biggest one, then add caching or pagination if needed, and measure again.

5. Project and Behavioral Questions

Q26. Walk me through a project on your resume.

Use a clear order: the problem, your architecture (client, API, database, any cache or queue), one decision you made and why, one hard bug and how you found it, and what you would change. Keep it to about two minutes and stop for questions.

Q27. Tell me about the hardest bug you fixed.

Pick a real one with a technical cause, such as a race condition, a timezone issue or a memory leak. Explain how you reproduced it, how you narrowed it down, the fix, and how you prevented it from returning (a test, a constraint or monitoring).

Q28. Why backend development?

Give a specific reason tied to something you did, for example enjoying designing data models or making a slow API fast, rather than "I don't like CSS".

Q29. Tell me about a time you learned a new technology quickly.

Show your learning process: what you needed to build, how you learned (docs, small prototypes), and what you shipped. Interviewers hiring freshers care most about how fast you will ramp up.

Q30. Do you have any questions for us?

Ask about the work: what a new engineer's first project usually is, how code review works, or how the team handles on-call and production issues. It shows you're thinking about doing the job well.

How to Prepare in 4 Weeks

  • Week 1: HTTP, REST and status codes (Q1 to Q6), plus daily timed coding problems.
  • Week 2: SQL and databases (Q7 to Q13). Write real queries, including joins, GROUP BY and window functions.
  • Week 3: Fundamentals and one design question per day (Q14 to Q25), answered out loud.
  • Week 4: Your own projects: rehearse the walkthrough, then run full mock interviews.
✅

Practice on your own resume. Generic question lists only go so far. The follow-ups that decide fresher interviews come from your projects, so practise with questions built from your resume and the job you're applying for.

Backend Fresher Interview FAQs

Which language is best for a backend fresher interview?

The one you know best and can explain deeply. Java, Python, JavaScript (Node.js) and Go are all widely used for backend work. Interviewers care more about fundamentals and your projects than the language.

Do freshers get system design questions?

Sometimes, usually a simple version like a URL shortener or rate limiter. The goal is structured thinking: requirements, API, data model, one bottleneck. Nobody expects distributed-systems depth from a fresher.

How much DSA do I need for backend roles?

Enough to pass the online assessment: arrays, strings, hash maps, two pointers, basic recursion, trees and simple graphs. After that, backend fundamentals and projects matter more.

What projects help most for a backend fresher role?

Deployed projects that show real backend concerns: authentication, a relational database with transactions, caching, background jobs and tests. Our backend roadmap for freshers lists three that work well.

Keep Preparing

Practice the interview your resume will actually get

Not a question bank. The interview is built from your resume and the job you want. Start free, no sign-up for the resume scan.

  • 1. Upload your resume and target jobGet your fit score, missing keywords and bullet fixes in under a minute.
  • 2. Practice the interview built from itA 15-min mock interview with coding, system design and behavioral questions about your own projects.
  • 3. Know where you standGet a HIRE / NO HIRE verdict with feedback on every answer.
Share this article:
Found this helpful?
Backend
Backend Developer
Freshers
Interview Questions
Entry Level
Campus Placement
APIs
Databases
📋 Legal Disclaimer & Copyright Information

Educational Purpose: This article is published solely for educational and informational purposes to help candidates prepare for technical interviews. It does not constitute professional career advice, legal advice, or recruitment guidance.

Nominative Fair Use of Trademarks: Company names, product names, and brand identifiers (including but not limited to Google, Meta, Amazon, Goldman Sachs, Bloomberg, Pramp, OpenAI, Anthropic, and others) are referenced solely to describe the subject matter of interview preparation. Such use is permitted under the nominative fair use doctrine and does not imply sponsorship, endorsement, affiliation, or certification by any of these organisations. All trademarks and registered trademarks are the property of their respective owners.

No Proprietary Question Reproduction: All interview questions, processes, and experiences described herein are based on community-reported patterns, publicly available candidate feedback, and general industry knowledge. MockExperts does not reproduce, distribute, or claim ownership of any proprietary assessment content, internal hiring rubrics, or confidential evaluation criteria belonging to any company.

No Official Affiliation: MockExperts is an independent AI-powered interview preparation platform. We are not officially affiliated with, partnered with, or approved by Google, Meta, Amazon, Goldman Sachs, Bloomberg, Pramp, or any other company mentioned in our content.