One place to prepare for backend and full-stack interviews: system design (HLD and LLD), distributed systems, DSA, microservices, Java (8 to 25), OOP and design patterns, Spring Boot (2 to 4), Hibernate, SQL, Redis, MongoDB, Kafka, REST, gRPC, GraphQL, Docker, Kubernetes, cloud (AWS, GCP, Azure), React, Next.js, Node.js, testing, senior/staff leadership and AI/LLMs.
Answers are written in simple English, with a real-life story first, a small example, a simple diagram where it helps, and a "Say this in the interview" line you can use as it is.
📱 Study on your phone: interviewprep.ankitbansal.dev — search any topic, swipe one card at a time, follow a plan, revise with flashcards.
Started in 2019, rebuilt in 2026 for modern Java and senior-level interviews. Want to help? Read CONTRIBUTING.md.
Table of contents
- How to use this guide
- Study plans
- Crash course (last-minute preparation)
- Top 20 questions to master first
- Behavioral questions
- System Design
- General Topics
- Frontend
- Backend
- Web Services
- Databases
- Microservices
- AI and LLMs
- Production-ready apps
- Questions to ask the interviewer
- Open source contributions
- Pick a plan below: 2 weeks, 1 month or 2 months. Interview tomorrow? Go to the crash course.
- Read the question first. Try to answer it out loud before you read the answer. Speaking is the skill you are training.
- Draw it. For system design, draw boxes and arrows on paper or Excalidraw.
- Add your own story. For each topic, think: "Where did I use this at work? What went wrong?" Senior interviews are won with real stories.
- Tick the day and commit. Each plan has one row per day. Mark it done and push. Small daily progress beats a big weekend.
Every answer follows the same shape:
| Part | Why it is there |
|---|---|
| In one line | Your first sentence in the interview |
| Story | Helps you remember and explain |
| How it works | The real details |
| Diagram / Example | Show, don't only tell |
| Good and bad | Seniors always talk about trade-offs |
| Say this in the interview | Ready-made answer in simple words |
| They may ask next | Follow-up questions |
Every day, in every plan:
- Coding: solve 2 problems (pattern of the week below). Time-box 40 minutes each. Use the 16 patterns and 47 problems and its 4-week DSA plan.
- Speak: explain today's topic out loud for 2 minutes. Record yourself on the phone if you can.
- Revise: read yesterday's "Say this in the interview" lines once more (10 minutes).
- Commit: tick the day (✅) in the plan table and push. Commit message:
day-07: caching.
Coding pattern of the week (use it for the daily 2 problems):
| Week | Pattern |
|---|---|
| 1 | Arrays, hashing, two pointers |
| 2 | Sliding window, stack, queue |
| 3 | Binary search, linked list |
| 4 | Trees, BST, recursion |
| 5 | Graphs (BFS, DFS, topological sort) |
| 6 | Heap, intervals, greedy |
| 7 | Dynamic programming |
| 8 | Mixed, timed (like a real interview) |
The 2-week plan uses weeks 1–2 only, mixed. The 1-month plan uses weeks 1–4.
For: interviews already scheduled. About 6–8 hours a day. Focus only on what is asked most.
| Day | Study | Practice | Done when you can... |
|---|---|---|---|
| 1 | How to answer a system design question, Capacity estimation | Estimate numbers for 3 systems (orders, chat, video) | do the "1M orders per day" math without notes |
| 2 | Scaling, Stateless services, Load balancing, Caching, CDN | Draw a 3-tier app with cache and CDN | explain cache-aside and 2 cache problems |
| 3 | Replication, Sharding, Consistent hashing, Consistency, CAP, Indexes | Pick a shard key for orders, chat, and users | say when you need strong vs eventual consistency |
| 4 | Message queues, WebSockets vs SSE, Unique IDs, Rate limiting | Design a rate limiter (30 min) | draw token bucket and explain it |
| 5 | Monolith vs microservices, Sync vs async, Saga, Outbox, Idempotency | Draw the order saga with compensations | explain the "dual write" problem |
| 6 | Timeouts, Retries + jitter, Circuit breaker, Bulkhead, API gateway | Explain what happens when payment service is slow | describe circuit breaker states |
| 7 | Kafka basics, Partitions, Ordering, Delivery, Duplicates | Mock 1: Amazon order processing (45 min) | guarantee order per customer and handle duplicates |
| 8 | SQL joins, Transactions, Locking | Do 5 of the SQL query problems by hand (2nd highest salary, top N per group) | explain optimistic vs pessimistic with the "last seat" story |
| 9 | Java concurrency story, Virtual threads | Write a thread-safe counter 3 ways | explain race condition, volatile, deadlock |
| 10 | Java 8 to 25, JVM memory, G1 vs ZGC | Rewrite one old Java 8 class with records, switch, sealed | list 3 changes per LTS version |
| 11 | Spring Boot 2 to 4, MVC vs WebFlux, Spring Core (DI, scopes, AOP proxies), @Transactional | Explain why @Transactional fails on self-call |
explain auto-configuration and bean lifecycle |
| 12 | Case studies: news feed + WhatsApp | Mock 2: design WhatsApp (45 min) | handle offline users and message order |
| 13 | Case studies: BookMyShow + YouTube | Mock 3: design BookMyShow (45 min) | stop double booking of the same seat |
| 14 | Behavioral questions, Crash course | Say 6 STAR stories out loud | answer "tell me about yourself" in 2 minutes |
For: you have a few weeks before interviews start. About 4–5 hours a day. Sundays are for a mock interview and revision.
| Day | Study | Practice / Mock |
|---|---|---|
| 1 | How to answer a system design question | Read the 60-minute plan, try it on "URL shortener" |
| 2 | Capacity estimation | Do numbers for orders, chat, video |
| 3 | Scaling, Stateless services, Load balancing | Draw a 3-tier app |
| 4 | Caching, CDN | List cache problems and fixes |
| 5 | Replication, Sharding, Consistent hashing | Pick shard keys for 3 systems |
| 6 | Consistency, CAP, SQL vs NoSQL, Indexes | Choose a database for 5 use cases |
| 7 | Mock: URL shortener + rate limiter | Revise week 1 |
| 8 | Message queues, WebSockets vs SSE, Blob storage | Draw file upload with pre-signed URL |
| 9 | Unique IDs, Rate limiting, Bloom filter | Explain Snowflake ID bits |
| 10 | Geohash, Inverted index, Video streaming | Explain how search is fast |
| 11 | Monolith vs microservices, Sync vs async, API gateway | Explain availability math for 5 services |
| 12 | Saga, Outbox, Idempotency | Draw order saga with compensation |
| 13 | Timeouts, Retries, Circuit breaker, Bulkhead | "Payment service is slow. What happens?" |
| 14 | Mock: Amazon order processing | Revise week 2 |
| 15 | Kafka basics, Partitions, Ordering | How many partitions for 10k msg/s? |
| 16 | Delivery guarantees, Duplicates | Write an idempotent consumer |
| 17 | SQL joins, Transactions, Locking | 10 SQL query problems by hand |
| 18 | Case studies: news feed, WhatsApp | Design both, 30 min each |
| 19 | Case studies: YouTube, YouTube search | Design both, 30 min each |
| 20 | Case studies: BookMyShow, payments / banking | Design both, 30 min each |
| 21 | Mock: Uber or Hotstar live | Revise week 3 |
| 22 | Java concurrency story (eras 1–4) | Thread-safe counter 3 ways, deadlock example |
| 23 | Java collections: HashMap, ConcurrentHashMap internals | Explain put() step by step |
| 24 | Java 8 to 25, Virtual threads, Streams | 10 stream coding problems |
| 25 | JVM memory, G1 vs ZGC | Explain 3 kinds of OutOfMemoryError |
| 26 | Spring Core: DI, scopes, lifecycle, auto-configuration, AOP proxies, @Transactional | Explain self-invocation problem |
| 27 | Spring Boot 2 to 4, MVC vs WebFlux, security (OAuth2, JWT) | Explain JWT flow with a diagram |
| 28 | Mock: Java + Spring deep dive (ask a friend or use AI as interviewer) | Revise week 4 |
| 29 | Behavioral questions, Next.js / Node.js if your role needs it | 6 STAR stories out loud |
| 30 | Crash course + rest | Sleep well |
For: building strong depth while applying for jobs. About 3–4 hours a day. This is also the build plan for this guide: each day, the answers for that topic are written or improved here and committed.
Week 1: System design basics
| Day | Topic | Commit to this guide |
|---|---|---|
| 1 | How to answer a system design question, Capacity estimation | Review answers, add your own numbers |
| 2 | Scaling, Stateless services, Load balancing | Add your production story |
| 3 | Caching, CDN | Add a cache incident you saw |
| 4 | Replication, Sharding, Consistent hashing | Review answers |
| 5 | Consistency, CAP, SQL vs NoSQL, Indexes | Review answers |
| 6 | Message queues, WebSockets vs SSE, Blob storage, IDs | Review answers |
| 7 | Mock: URL shortener. Revise the week. | Review answers |
Week 2: Microservices, Kafka, databases
| Day | Topic | Commit to this guide |
|---|---|---|
| 8 | Monolith vs microservices, Sync vs async, API gateway | Answer old Microservices questions |
| 9 | Saga, Outbox, Idempotency | CQRS and event sourcing answers |
| 10 | Timeouts, Retries, Circuit breaker, Bulkhead | Load shedding, backpressure, graceful degradation |
| 11 | Kafka basics, Partitions, Ordering | Answer old Kafka questions |
| 12 | Delivery guarantees, Duplicates | Kafka vs RabbitMQ answer |
| 13 | SQL joins, Transactions, Locking | SQL query problems + old MySQL questions |
| 14 | Mock: Amazon order processing. Revise. | Rate limiter case study |
Week 3: Case studies, part 1
| Day | Topic | Commit to this guide |
|---|---|---|
| 15 | Rate limiting, Bloom filter | Review rate limiter |
| 16 | News feed (Facebook / Instagram) | Case study: news feed |
| 17 | WhatsApp (chat, groups, online status) | Case study: WhatsApp |
| 18 | YouTube (upload and watch) | Case study: YouTube |
| 19 | YouTube search and typeahead | Case study: search + typeahead |
| 20 | BookMyShow (seat booking) | Case study: BookMyShow |
| 21 | Mock: one of this week's systems. Revise. | Fix gaps found in the mock |
Week 4: Case studies, part 2
| Day | Topic | Commit to this guide |
|---|---|---|
| 22 | Payment gateway and bank ledger | Case study: payments / banking |
| 23 | Uber / Ola (location, matching) | Case study: Uber |
| 24 | Hotstar live (millions join at once) | Case study: Hotstar live |
| 25 | Notification service, distributed job scheduler | Case studies: notifications, scheduler |
| 26 | Dropbox / Google Drive | Case study: Dropbox |
| 27 | Flash sale, stock exchange | Case studies: flash sale, stock exchange |
| 28 | Mock: random system. Revise. | Fix gaps |
Week 5: Java
| Day | Topic | Commit to this guide |
|---|---|---|
| 29 | Java concurrency story | Executors, CompletableFuture answers |
| 30 | Collections: HashMap, ConcurrentHashMap internals | Update old collection answers |
| 31 | Java 8 to 25 | Update old Java answers |
| 32 | Core Java deep dive (HashMap, generics, JVM), JVM memory, G1 vs ZGC | Memory leak and high GC debugging story |
| 33 | Virtual threads, streams | Solve 15 stream problems |
| 34 | OOP, SOLID, design patterns | Self-test with OOPS and Design Patterns questions |
| 35 | Mock: Java deep dive. Revise. | Fix gaps |
Week 6: Spring and low-level design
| Day | Topic | Commit to this guide |
|---|---|---|
| 36 | Spring Core: DI, scopes, lifecycle, AOP, filters vs interceptors, how Boot works | Self-test with Spring questions |
| 37 | @Transactional, propagation, Hibernate and JPA | Self-test with JPA / Hibernate questions |
| 38 | Spring Boot 2 to 4, observability | Review answers |
| 39 | Spring Security, OAuth2, JWT | Review answers |
| 40 | MVC vs WebFlux, testing (JUnit 6, Mockito, Testcontainers) | Review answers |
| 41 | Low-level design: parking lot, BookMyShow, elevator, Splitwise | Design 2 case studies on paper first |
| 42 | Mock: low-level design. Revise. | Fix gaps |
Week 7: Full stack and cloud
| Day | Topic | Commit to this guide |
|---|---|---|
| 43 | Node.js event loop and scaling | Review answers |
| 44 | React (with the machine coding round), Next.js | Build 2 machine-coding problems |
| 45 | Cloud: AWS, GCP, Azure | Name the service for each need on all 3 clouds |
| 46 | Docker and Kubernetes | Self-test with Docker / Kubernetes questions |
| 47 | Redis and MongoDB | Self-test with Redis / MongoDB questions |
| 48 | Production-ready apps: observability, incidents, disaster recovery | Review answers |
| 49 | Mock: full-stack system (Next.js + Spring + AWS). Revise. | Fix gaps |
Week 8: Harder systems, behavioral, final polish
| Day | Topic | Commit to this guide |
|---|---|---|
| 50 | Multi-tenant SaaS, multi-region | Case studies |
| 51 | Leaderboard, top-K trending, ad click counting | Case studies |
| 52 | AI and LLMs: LLM basics and RAG | Build a small RAG demo |
| 53 | Behavioral questions, staff-level stories | Write your 8 STAR stories (keep them private if you want) |
| 54 | Weak areas from your mock notes | Fix gaps |
| 55 | Full mock loop: coding + system design + behavioral | Fix gaps |
| 56 | Crash course + rest | Final commit |
You don't have time to learn new things now. Your goal is to remember and speak clearly.
| Time | Do this |
|---|---|
| 1 hour | Read the Top 20 questions. Only the In one line and Say this in the interview parts. |
| 1 hour | Read How to answer a system design question and Capacity estimation. Do one estimate on paper. |
| 1.5 hours | One full mock design out loud, with a timer: Amazon order processing or the system the company is famous for. |
| 1 hour | Java + Spring: concurrency, Java 8 to 25, virtual threads, Spring Boot 2 to 4. |
| 1 hour | 2 easy-medium coding problems. Only to warm up, not to learn. |
| 30 min | Read your STAR stories. Practice "tell me about yourself". Read about the company. |
| Night | Stop. Sleep 7–8 hours. A tired brain cannot design systems. |
- Read the one-page sheet below. Nothing else.
- Keep water, paper and a pen ready. Open your drawing tool. Test camera and microphone.
- Write 3 questions for the interviewer (ideas here).
System design steps (60 minutes):
- Clarify (5 min): who uses it, main features, scale, what is out of scope.
- Numbers (5 min): users, requests per second, storage. 1 day ≈ 100,000 seconds.
- APIs + data model (10 min).
- Simple design first (10 min): client → load balancer → services → database / cache / queue.
- Deep dive (15 min): the 2–3 hard parts.
- Failures + trade-offs (10 min): "What if X goes down?"
- Summary (5 min).
Numbers to remember:
| Thing | Number |
|---|---|
| Seconds in a day | 86,400 ≈ 100,000 |
| 1 million per day | ≈ 12 per second (peak ≈ 2–3x) |
| Read from memory (RAM) | ~100 nanoseconds |
| Read from SSD | ~100 microseconds |
| Network call in same data center | ~0.5 ms |
| Network call across continents | ~150 ms |
| One server (simple API) | ~1,000–5,000 requests/second |
Lines that always work:
- "Let me first clarify the requirements before I design."
- "I will start simple, then scale the parts that need it."
- "This is a trade-off. We get X, but we pay Y."
- "What happens if this service goes down? Let me walk through it."
- "For money, I choose strong consistency. For likes and views, eventual consistency is fine."
- "I will make this operation idempotent, so retries are safe."
Useful sentences when you are stuck (it is normal, and it is fine):
- "Let me take a minute to think about this."
- "Can I ask a question to understand this better?"
- "Let me say what I understood, so we are on the same page."
- "I have not used this directly, but here is how I would approach it."
If you only have little time, master these. Each link goes to the full answer.
| # | Question | Area |
|---|---|---|
| 1 | Design Amazon order processing | System design |
| 2 | Estimate capacity for 1 million orders per day | System design |
| 3 | How many service instances do you need, and why? | System design |
| 4 | Sync vs async communication between microservices | Microservices |
| 5 | Saga pattern | Microservices |
| 6 | Kafka partitions and consumer groups | Kafka |
| 7 | How do you guarantee message ordering? | Kafka |
| 8 | How do you handle duplicate events? | Kafka |
| 9 | Database consistency: strong vs eventual | Databases |
| 10 | SQL joins and self join | Databases |
| 11 | Optimistic vs pessimistic locking | Databases |
| 12 | Exponential backoff with jitter | Resilience |
| 13 | Circuit breaker | Resilience |
| 14 | Java concurrency and shared data | Java |
| 15 | Java 8 → 17 → 21 → 25 | Java |
| 16 | G1 vs ZGC | Java |
| 17 | Virtual threads | Java |
| 18 | Spring Boot 2 → 3 → 4 | Spring |
| 19 | Spring MVC vs WebFlux | Spring |
| 20 | Next.js architecture and Server Components | Frontend |
Senior interviews always have a behavioral round. Prepare 8 real stories from your work. One story can answer many questions.
For senior and staff topics (design docs, tech debt, leading incidents, mentoring, influence) and 15 sample staff-level answers, see Senior and staff engineering.
Use STAR to tell a story:
| Letter | Meaning | How long |
|---|---|---|
| Situation | Where were you? What was the project? | 2 lines |
| Task | What was your job or the problem? | 1 line |
| Action | What did you do? Say "I", not "we". | Most of the story |
| Result | What changed? Use numbers: "latency went from 2 s to 300 ms". | 2 lines |
Stories to prepare:
- A hard technical problem you solved (production issue, performance fix).
- A system you designed from scratch.
- A disagreement with a teammate or manager, and how you solved it.
- A mistake you made, and what you learned.
- A time you helped or mentored someone.
- A time you delivered under a tight deadline.
- A time you changed something without being asked (ownership).
- A time you had to say "no" or push back on a requirement.
Common questions:
- Tell me about yourself. (2 minutes: current role → biggest achievement → what you want next.)
- Why are you looking for a change? / Tell me about your layoff.
- Tell me about a project you are proud of.
- Tell me about a time you failed.
- How do you handle conflict in the team?
- How do you make technical decisions?
- How do you mentor juniors?
- Why this company?
About a layoff: keep it short, honest and positive. Layoffs are common and interviewers know it. Example:
"My company reduced the team size in a restructuring, and my role was affected along with many others. It was not about performance. I used the time to sharpen my system design and modern Java skills, and I am excited to bring my 10+ years of backend experience to a team like yours."
Then stop. Do not over-explain.
Basics, all in one file: docs/system-design.md
- How interviewers run the system design round (what they score, how they push you, red flags, a sample opening)
- How to answer a system design question (steps, 60-minute plan, questions to ask)
- Capacity estimation (1 million orders a day, how many servers)
- Building blocks: scaling, load balancing, caching, CDN, replication, sharding, consistent hashing, consistency, CAP, SQL vs NoSQL, indexes, queues, WebSockets, blob storage, IDs, rate limiting, Bloom filter, geohash, search, video streaming
Case studies, one file each (full list and status):
- Reads and protection: URL shortener (TinyURL) · Rate limiter
- Social and real time: News feed (Facebook, Instagram) · WhatsApp
- Video and search: YouTube / Netflix · YouTube search and typeahead · Hotstar live (IPL)
- Booking and shopping: BookMyShow · Flash sale · Amazon order processing
- Money: Payment gateway · Bank ledger and wallet · Stock exchange
- Location, files, platform: Uber / Ola · Dropbox / Google Drive · Notification service · Distributed job scheduler
- Coming next: web crawler, key-value store, distributed cache, leaderboard, top-K trending, ad click counting, Google Docs, multi-tenant SaaS, metrics and logging.
Distributed systems fundamentals: docs/distributed-systems.md: clocks, Raft, quorums, consistency models, 2PC, CRDTs, Elasticsearch and RabbitMQ.
Low-level design (LLD / object-oriented design): docs/lld-case-studies.md: UML basics, a repeatable method and 20 case studies (parking lot, BookMyShow, elevator, vending machine, Splitwise, ATM, chess…).
Older practice list (from 2019, still good): full-text search, elevator, coffee vending machine, parking system, Quartz scheduler, web crawler, Pastebin, push notifications, Instagram, Dropbox, Messenger, Twitter, Netflix, BookMyShow, typeahead, rate limiter, event management, Twitter search, news feed, Yelp / nearby friends, Uber, Quora, UberEats, Reddit, HackerRank.
Answers: dsa-coding-round.md
Codechef DS certification and preparation path with required links
- Asymptotic analysis (Big-O notation) Basic Data Structures:
- Basic math operations (addition, subtraction, multiplication, division, exponentiation)
- Sqrt(n) primality testing
- Euclid’s GCD Algorithm
- Basic Recursion
- Greedy Algorithms
- Basic Dynamic Programming
- Naive string searching
- O(n logn) Sorting
- Binary Searching
- Divide and Conquer
Standford Algorithms Playlist 1
Standford Algorithms Playlist 2
Sample DS Interview questions
Geeks for Geeks for almost all types of algorithms example in the world
Answers: oop-clean-code.md
OOPs concept theory
Characteristics of good OOD
Answers: oop-clean-code.md
Answers: oop-clean-code.md
-- Gist link -- https://gist.github.com/bansalankit92/6119c4f7fabe11b7a174a99f5a7bb376
- General rules
- Names rules
- Functions rules
- Comment rules
- Formatting / Source code structure
- Classes and Objects
- Objects/Data structures/POJO
- Exceptions/ Error Handling
- Tests rules
- Design rules
- Understandability tips
- Refactor
- Code smells
Answers: oop-clean-code.md
-- Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.
Answers: lld-case-studies.md
Object-Oriented Design and UML
- Object-Oriented Basics
- OO Analysis and Design
- What is UML?
- Use Case Diagrams
- Class Diagram
- Sequence diagram
- Activity Diagrams
Object Oriented Design Case Studies
- Design a Library Management System
- Design a Parking Lot
- Design Amazon - Online Shopping System
- Design Stack Overflow
- Design a Movie Ticket Booking System
- Design an ATM
- Design an Airline Management System
- Design Blackjack and a Deck of Cards
- Design a Hotel Management System
- Design a Restaurant Management system
- Design Chess
- Design an Online Stock Brokerage System
- Design a Car Rental System
- Design LinkedIn
- Design Cricinfo
- Design Facebook - a social network
Answers (simple English, with diagrams and code):
| Topic | What's inside |
|---|---|
| React | How React renders, hooks (stale closures, when not to use useEffect), performance, React 19, architecture for big apps, design systems, state, data fetching, testing, the "500k-line app in 90 days" question |
| JavaScript | Event loop, closures, this, prototypes, promises, V8 engine, callbacks, functional programming, DOM events, generators, Proxy, Web Workers, 15 output puzzles, 45 coding problems (debounce, Promise.all, Promise from scratch, LRU…) |
| TypeScript | Narrowing, generics, utility and mapped types, satisfies, tsconfig, TS 6 → 7, 16 coding tasks |
| CSS and Tailwind | Box model, specificity, flexbox, grid, responsive, modern CSS, Tailwind v4, 14 coding tasks |
| Frontend UI and web | What happens when you type a URL, browser rendering, accessibility, Core Web Vitals, frontend security, frontend system design |
| Next.js | App Router, Server vs Client Components, rendering, caching and Cache Components, Server Actions, auth and BFF with Spring, deployment, security, e-commerce page design |
| Testing JS, React and Node | Vitest vs Jest, Testing Library, MSW, Playwright, accessibility tests, flaky tests, CI |
The older question lists below are answered in these files.
Answers: frontend-ui.md
- What did you learn yesterday/this week?
- What excites or interests you about coding?
- What is a recent technical challenge you experienced and how did you solve it?
- When building a new web site or maintaining one, can you explain some techniques you have used to increase performance?
- Can you describe some SEO best practices or techniques you have used lately?
- Can you explain any common techniques or recent issues solved in regards to front-end security?
- What actions have you personally taken on recent projects to increase maintainability of your code?
- Which version control systems are you familiar with?
- Can you describe your workflow when you create a web page?
- If you have 5 different stylesheets, how would you best integrate them into the site?
- Can you describe the difference between progressive enhancement and graceful degradation?
- How would you optimize a website's assets/resources?
- What does CORS stand for and what issue does it address?
- Do you have any pet projects? What kind?
- Explain your current project with data flow architecture, file structure,...?
Answers: javascript.md
Basics
- JavaScript Fundamentals
- Code quality
- Objects: (this, GC, new)
- Data types and DS
- Advanced working with functions (Closures, NFE, call/apply)
- Object properties configuration
- Prototypes, inheritance
- Classes
- Error handling
- Promises, async/await, callbacks
- Generators, advanced iteration
- Modules
Advanced
- Browser: Document, Events, Interfaces
- Frames and windows
- Binary data, files
- Network requests - websockets/http
- Storage and IndexDB
- Animation
- Web components
- Regular expressions
- Web workers
- Caching API
- Accessibility
New features
JavaScript Concepts JavaScript Professionals Must Know Well
Answers: frontend-ui.md
- What were some of the key goals and motivations for the HTML5 specification?
- What are some of the key new features in HTML5?
- What are “web workers”?
- How do you indicate the character set being used by an HTML5 document? How does this differ from older HTML standards?
- Discuss the differences between an HTML specification and a browser’s implementation thereof.
- Briefly describe the correct usage of the following HTML5 semantic elements:
<header>, <article>, <section>, <footer>. - Can a
<section>contain<article>elements? Can an<article>contain<section>elements? Provide usage examples. - Can a web page contain multiple
<header>elements? What about<footer>elements? - Describe the relationship between the
<header>and<h1>tags in HTML5. - Give a simple implementation of the
<video>tag to embed a video stored at http://www.example.com/amazing_video.mp4. Give the video a width of 640 pixels by 360 pixels. Provide the user with controls. - Write the code necessary to create a 300 pixel by 300 pixel
<canvas>. Within it, paint a blue 100 pixel by 100 pixel square with the top-left corner of the square located 50 pixels from both the top and left edges of the canvas. - What is HTML5 Web Storage? Explain localStorage, sessionStorage, cookies.
- What is the difference between span and div?
- What is the Geolocation API in HTML5?
- What’s one main result if you do not specify a doctype in an HTML page?
- What’s the difference between the
<svg> and <canvas>elements? - Describe the difference between
<script>, <script async> and <script defer>. - Why is it generally a good idea to position CSS
<link>s between <head></head> and JS <script>s just before</body>? Do you know any exceptions? - Why Meta tags are used in HTML?
Answers: css-tailwind.md
- CSS Selectors
- CSS Box Model
- CSS Layout
- Styling Text with CSS
- Styling Boxes with CSS
- CSS Units
- CSS Colors and Gradients
- CSS Transitions and Animations
- CSS Transforms
- CSS Pseudo-classes and Pseudo-elements
- CSS At-Rules (e.g. Media Queries)
- CSS Specificity
- CSS Preprocessors
- CSS Naming Systems and Architecture
Interview Questions
- Describe Floats and how they work.
- Describe z-index and how stacking context is formed.
- Describe BFC (Block Formatting Context) and how it works.
- How would you approach fixing browser-specific styling issues?
- Have you ever used a grid system, and if so, what do you prefer?
- Have you used or implemented media queries or mobile specific layouts/CSS?
- Can you give an example of an @media property other than screen?
- What are the advantages/disadvantages of using CSS preprocessors?
- Explain your understanding of the box model and how you would tell the browser in CSS to render your layout in different box models.
- What does * { box-sizing: border-box; } do? What are its advantages?
- What is the CSS display property and can you give a few examples of its use?
- What’s the difference between inline and inline-block?
- What’s the difference between the “nth-of-type()” and “nth-child()” selectors?
- What’s the difference between a relative, fixed, absolute and statically positioned element?
- What existing CSS frameworks have you used locally, or in production? How would you change/improve them?
- Have you played around with the new CSS Flexbox or Grid specs?
- Can you explain the difference between coding a web site to be responsive versus using a mobile-first strategy?
- What is CSS selector specificity and how does it work?
Answers: docs/nextjs.md
- Next.js architecture and Server Components (App Router, Server vs Client Components, SSR / SSG / ISR, caching, Next.js 15 → 16, calling a Spring Boot backend)
- Coming next: Server Actions, Route Handlers, performance for large apps, React 19 basics.
Answers (simple English, with diagrams and code):
| Topic | What's inside |
|---|---|
| Core Java deep dive | HashMap and ConcurrentHashMap internals, collections Big-O, strings, generics, exceptions, class loading, JIT, Java memory model, 15 coding questions |
| Java · concurrency · streams | Java 8 → 25, JVM memory, GC, threads to virtual threads, 65 stream problems |
| DSA: the coding round | How the round is scored, Big-O, 16 patterns, 47 problems with tested Java, a 4-week plan |
| OOP, SOLID, design patterns, clean code | 4 pillars, SOLID with bad/good code, all 23 GoF patterns, clean code, code smells |
| Spring and Spring Boot | Spring Core (IoC, bean scopes, lifecycle, stereotypes, annotations cheat sheet), how Boot works, AOP proxies, DispatcherServlet, filters vs interceptors, Boot 2 → 4, WebFlux |
| Spring questions (README list) | Every Spring Core, MVC, Boot, AOP and Spring 5 question below, answered |
| Spring ecosystem | Security (filter chain, JWT, OAuth2), Data JPA, validation, caching, Spring Cloud, observability, Batch, Spring AI |
| Testing Spring and Java | JUnit 6, Mockito, test slices, @MockitoBean, Testcontainers, flaky tests, coverage |
| Hibernate and JPA | Entity states, persistence context, dirty checking, N+1, caching, batching, locking, Hibernate 7 |
| SQL · transactions and locking | Indexes, EXPLAIN, window functions, CTEs, MVCC, partitioning, 25 query problems |
| Redis · MongoDB | Caching patterns, locks, rate limiting, cluster · schema design, indexes, aggregation, sharding |
| REST APIs and web services | HTTP semantics, status codes, API design, pagination, versioning, ETags, webhooks, SOAP |
| gRPC, GraphQL and WebSockets | HTTP/2, Protobuf, streaming, deadlines, gRPC load balancing, Spring gRPC, DataLoader, federation, scaling WebSockets, choosing an API style |
| Distributed systems | Clocks, Raft consensus, quorums, consistency models, 2PC and TCC, CRDTs, gossip, Elasticsearch internals, RabbitMQ vs Kafka vs SQS |
| Kafka · Microservices | KRaft, replication, exactly-once, DLT · 12-factor, saga, outbox, CQRS, DDD, anti-patterns |
| Node.js | Event loop, libuv, streams, auth, databases, queues, WebSockets, 12 coding problems |
| Debugging Spring Boot | Startup errors, missing beans, breakpoints inside Spring, slow apps |
The older question lists below link each question to its answer.
Answers: docs/java.md
Modern Java (answered in simple English):
- ⭐ Java streams and functional programming: pipeline diagrams, collectors, map-reduce, gatherers, and 65 coding problems (top 5, group by, sort a map by value, second highest, frequency count, anagrams...)
- ⭐ Java concurrency: from threads to virtual threads: the full story in 7 eras (Thread → ExecutorService → Fork/Join → CompletableFuture → Flow → virtual threads → structured concurrency), with architecture diagrams and 44 interview questions
- Java concurrency and shared data (race condition, synchronized, volatile, atomic, ConcurrentHashMap, deadlock)
- Java 8 → 17 → 21 → 25: what changed (records, sealed classes, pattern matching, and how to migrate)
- JVM memory basics (heap, stack, metaspace, OutOfMemoryError)
- G1 vs ZGC
- Virtual threads
Core Java questions (2019 answers, being updated to Java 21/25):
- Object oriented programming basics
- Advanced object oriented concepts
- Java Platform
- Wrapper Classes
- Strings
- Advanced object oriented concepts
- Modifiers
- Exception handling
- Miscellaneous topics
- Collections
- Advanced collections
- Generics
- Multi threading
- Functional Programming - Lamdba expressions and Streams
- New Features Java 7,8,11
OOPs in Java
Solid Principles in Java
Answers: docs/spring.md
- Spring Boot 2 → 3 → 4: what changed
- Spring MVC vs WebFlux
- ⭐ Debugging Spring Boot from the inside: startup errors, missing beans, where a property came from, breakpoints inside Spring,
@Transactionaland JPA, slow apps, a one-page checklist - Spring Reactive (WebFlux) in depth: reactive programming, Mono and Flux, operators, backpressure, schedulers, WebClient, R2DBC, testing, debugging, and 31 interview questions
- ⭐ Spring ecosystem: the libraries companies use: Security (JWT, OAuth2), Data JPA (N+1, @Transactional), validation, caching, scheduling, testing (Testcontainers), Spring Cloud (Gateway, Config, OpenFeign), observability, Kafka / RabbitMQ, Batch, Modulith, Spring AI, GraphQL, native images, and 60 interview questions
- The older questions below are answered across these files.
Answers: spring-questions.md
- What Is Spring Framework?
- What Are the Benefits of Using Spring?
- What Spring Sub-Projects Do You Know? Describe Them Briefly.
- What Is Dependency Injection?
- How Can We Inject Beans in Spring?
- Which Is the Best Way of Injecting Beans and Why
- What Is the Difference Between Beanfactory and Applicationcontext?
- What Is a Spring Bean?
- What Is the Default Bean Scope in Spring Framework?
- How to Define the Scope of a Bean?
- Are Singleton Beans Thread-Safe?
- What Does the Spring Bean Lifecycle Look Like?
- What Is the Spring Java-Based Configuration?
- Can We Have Multiple Spring Configuration Files in One Project?
- What Is Spring Security?
- What Is Spring Boot?
- Name Some of the Design Patterns Used in the Spring Framework?
- How Does the Scope Prototype Work?
- What is Loose Coupling?
- What is a Dependency?
- What is IOC (Inversion of Control)?
- Can you give few examples of Dependency Injection?
- What is Auto Wiring?
- What are the important roles of an IOC Container?
- What are Bean Factory and Application Context?
- Can you compare Bean Factory with Application Context?
- How do you create an application context with Spring?
- How does Spring know where to search for Components or Beans?
- What is a Component Scan?
- How do you define a component scan in XML and Java Configurations?
- How is it done with Spring Boot?
- What does @Component signify?
- What does @Autowired signify?
- What’s the difference Between @Controller, @Component, @Repository, and @Service Annotations in Spring?
- What is the default scope of a bean?
- Are Spring beans thread safe?
- What are the other scopes available?
- How is Spring’s singleton bean different from Gang of Four Singleton Pattern?
- What are the different types of dependency injections?
- What is setter injection?
- What is constructor injection?
- How do you choose between setter and constructor injections?
- What are the different options available to create Application Contexts for Spring?
- What is the difference between XML and Java Configurations for Spring?
- How do you choose between XML and Java Configurations for Spring?
- How does Spring do Autowiring?
- What are the different kinds of matching used by Spring for Autowiring?
- How do you debug problems with Spring Framework?
- How do you solve NoUniqueBeanDefinitionException?
- How do you solve NoSuchBeanDefinitionException?
- What is @Primary?
- What is @Qualifier?
- What is CDI (Contexts and Dependency Injection)?
- Does Spring Support CDI?
- Would you recommed to use CDI or Spring Annotations?
- What are the major features in different versions of Spring?
- What are new features in Spring Framework 4.0?
- What are new features in Spring Framework 5.0?
- What are important Spring Modules?
- What are important Spring Projects?
- What is the simplest way of ensuring that we are using single version of all Spring related dependencies?
- Name some of the design patterns used in Spring Framework?
- What do you think about Spring Framework?
- Why is Spring Popular?
- Can you give a big picture of the Spring Framework?
Answers: spring-questions.md
- How to Get Servletcontext and Servletconfig Objects in a Spring Bean?
- What Is a Controller in Spring Mvc?
- How Does the @Requestmapping Annotation Work?
- What is Model 1 architecture?
- What is Model 2 architecture?
- What is Model 2 Front Controller architecture?
- Can you show an example controller method in Spring MVC?
- Can you explain a simple flow in Spring MVC?
- What is a ViewResolver?
- What is Model?
- What is ModelAndView?
- What is a RequestMapping?
- What is Dispatcher Servlet?
- How do you set up Dispatcher Servlet?
- What is a form backing object?
- How is validation done using Spring MVC?
- What is BindingResult?
- How do you map validation results to your view?
- What are Spring Form Tags?
- What is a Path Variable?
- What is a Model Attribute?
- What is a Session Attribute?
- What is a init binder?
- How do you set default date format with Spring?
- Why is Spring MVC so popular?
Answers: spring-questions.md
- What is Spring Boot?
- What are the important Goals of Spring Boot?
- What are the important Features of Spring Boot?
- Compare Spring Boot vs Spring?
- Compare Spring Boot vs Spring MVC?
- What is the importance of @SpringBootApplication?
- What is Auto Configuration?
- How can we find more information about Auto Configuration?
- What is an embedded server? Why is it important?
- What is the default embedded server with Spring Boot?
- What are the other embedded servers supported by Spring Boot?
- What are Starter Projects?
- Can you give examples of important starter projects?
- What is Starter Parent?
- What are the different things that are defined in Starter Parent?
- How does Spring Boot enforce common dependency management for all its Starter projects?
- What is Spring Initializr?
- What is application.properties?
- What are some of the important things that can customized in application.properties?
- How do you externalize configuration using Spring Boot?
- How can you add custom application properties using Spring Boot?
- What is @ConfigurationProperties?
- What is a profile?
- How do you define beans for a specific profile?
- How do you create application configuration for a specific profile?
- How do you have different configuration for different environments?
- What is Spring Boot Actuator?
- How do you monitor web services using Spring Boot Actuator?
- How do you find more information about your application envrionment using Spring Boot?
- What is a CommandLineRunner?
Spring Data Access
- What Is Spring Jdbctemplate Class and How to Use It?
- How Would You Enable Transactions in Spring and What Are Their Benefits?
- What Is Spring Dao?
- What is Spring Data?
- What is the need for Spring Data?
- What is Spring Data JPA?
- What is a CrudRepository?
- What is a PagingAndSortingRepository?
Answers: spring-questions.md
- What Is Aspect-Oriented Programming?
- What Are Aspect, Advice, Pointcut, and Joinpoint in Aop?
- What Is Weaving?
- What are cross cutting concerns?
- How do you implement cross cutting concerns in a web application?
- If you would want to log every request to a web application, what are the options you can think of?
- If you would want to track performance of every request, what options can you think of?
- What is an Aspect and Pointcut in AOP?
- What are the different types of AOP advices?
- What is weaving?
- Compare Spring AOP vs AspectJ?
Answers: spring-questions.md
Answered in Spring Reactive interview questions.
- What Is Reactive Programming?
- What Is Spring Webflux?
- What Are the Mono and Flux Types?
- What Is the Use of Webclient and Webtestclient?
- What Are the Disadvantages of Using Reactive Streams?
- Is Spring 5 Compatible with Older Versions of Java?
- How Ow Spring 5 Integrates with Jdk 9 Modularity?
- Can We Use Both Web Mvc and Webflux in the Same Application?
Answers: hibernate-jpa.md
- What is Spring JDBC? How is different from JDBC?
- What is a JdbcTemplate?
- What is a RowMapper?
- What is JPA?
- What is Hibernate?
- How do you define an entity in JPA?
- What is an Entity Manager?
- What is a Persistence Context?
- How do you map relationships in JPA?
- What are the different types of relationships in JPA?
- How do you define One to One Mapping in JPA?
- How do you define One to Many Mapping in JPA?
- How do you define Many to Many Mapping in JPA?
- How do you define a datasource in a Spring Context?
- What is the use of persistence.xml
- How do you configure Entity Manager Factory and Transaction Manager?
- How do you define transaction management for Spring – Hibernate integration?
- What is Hibernate Framework?
- What is Java Persistence API (JPA)?
- What are the important benefits of using Hibernate Framework?
- What are the advantages of Hibernate over JDBC?
- Name some important interfaces of Hibernate framework?
- What is hibernate configuration file?
- What is hibernate mapping file?
- Name some important annotations used for Hibernate mapping?
- What is Hibernate SessionFactory and how to configure it?
- Hibernate SessionFactory is thread safe?
- What is Hibernate Session and how to get it?
- Hibernate Session is thread safe?
- What is difference between openSession and getCurrentSession?
- What is difference between Hibernate Session get() and load() method?
- What is hibernate caching? Explain Hibernate first level cache?
- How to configure Hibernate Second Level Cache using EHCache?
- What are different states of an entity bean?
- What is use of Hibernate Session merge() call?
- What is difference between Hibernate save(), saveOrUpdate() and persist() methods?
- What will happen if we don’t have no-args constructor in Entity bean?
- What is difference between sorted collection and ordered collection, which one is better?
- What are the collection types in Hibernate?
- How to implement Joins in Hibernate?
- Why we should not make Entity Class final?
- What is HQL and what are it’s benefits?
- What is Query Cache in Hibernate?
- Can we execute native sql query in hibernate?
- What is the benefit of native sql query support in hibernate?
- What is Named SQL Query?
- What are the benefits of Named SQL Query?
- What is the benefit of Hibernate Criteria API?
- How to log hibernate generated sql queries in log files?
- What is Hibernate Proxy and how it helps in lazy loading?
- How to implement relationships in hibernate?
- How transaction management works in Hibernate?
- What is cascading and what are different types of cascading?
- How to integrate log4j logging in hibernate application?
- How to use application server JNDI DataSource with Hibernate framework?
- How to integrate Hibernate and Spring frameworks?
- What is HibernateTemplate class?
- How to integrate Hibernate with Servlet or Struts2 web applications?
- Which design patterns are used in Hibernate framework?
- What are best practices to follow with Hibernate framework?
- What is Hibernate Validator Framework?
- What is Spring JDBC? How is different from JDBC?
- What is a JdbcTemplate?
- What is a RowMapper?
- What is JPA?
- What is Hibernate?
- How do you define an entity in JPA?
- What is an Entity Manager?
- What is a Persistence Context?
- How do you map relationships in JPA?
- What are the different types of relationships in JPA?
- How do you define One to One Mapping in JPA?
- How do you define One to Many Mapping in JPA?
- How do you define Many to Many Mapping in JPA?
- How do you define a datasource in a Spring Context?
- What is the use of persistence.xml
- How do you configure Entity Manager Factory and Transaction Manager?
- How do you define transaction management for Spring – Hibernate integration?
https://www.journaldev.com/3633/hibernate-interview-questions-and-answers
Answers: spring-testing.md
- How does Spring Framework Make Unit Testing Easy?
- What is Mockito?
- What is your favorite mocking framework?
- How do you do mock data with Mockito?
- What are the different mocking annotations that you worked with?
- What is MockMvc?
- What is @WebMvcTest?
- What is @MockBean?
- How do you write a unit test with MockMVC?
- What is JSONAssert?
- How do you write an integration test with Spring Boot?
- What is @SpringBootTest?
- What is @LocalServerPort?
- What is TestRestTemplate?
Answers: docs/nodejs.md
- Event loop phases,
process.nextTickvssetImmediate, what blocks the loop, worker threads vs cluster, streams and backpressure, Express / Fastify / NestJS, scaling, memory leaks, graceful shutdown, Node 22–26, Node vs Java/Spring
Answers: web-services.md
- What is a Web Service?
- What is SOAP Web Service?
- What is SOAP?
- Waht is a SOAP Envelope?
- What is SOAP Header and SOAP Body?
- Can you give an example of SOAP Request and SOAP Response?
- What is a SOAP Header? What kind of information is sent in a SOAP Header?
- Can you give an example of a SOAP Header with Authentication information?
- What is WSDL (Web Service Definition Language)?
- What are the different parts of a WSDL?
- What is Contract First Approach?
- What is an XSD?
- Can you give an example of an XSD?
- What is JAXB?
- How do you configure a JAXB Plugin?
- What is an Endpoint?
- Can you show an example endpoint written with Spring Web Services?
- What is a MessageDispatcherServlet?
- How do you configure a MessageDispatcherServlet?
- How do you generate a WSDL using Spring Web Services?
- How do you implement error handling for SOAP Web Services?
- What is a SOAP Fault?
Answers: web-services.md
- What is REST?
- What are the key concepts in designing RESTful API?
- What are the Best Practices of RESTful Services?
- Can you show the code for an example Get Resource method with Spring REST?
- What happens when we return a bean from a Request Mapping Method?
- What is GetMapping and what are the related methods available in Spring MVC?
- Can you show the code for an example Post Resource method with Spring REST?
- What is the appropriate HTTP Response Status for successful execution of a Resource Creation?
- Why do we use ResponseEntity in a RESTful Service?
- What is HATEOAS?
- Can you give an Example Response for HATEOAS?
- How do we implement it using Spring?
- How do you document RESTful web services?
- Can you give a brief idea about Swagger Documentation?
- How do you automate generation of Swagger Documentation from RESTful Web Services?
- How do you add custom information to Swagger Documentation generated from RESTful Web Services?
- What is Swagger-UI?
- What is "Representation" of a Resource?
- What is Content Negotiation?
- Which HTTP Header is used for Content Negotiation?
- How do we implement it using Spring Boot?
- How do you add XML support to your RESTful Services built with Spring Boot?
- How do you implement Exception Handling for RESTFul Web Services?
- What are the best practices related to Exception Handling with respect to RESTful Web Services?
- What are the different error status that you would return in RESTful Web Services?
- How would you implement them using Spring Boot?
- What HTTP Response Status do you return for validation errors?
- How do you handle Validation Errors with RESTful Web Services?
- Why do we need Versioning for RESTful Web Services?
- What are the versioning options that are available?
- How do you implement Versioning for RESTful Web Services?
Answers: docs/databases.md
- SQL joins and self join (with sample tables, second highest salary, find duplicates)
- Transactions and isolation levels (ACID, dirty / non-repeatable / phantom reads, MVCC)
- Optimistic vs pessimistic locking (the "last seat" story,
@Version,SELECT ... FOR UPDATE, deadlocks) - Also see: SQL vs NoSQL, Database indexes, Replication, Sharding
Answers: mongodb.md
- Does Mongodb Support Foreign Key Constraints?
- Which are the most important features of MongoDB?
- How many indexes does MongoDB create by default for a new collection?
- Explain what is MongoDB?
- What is “Namespace” in MongoDB?
- Why does Profiler use in MongoDB?
- If you remove an object attribute, is it deleted from the database?
- Does MongoDB need a lot space of Random Access Memory (RAM)?
- What is a replica set?
- What Is Replication In MongoDB?
- Compare SQL databases and MongoDB at a high level.
- What is BSON in MongoDB?
- How is data stored in MongoDB?
- Mention the command to insert a document in a database called school and collection called persons.
- What are Indexes in MongoDB?
- Can you create an index on an array field in MongoDB? If yes, what happens in this case?
- When should we embed one document within another in MongoDB?
- What do you understand by NoSQL databases? Explain.
- What is the difference between MongoDB and MySQL?
- What is the difference b/w MongoDB and CouchDB?
- Explain the structure of ObjectID in MongoDB
- What is sharding?
- What are NoSQL databases? What are the different types of NoSQL databases?
- How is MongoDB better than other SQL databases?
- What does MongoDB not being ACID compliant really mean?
- How can you achieve primary key - foreign key relationships in MongoDB?
- Does MongoDB pushes the writes to disk immediately or lazily?
- If you remove a document from database, does MongoDB remove it from disk?
- What is a covered query in MongoDB?
- How can you achieve transaction and locking in MongoDB?
- What is Aggregation in MongoDB?
- What is Sharding in MongoDB? Explain.
- Why are MongoDB data files large in size?
- Why MongoDB is not preferred over a 32-bit system?
- Mention the command to check whether you are on the master server or not.
- Can one MongoDB operation lock more than one databases? If yes, how?
- What is oplog?
- Is there an “upsert” option in the mongodb insert command?
- How to query MongoDB with “like”?
- Find objects between two dates MongoDB
- How can I combine data from multiple collections into one collection?
- When to use MongoDB or other document oriented database systems?
- How do I perform the SQL JOIN equivalent in MongoDB?
- How to query MongoDB with %like%?
- What is use of capped collection in MongoDB?
- Does MongoDB support ACID transaction management and locking functionalities?
- Should I normalize my data before storing it in MongoDB? Senior
- How replication works in MongoDB?
- What are alternatives to MongoDB?
- Where can I run MongoDB?
- How does MongoDB ensure high availability?
- Is MongoDB schema-less?
- Why is a covered query important?
- Does MongoDB provide a facility to do text searches? How?
- What happens if an index does not fit into RAM?
- Mention the command to list all the indexes on a particular collection.
- At what interval does MongoDB write updates to the disk?
- What are Primary and Secondary Replica sets?
- By default, MongoDB writes and reads data from both primary and secondary replica sets. True or False.
- How does Journaling work in MongoDB?
- How does MongoDB provide concurrency?
- How can you isolate your cursors from intervening with the write operations?
- Update MongoDB field using value of another field
- How to remove a field completely from a MongoDB document?
- When to Redis or MongoDB?
- MongoDB relationships. What to use - embed or reference?
- How to get the last N records from find?
- How to find MongoDB records where array field is not empty?
- How to check if a field contains a substring? Expert
- What's the advantage of the backup features in Ops Manager versus traditional backup strategies?
- What is a Storage Engine in MongoDB
- Which are the two storage engines used by MongoDB?
- What is splitting in mongodb?
- How to condense large volumes of data in Mongo?
- What are three primary concerns when choosing a data management system?
- How to find document with array that contains a specific value?
- Is it possible to update MongoDB field using value of another field?
- Explain what is horizontal scalability?
- What are the differences between MongoDB and MySQL?
https://www.fullstack.cafe/
http://www.globalguideline.com/interview_questions/Questions.php?sc=MongoDB
Answers: sql.md
- Define a temp table
- What is a view?
- What is PRIMARY KEY?
- What is the difference between WHERE clause and HAVING clause?
- What’s the difference between a local temp table and a global temp table?
- What is FOREIGN KEY?
- What is Normalization?
- What is DEFAULT?
- What is blocking?
- How can a column with a default value be added to an existing table?
- What is the difference between inner and outer join?
- What is the difference between JOIN and UNION?
- What is the difference between UNION and UNION ALL?
- How to select first 5 records from a table?
- Describe the difference between truncate and delete
- What are the difference between clustered and a non-clustered index?
- What are the advantages of using Stored Procedures?
- What is Denormalization?
- Define ACID Properties
- What is a cursor how does it work?
- What is collation?
- What are row constructors?
- Is table size reduced, when you delete data from the table?
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- How do I UPDATE from a SELECT in SQL Server?
- How a database index can help performance?
- How does a hash table index work?
- Finding duplicate values in a SQL table
- How do I perform an IF…THEN in an SQL SELECT?
- Discuss INNER JOIN ON vs WHERE clause
- Explain Function vs. Stored Procedure in SQL Server
- What is the difference among UNION, MINUS and INTERSECT?
- How can we transpose a table using SQL (changing rows to column or vice-versa) ?
- How to generate row number in SQL Without ROWNUM
- What's the difference between a primary key and a unique key?
- Name types of Triggers
- What is a linked server?
- Explain a usage difference between user defined functions and stored procedures
- How does truncate and delete operation effect Identity?
- Explain the difference between exclusive lock and update lock
- What are DMV's and DMF's?
- What are statistics?
- How deadlock is resolved?
- What is a filegroup?
- What would happen without an index?
- How does B-trees index work?
- What is the cost of having a database index?
- Delete duplicate values in a SQL table
- How can I do an UPDATE statement with JOIN in SQL?
- How does primary key constraint and unique key constraint effect null?
- What is Optimistic Locking and Pessimistic locking?
- How does database indexing work?
- Name some disadvantages of a hash index
- What are some other types of indexes?
- Insert results of a stored procedure into a temporary table
- Select first row in each GROUP BY group (greatest-n-per-group problem)?
Answers: docs/microservices.md
| Group | Patterns |
|---|---|
| Breaking the system into services | Monolith vs microservices · Split by business area (DDD) · Strangler fig (replace old system piece by piece) · Anti-corruption layer |
| Data | Database per service · Saga · Transactional outbox · CQRS · Event sourcing · CDC (Debezium) · API composition |
| Talking between services | Sync vs async · Idempotency · Pub/sub · Dead-letter queue |
| Front door | API gateway and BFF · Service discovery · Service mesh / sidecar |
| Staying alive when things fail | Timeouts · Retry with backoff and jitter · Circuit breaker · Bulkhead · Rate limiting · Fallback · Load shedding |
| Seeing what is happening | Logs · Metrics · Distributed tracing (OpenTelemetry) · Health checks · Correlation IDs |
| Releasing safely | Blue-green · Canary · Rolling · Feature flags · 12-factor app |
| Security | OAuth2 / OIDC · JWT · mTLS between services · Secrets management |
| Testing | Contract testing (Pact, Spring Cloud Contract) · Testcontainers |
| Mistakes to avoid | Distributed monolith · Shared database · Chatty services · Too-small services |
Linked items have full answers. The rest are added following the 2-month plan.
Note on the old Netflix stack: Zuul, Hystrix and Ribbon are retired. Today we use Spring Cloud Gateway, Resilience4j and Spring Cloud LoadBalancer. See API gateway and BFF.
Answers: microservices.md
- Why Would You Opt For Microservices Architecture?
- List down the advantages of Microservices Architecture
- Define Microservice Architecture
- What Are The Fundamentals Of Microservices Design?
- What are the features of Microservices?
- How does Microservice Architecture work?
- What is the difference between Monolithic, SOA and Microservices Architecture?
- What are the challenges you face while working Microservice Architectures?
- How can we perform Cross-Functional testing?
- What are main differences between Microservices and Monolithic Architecture?
- What are the standard patterns of orchestrating microservices?
- What are smart endpoints and dumb pipes?
- What is the difference between a proxy server and a reverse proxy server?
- Whether do you find GraphQL the right fit for designing microservice architecture?
- What is Idempotence?
- What are the pros and cons of Microservice Architecture?
- What do you understand by Distributed Transaction?
- What do you understand by Contract Testing?
- What is the role of an architect in Microservices architecture?
- Can we create State Machines out of Microservices?
- Explain what is the API Gateway pattern
- Mention some benefits and drawbacks of an API Gateway
- What is Materialized View pattern and when will you use it?
- How should the various services share a common DB Schema and code?
- What Did The Law Stated By Melvin Conway Implied?
- Name the main differences between SOA and Microservices?
- What is the difference between cohesion and coupling?
- What is a Consumer-Driven Contract (CDC)?
- What are Reactive Extensions in Microservices?
- What is the most accepted transaction strategy for microservices
- What does it mean that shifting to microservices creates a run-time problem?
- Why would one use sagas over 2PC and vice versa?
- Provide an example of "smart pipes" and "dumb endpoint"
- How would you implement SSO for Microservice Architecture?
- Microservices Design Pattern (Saga Pattern) Good Reads
Answers: docs/kafka.md
- Kafka basics in simple words (topic, partition, offset, broker, KRaft)
- Partitions and consumer groups (how many partitions, rebalancing, consumer crash)
- Message ordering
- Delivery guarantees (at-most-once, at-least-once, exactly-once)
- Handling duplicate events (idempotent consumer, retry topics, DLQ)
More questions to practice:
Topics
- Architecture
- Workflow
- Cluster
- Producer
- Consumer
- Broker
- Queuing
- Client
- Connect
- Docker
- Monitoring Tools
- Role of Zookeeper
- Streams
- Spark Streaming
- Performance Tuning
- Load Testing
- Storm Kafka Integration
- Security Tutorials
Interview Questions
- Q.1 What is Apache Kafka?
- Q.2 Enlist the several components in Kafka.
- Q.3 Explain the role of the offset.
- Q.4 What is a Consumer Group?
- Q.5 What is the role of the ZooKeeper in Kafka?
- Q.6 Is it possible to use Kafka without ZooKeeper?
- Q.7 What do you know about Partition in Kafka?
- Q.8 Why is Kafka technology significant to use?
- Q.9 What are main APIs of Kafka?
- Q.10 What are consumers or users?
- Q.11 Explain the concept of Leader and Follower.
- Q.12 What ensures load balancing of the server in Kafka?
- Q.13 What roles do Replicas and the ISR play?
- Q.14 Why are Replications critical in Kafka?
- Q.15 If a Replica stays out of the ISR for a long time, what does it signify?
- Q.16 What is the process for starting a Kafka server?
- Q.17 In the Producer, when does QueueFullException occur?
- Q.18 Explain the role of the Kafka Producer API.
- Q.19 What is the main difference between Kafka and Flume?
- Q.20 Is Apache Kafka is a distributed streaming platform? if yes, what you can do with it?
- Q. 21 What can you do with Kafka?
- Q.22 What is the purpose of retention period in Kafka cluster?
- Q.23 Explain the maximum size of a message that can be received by the Kafka?
- Q.24 What are the types of traditional method of message transfer?
- Q.25 What does ISR stand in Kafka environment?
- Q.26 What is Geo-Replication in Kafka?
- Q.27 Explain Multi-tenancy?
- Q.28 What is the role of Consumer API?
- Q.29 Explain the role of Streams API?
- Q.30 What is the role of Connector API?
- Q.31 Explain Producer?
- Q.32 Compare: RabbitMQ vs Apache Kafka
- Q.33 Compare: Traditional queuing systems vs Apache Kafka
- Q.34 Why Should we use Apache Kafka Cluster?
- Q.35 Explain the term “Log Anatomy”.
- Q.36 What is Data Log in Kafka?
- Q.37 Explain how to Tune Kafka for Optimal Performance.
- Q.38 State Disadvantages of Apache Kafka.
- Q.39 Enlist all Apache Kafka Operations.
- Q.40 Explain Apache Kafka Use Cases?
- Q.41 Some of the most notable applications of Kafka.
- Q.42 Features of Kafka Stream.
- Q.43 What do you mean by Stream Processing in Kafka?
- Q.44 What are the types of System tools?
- Q.45 What are Replication Tool and its types?
- Q.46 What is Importance of Java in Apache Kafka?
- Q.47 State one best feature of Kafka.
- Q.48 Explain the term “Topic Replication Factor”.
- Q.49 Explain some Kafka Streams real-time Use Cases.
- Q.50 What are Guarantees provided by Kafka?
https://gist.github.com/bansalankit92/9414ef3614229cdca6053464fedf5038
Questions generated with markdown-toc
Answers: docker-kubernetes.md
Tutorials
Interview Questions and Answers
- What is Hypervisor?
- What is virtualization?
- What is containerization?
- Difference between virtualization and containerization
- What is Docker?
- What is a Docker Container?
- What are Docker Images?
- What is Docker Hub?
- Explain Docker Architecture?
- What is a Dockerfile?
- Tell us something about Docker Compose.
- What is Docker Swarm?
- What is a Docker Namespace?
- What is the lifecycle of a Docker Container?
- What is Docker Machine?
- Tell some important Docker commands?
- Suppose you have 3 containers running and out of these, you wish to access one of them. How do you access a running container?
- Will you lose your data, when a docker container exits?
- Where all do you think Docker is being used?
- How is Docker different from other containerization methods?
- Can I use JSON instead of YAML for my compose file in Docker?
- How have you used Docker in your previous position?
- How far do Docker containers scale? Are there any requirements for the same?
- What platforms does docker run on?
- Is there a way to identify the status of a Docker container?
- Can you remove a paused container from Docker?
- Can a container restart by itself?
- Is it better to directly remove the container using the rm command or stop the container followed by remove container?
- Will cloud overtake the use of Containerization?
- How many containers can run per host?
- Is it a good practice to run stateful applications on Docker? or What type of applications - Stateless or Stateful are more suitable for Docker Container?
- Suppose you have an application that has many dependant services. Will docker compose wait for the current container to be ready to move to the running of the next service?
- How will you monitor Docker in production?
- Is it a good practice to run Docker compose in production?
- What changes are expected in your docker compose file while moving it to production?
- Have you used Kubernetes? If you have, which one would you prefer amongst Docker and Kubernetes?
- Are you aware of load balancing across containers and hosts? How does it work?
- What is a Docker Registry?
- How to build envrionment-agnostic systems with Docker?
- When would you use ‘docker kill’ or ‘docker rm -f’?
- How to link containers?
- What is the difference between the
COPYandADDcommands in a Dockerfile? - What is the difference between CMD and ENTRYPOINT in a Dockerfile?
- How do I transfer a Docker image from one machine to another one without using a repository, no matter private or public?
- Do I lose my data when the Docker container exits?
- What is Build Cache in Docker?
- What is the difference between ‘docker run’ and ‘docker create’?
- What’s the difference between a repository and a registry?
- What is the default CPU limit set for a container?
- Can you create containers without their own PID namespace
- Explain basic Docker usage workflow?
- What is the difference between Docker Image and Layer?
- Could you explain what is Emulation?
- Should I use Vagrant or Docker for creating an isolated environment?
- What is the difference between “expose” and “publish” in Docker?
- Docker Compose vs. Dockerfile - which is better?
- What exactly do you mean by “Dockerized node”? Can this node be on-premises or in the cloud?
- How can we control the startup order of services in Docker compose?
- How will you monitor Docker in production?
- What happens if you add more than one CMD instruction to a Dockerfile?
- When you limit the memory for a container, does it reserve (guarantee) the memory?
- What is an orphant volume and how to remove it?
- How virtualization works at low level?
- What is Paravirtualization?
- How is Docker different from a virtual machine?
- Is it possible to generate a Dockerfile from an image?
- Can you explain dockerfile ONBUILD instruction?
- Why did Docker jump from version 1.13 to 17.03?
- How does Docker run containers in non-Linux systems?
- How containers works at low level?
- Name some limitations of containers vs VM
- How to use Docker with multiple environments?
- Why Docker compose does not wait for a container to be ready before moving on to start next service in dependency order?
Docker questions link generated with markdown-toc
References:
https://www.edureka.co/blog/interview-questions/docker-interview-questions/
https://www.educba.com/docker-interview-questions/
https://www.fullstack.cafe/
Answers: docker-kubernetes.md
- Architecture
- Containers - Images
- Jobs
- Labels & Selectors
- Namespace
- Nodes
- Service
- Workloads - Pods
- Replication Controller
- Ingress
- Replica Sets
- Deployments
- Volumes Snapshots
- Configurations
- Secrets
- Network Policy
- Secret
- Scheduling
- Cluster Administration
- Extension
Interview Questions
https://www.edureka.co/blog/interview-questions/kubernetes-interview-questions/
https://www.algrim.co/posts/145-kubernetes-interview-questions#q-1
Answers: redis.md
Topics
- Configuration
- Data types
- Key-Value Pair Commands
- SCAN & MATCH
- Client & Config Commands
- Keys
- Strings
- Hashes
- Lists
- Sets
- Sorted Sets
- HyperLogLog
- Publish Subscribe
- Transactions
- Scripting
- Connections
- Server
- Backup
- Security
- Pipelining
- Partitioning
- Data Persistence
- Redis Cluster
Interview Questions
- What Is Redis?
- What Is Main Feature Of Redis?
- What Is Limitations Of Redis?
- What Is Advantages Of Using Redis?
- List The Data Structures Supported By Redis?
- List Out The Operation Keys Of Redis?
- What Is Redis-cli?
- Explain Repl?
- What The Basic Features Are Of Redis Which Makes It Awesome Compared To Memcache?
- We All Know That Reds Is Fast, But Is It Also Durable?
- What Are The Main Features Of Redis?
- What Are The Things You Must Have To Take Care While Using Redis?
- What Is The Difference Between Overriding A Value By Using Set Vs Append?
- What Do You Mean By Data Modeling In Redis?
- Why Redis Is Different As Compared To Other Key-value Stores?
- How Do I Move A Redis Database From One Server To Another?
- How to start stop restart Redis?
- How To Get All Keys From Redis?
- How To Get Array Data From Redis?
- How To Set Multiple Values (array) In Redis?
- How To Get Set Value From Redis?
- How To Check Redis Is Running?
- How To Remove All Database?
- How To Delete Current Database?
- What Do You Mean By "redis Is Binary Safe"?
- How Does Redis Differ From Mongodb? Is There A Use Case When For Redis If Using Mongodb?
- How to persist or take snapshot of Redis data?
- Explain Redis use cases
- How we will use redis to oauth token and authentication
- Explain some important redis commands
- Explain sharding and partitioning in redis
- Can we use Redis for pub sub messaging
- How to secure redis
- Explain Pipelining in Redis
- Can we add or write scripts in redis
- How we maintain transactions in Redis
- Can we use redis as primary database
- Can we save blob data in redis
- What is maximun allowed key size. Expert
- How can we create auto expire keys and explain it?
- Explain some blocking operations on list
- How Automatic creation and removal of keys happens?
- Can we create Lexicographical scores?
- Explain HyperLogLogs
- Can we iterate the key space of a large collection incrementally?
- How can we insert huge data at once (pre-existing data)
- Explain Some Tricks for ram/memory optimization
- How can we use Redis as LRU cache
- How can we use Redis in distributed systems
- How can we create secondary indexes with redis
https://redis.io/documentation
https://redis.io/topics/data-types-intro
Answers: redis.md
- Redis pub-sub is mostly like a fire and forget system where all the messages you produced will be delivered to all the consumers at once and the data is kept no where. You have limitation in memory with respect to redis. Also number of producers and consumers can affect the performance in Redis.
- Kafka on other hand is a high throughput, distributed log that can be used like a queue. Here any number of users can produce and consumers can consume at any time they want. It also provides persistence for the messages sent through the queue.
- One main difference is that Redis Pub/Sub is push based while Kafka Pub/Sub is pull based. That means messages published to Redis will be automatically delivered to subscribers instantly, while in Kafka Data/messages are never pushed out to consumers, the consumer will ask for messages when the consumer is ready to handle the message. Use Redis
- If you want fire and forget kind of system, where all the messages that you produce are delivered instantly to consumers.
- If speed is most concerned.
- If you can live up with data loss.
- If you don't want your system to hold the message that has been sent.
- Amount of data that is gonna be dealt is not huge. Use kafka
- If you want reliability.
- If you want your system to have a copy of messages that has been sent even after consumption.
- If you can't live up with data loss.
- If Speed is not a big concern.
- If data size is huge
https://stackoverflow.com/a/37993809/4428927
Answers: microservices.md
Akka is a open-source library or a toolkit written in Scala to create concurrent, distributed and fault-tolerant application.
Tutorials
- Akka Actor
- Akka ActorSystem
- Akka Props
- Akka Child Actor
- Akka Actor Lifecycle
- Actor Send, Reply, Forward Messages
- Actors
- Akka Dispatchers
- Akka Routers
- Akka HTTP
- Akka FSM
- Akka TestKit Experts
- Fault tolerance
- Routing
- Dispatching
- Persistence
- Streams
- Clusters
- Network
- Discovery
- Co-ordination
https://doc.akka.io/docs/akka/current/general/index.html
Senior backend interviews now often ask how you would build with LLMs. Start with the basics, then RAG.
| Topic | What's inside |
|---|---|
| AI and LLM basics | How LLMs work, prompting, structured output, tool calling, agents, MCP, guardrails, evals, cost and latency, an LLM gateway design, Spring AI |
| RAG | Chunking, embeddings, vector databases, hybrid search, reranking, citations, evaluation, "design a chatbot over company docs" |
| Inference, fine-tuning and local models | Prompt vs RAG vs fine-tune, GPU memory math, quantization, Ollama / llama.cpp / vLLM, LoRA on your own docs, running it locally |
| AI projects end to end | OCR (English + Hindi), an astrology chart explainer, a granth assistant that answers only from one scripture |
| Coding with AI assistants | The workflow that works, giving context, reviewing AI code, security, how to talk about AI in interviews |
| Topic | What's inside |
|---|---|
| Production-ready apps (backend + frontend) | Logs, metrics, traces, OpenTelemetry, ELK / Loki / Grafana, APM (New Relic, Datadog…), frontend monitoring, analytics, SLOs and alerts, 7 incident debugging walkthroughs, safe deploys, a go-live checklist |
| Docker and Kubernetes | Images, Dockerfiles for Spring and Node, JVM in containers, pods, services, probes, autoscaling, GitOps, a troubleshooting runbook |
| Cloud: AWS, GCP, Azure | One table of service names on all 3 clouds, compute choices, VPC, IAM, databases, messaging, DR, cost |
| Debugging Spring Boot from the inside | Reading startup errors, conditions report, Actuator, breakpoints inside Spring, debugging security, transactions and slow apps |
At the end they ask: "Do you have any questions for us?" Always ask 2 or 3. Saying "No, I am good" sounds like you are not interested.
Story: Buying a house, you don't only answer the seller's questions. You also ask: "Does the roof leak? How are the neighbours?" Good questions show you are serious, and the answers tell you if you want to live there.
| # | Question | Ask whom | Why it works |
|---|---|---|---|
| 1 | "What would a great first 90 days look like for this role?" | Hiring manager | Shows you think about results. You learn what they really expect. |
| 2 | "What is the team's biggest challenge right now, and how would this role help?" | Anyone | You learn the real problem. You can link it to your own experience in one line. |
| 3 | "How does code go from a laptop to production here? How often do you deploy?" | Engineer | Shows a senior, production mindset. Tells you about CI/CD, tests and on-call. |
| 4 | "Tell me about a recent incident or outage. What changed after it?" | Engineer / manager | Shows you care about reliability. Blameless answers mean a healthy team. |
| 5 | "How are technical decisions made? For example, picking a new database or library." | Senior engineer | Shows you want to own design. You learn if there are design docs, RFCs or one boss. |
| 6 | "How do you balance new features with tech debt and maintenance?" | Manager | Tells you if the code is a mess and if anyone gives time to fix it. |
| 7 | "What does success look like in this role after one year? How is performance measured?" | Hiring manager | Clear goals = fair reviews. Vague answer = warning sign. |
| 8 | "What is the team size and mix? Who would I work with most closely?" | Manager | You learn about seniors, juniors, product and QA around you. |
| 9 | "How is the team using AI coding tools today?" | Engineer | Modern and practical. Shows you keep up, without saying "AI" ten times. |
| 10 | "Is there anything in my background that makes you unsure I fit? I'd like to answer it now." | Last round / manager | Brave and senior. You get a chance to fix a doubt before they decide. |
Say this in the interview:
"Yes, I have a couple. What would a great first 90 days look like for this role? And what is the team's biggest challenge right now?"
Tips:
- Ask about work, team and impact in technical rounds. Keep salary, leave and notice period for HR.
- Listen, then connect: "Interesting. At my last job we had the same problem with slow deploys. I fixed it by..." (one line only).
- Don't ask what you can find on their website ("What does your company do?").
- Write your 3 questions before the call. Change one based on what you heard in the interview.
More questions (older list)
- What is the most important/valuable thing you have learnt from working here?
- How do your clients and customers define success?
- What would you change around here if you could?
- How do you evaluate new technologies? Who makes the final decisions?
- How do you know what to work on each day?
- Do you tend to roll your own solutions more often or rely on third party tools? What's the rationale in a specific case?
- How do you measure individual performance?
- What does a typical day look like for you?
- What do you think the company can improve at?
- What is your policy on working from home/remotely?
- What are the engineering challenges that the company/team is facing?
- What is the most fulfilling/exciting/technically complex project that you've worked on here so far?
- What is your stack? What is the rationale for/story behind this specific stack?
- What do you measure? What are your most important product metrics?
- What does the company do to nurture and train its employees?
- If you hire person, what do you have for him to study product you're working on and processes in general? Do you have specifications, requirements, documentation?
- Tell me about the main products of your company.
- How do you train/ramp up engineers who are new to the team?
- What are some weaknesses of the organization?
- Why did you choose to come to this company?
- What is the most frustrating part about working here?
- How does the engineering team balance resources between feature requests and engineering maintenance?
- What makes your product competitive?
- Is the team growing, and what sort of opportunities will there be in the next year/3 years?
- What is your team's biggest challenge right now?
- What is the current team composition like?
- Why have the last few people left?
- How are you funded?
- What is unique about working at this company that you have not experienced elsewhere?
- When was the last time you interacted with a founder? What was it regarding? Generally how involved are the founders in the day-to-day?
- What has been the worst technical blunder that has happened in the recent past? How did you guys deal with it? What changes were implemented afterwards to make sure it didn't happen again?
- What is the most costly technical decision made early on that the company is living with now?
- How much time do you spend on new project development versus maintenance?
- What are your highest priorities right now? For example, new features, new products, solidifying existing code, reducing operations overhead?
- Does the company culture encourage entrepreneurship? Could you give me any specific examples?
- What would I work on if I joined this team and who would I work most closely with?
- Are you profitable? If no, what's your plan for becoming profitable?
- How long does the average engineer stay at the company?
For contributing go through this article on First Time Contributions