Skip to content

Full Stack Developer interview questions

100 real questions with model answers and explanations for Senior candidates.

See a Full Stack Developer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Listen to the interview

Play it like a podcast: question and model answer, one after another.

Questions

sqlnosqltypescript

Define one generic interface and back it with backend-specific implementations behind dependency inversion.

  • Declare a base Repository<T, ID> with findById, save, delete, and findMany.
  • Add concrete SqlRepository<T> and NoSqlRepository<T> that satisfy the contract.
  • Constrain ID to string | number via a second generic, per backend.
  • Inject the implementation so callers depend on the interface, not storage.
  • Swap backends in tests or migrations without touching business logic.

Why interviewers ask this: Tests whether the candidate understands how to separate interface from implementation and apply generics for real-world abstraction, not just textbook examples.

reactconcurrency

Concurrent rendering lets React interrupt and resume work so urgent input stays responsive.

  • startTransition wraps a non-urgent state update so React can interrupt it.
  • useDeferredValue wraps a value, rendering with the old one until capacity frees up.
  • Use startTransition when you own the state setter.
  • Use useDeferredValue when the value comes from a prop or context.

Why interviewers ask this: Distinguishes candidates who understand React scheduling primitives from those who have only memorized API names.

event-loop

Measure first, then move blocking work off the event loop.

  • Read event loop delay via perf_hooks.monitorEventLoopDelay, clinic.js, or 0x.
  • Look for synchronous JSON of large payloads, sync fs calls, or tight loops.
  • Move CPU-heavy work to worker threads and batch synchronous operations.
  • Use setImmediate to yield between large iterations.
  • Add distributed tracing spans to tie lag to specific request types under load.

Why interviewers ask this: Senior engineers must be able to instrument and diagnose production latency regressions, not just identify theoretical causes.

design

Split the design into fast distributed writes and CDN-served reads.

  • Generate IDs with Snowflake or a pre-allocated counter range, then base62-encode to a slug.
  • Store slug-to-URL mappings in DynamoDB or Redis Cluster with a long TTL.
  • Front reads with CloudFront or Cloudflare Workers so most redirects skip the origin.
  • Use consistent hashing across shards to spread write load.
  • Add a Bloom filter to reject invalid slugs before touching the database.

Why interviewers ask this: Tests ability to reason about read-write ratio asymmetry, caching layers, and distributed ID generation under high scale.

indexespostgres

Match the index to how the query filters: a subset of rows versus multiple columns.

  • Use a partial index when a query always filters a high-selectivity subset, like status = 'pending'.
  • Use a composite index when queries filter or sort on several columns together.
  • Combine them as a partial composite index when both conditions hold.
  • Check pg_stat_user_indexes to confirm use, since unused indexes slow writes.

Why interviewers ask this: Reveals whether the candidate can reason about index trade-offs rather than applying a one-size-fits-all approach.

componentsnextjscaching

App Router renders on the server by default and layers caching across request, route, and data.

  • Components are server components by default, sending HTML without their JS in the bundle.
  • Suspense boundaries stream the shell first and flush each section as data resolves.
  • Caching spans request-level fetch dedup, the full route cache, and the data cache.
  • Bust caches with revalidatePath or revalidateTag, or fetch with cache: 'no-store'.

Why interviewers ask this: Tests deep familiarity with the App Router mental model versus legacy Pages Router assumptions.

gatewayapi

A BFF shapes data for one client; a gateway handles cross-cutting concerns for everyone.

  • A BFF is owned by the frontend team and tailors the contract to one UI surface.
  • An API gateway centralizes auth, rate limiting, routing, and protocol translation.
  • The BFF adds a service per client type but gives the frontend autonomy.
  • The gateway is one chokepoint, simpler to run but prone to mixed concerns and slower contract changes.

Why interviewers ask this: Evaluates whether the candidate understands organizational trade-offs, not just technical ones.

queriesn+1api

Batch resolver calls with DataLoader and cap query cost before execution.

  • Use DataLoader to batch field-level calls per request tick and dedupe by key.
  • Create DataLoader instances per request to avoid cross-user data leakage.
  • Add query complexity analysis that costs each field and rejects queries over a threshold.
  • Cache server-side on the normalized query AST to skip redundant database hits.

Why interviewers ask this: Confirms the candidate knows both the batching solution and the additional constraints needed to make GraphQL safe at scale.

redisrate-limitingdistributed

Use a Redis sliding window counter driven by an atomic Lua script.

  • Store a per-user hash keyed by time window and increment it in a Lua script.
  • Lua runs atomically on one shard, avoiding races without external locks.
  • Bucket keys by time and use EXPIRE so Redis garbage-collects old windows.
  • Add a local in-memory layer to absorb bursts before hitting Redis.

Why interviewers ask this: Tests understanding of atomicity requirements in distributed systems and practical Redis scripting.

kubernetescontainers

Set requests to the baseline and limits to the safe maximum, then calibrate under load.

  • Requests reflect typical consumption so the scheduler places pods accurately.
  • Limits cap usage before Kubernetes intervenes.
  • A too-low memory limit triggers the OOMKiller and cascading restarts.
  • A too-low CPU limit throttles Node.js silently, raising event loop latency.
  • Profile under realistic load and set memory slightly above the peak to absorb GC spikes.

Why interviewers ask this: Confirms the candidate understands that misconfigured limits cause subtle production failures, not just obvious crashes.

dockercaching

Prefer COPY for plain transfers and order layers so dependencies cache separately from code.

  • COPY only moves files from the build context into the image.
  • ADD also unpacks tar archives and fetches URLs, which makes it less predictable.
  • Docker caches each layer by instruction and inputs; one invalidation rebuilds all that follow.
  • Copy package.json and lock files, run npm install, then copy source so code changes keep the deps layer.

Why interviewers ask this: Tests practical Docker knowledge that directly affects CI build times in production pipelines.

restconcurrency

Lambda fits light bursts; Fargate fits heavy or long jobs, so combine them.

  • Lambda caps at 15 minutes, 10 GB ephemeral storage, and 3 GB memory.
  • Cold starts add 500ms to 2s, unacceptable for synchronous user requests.
  • Fargate runs persistent containers with no timeout and no cold starts.
  • Expose the API on Fargate for light sync work and offload large transforms to Lambda via SQS.

Why interviewers ask this: Tests ability to apply platform constraints to real scenarios rather than listing features abstractly.

terraform

Detect the drift with a plan, then either import or revert, and lock down future changes.

  • Run terraform plan to compare the state file against real infrastructure.
  • Keep a manual change by importing the resource with terraform import.
  • Revert an unwanted change by applying the declared configuration.
  • Enforce plans through CI/CD and detect out-of-band changes with AWS Config.
  • Lock state via S3 and DynamoDB to block concurrent applies.

Why interviewers ask this: Reveals whether the candidate treats infrastructure as code with discipline or treats Terraform as an optional wrapper around console clicks.

concurrency

Goroutines are cheap because of tiny growable stacks and M:N scheduling, but they leak if never cancelled.

  • They start with a few kilobytes of stack that grows, versus megabytes for OS threads.
  • The runtime multiplexes thousands of goroutines onto few threads via the M:N scheduler.
  • Leaks happen when a goroutine blocks forever on an unclosed channel or uncancelled context.
  • Pair every launch with cancellation, propagate context.Context, and run goleak in tests.

Why interviewers ask this: Tests understanding of Go's concurrency model and the operational discipline needed to avoid memory growth in long-running services.

Tell a specific story where you offered an alternative instead of a flat no.

  • Pick a case where the feature had hidden complexity, like missing infra or migration risk.
  • Show you prepared a concrete alternative with a cost-benefit analysis.
  • Describe presenting it to PM and design and negotiating a phased approach.
  • Close with the outcome and what you learned about explaining constraints to non-technical stakeholders.

Why interviewers ask this: Tests whether the candidate can protect engineering quality without becoming an obstacle, which is a core senior responsibility.

sqlqueriesinjection

Parameterize everything and validate input at the boundary.

  • Use parameterized queries or prepared statements instead of concatenating input.
  • With a builder like Knex, use its parameter binding and never interpolate manually.
  • Avoid exec and eval; use child_process.execFile with an explicit argument array.
  • Validate requests with Zod or Joi so malformed input is rejected early.

Why interviewers ask this: Tests that the candidate knows both the mechanism of these vulnerabilities and the correct library-level mitigations.

event-sourcing

Event sourcing keeps the full event history and derives state by replaying it.

  • It stores immutable events instead of overwriting current state, rebuilt from a snapshot or the start.
  • You gain a full audit trail, replayable history, and natural event-driven support.
  • It fits audit compliance, multiple read projections, and temporal 'state on date X' queries.
  • It adds snapshot and schema-evolution complexity, so it is overkill for simple CRUD.

Why interviewers ask this: Tests whether the candidate can weigh the real operational cost of event sourcing against the scenarios that actually justify it.

system-designdistributedqueues

Layer the tests and verify idempotency, since exactly-once delivery is not guaranteed.

  • Unit-test individual handlers with a mocked queue client.
  • Contract-test producer and consumer against a shared schema registry.
  • End-to-end test against an emulator like LocalStack for SQS or Testcontainers for Kafka.
  • Add idempotency tests for repeated delivery and trace IDs so CI failures are diagnosable.

Why interviewers ask this: Confirms the candidate understands the multi-layer testing strategy specific to async distributed systems, not just synchronous API testing.

schemagraphql

Federation lets each service own part of one graph; a gateway composes them at query time.

  • Each subgraph defines its slice and the gateway resolves cross-service entities via @key.
  • Schema stitching couples the gateway to service schemas and resolver logic.
  • Federation keeps composition rules in each service, so services deploy independently.
  • The main challenge is automating supergraph rebuilds via a registry like Apollo Studio.

Why interviewers ask this: Tests whether the candidate understands the ownership and deployment model behind federation, not just the API surface.

postgres

Lower the per-table scale factor so vacuum runs often instead of after massive bloat.

  • Autovacuum fires when dead tuples exceed the threshold plus scale_factor times row count.
  • The default 0.2 scale factor waits until 20% of the table is dead, causing bloat and contention.
  • Override per table with autovacuum_vacuum_scale_factor = 0.01 and autovacuum_vacuum_cost_delay = 2ms.
  • Monitor n_dead_tup and last_autovacuum to confirm vacuum keeps pace with writes.

Why interviewers ask this: Tests real operational PostgreSQL knowledge that matters for high-throughput tables rather than default-configuration assumptions.

Locked questions

  • 21

    Describe how React's reconciliation algorithm (Fiber) decides which components to re-render.

    reactcomponentsalgorithms
  • 22

    How does Next.js implement incremental static regeneration, and when would you use it over server-side rendering?

    ssrnextjs
  • 23

    What is backpressure in Node.js streams and how do you handle it correctly?

    soft-skillsbackpressure
  • 24

    How do you set up a code review process that improves junior developer skills without slowing down delivery?

    code-reviewconcurrency
  • 25

    How do you handle cache invalidation in a multi-service architecture where the same data is cached in multiple places?

    soft-skillsarchitecturecaching
  • 26

    Explain the saga pattern for managing distributed transactions. What are compensating transactions?

    sagadistributedtransactions
  • 27

    How do you use conditional types and infer to extract the return type of an async function at the type level?

    async
  • 28

    How do you profile a memory leak in a long-running Node.js process in production?

    memoryconcurrency
  • 29

    How does AWS Aurora differ from RDS PostgreSQL in terms of replication, failover, and cost?

    postgresreplication
  • 30

    Design a real-time notification system for 10 million concurrent users.

    system-designdesignconcurrency
  • 31

    What are the benefits of gRPC over REST for internal service-to-service communication?

    restgrpc
  • 32

    How does Vue 3's reactivity system differ from Vue 2's, and what are the implications for performance?

    reactsystem-designperformance
  • 33

    How do you handle disagreement with a senior architect on a technical direction when you have strong evidence against their proposal?

    soft-skillsconflict
  • 34

    Explain CSRF, how modern SPAs are vulnerable, and what mitigations you would apply.

    csrfvulnerabilities
  • 35

    How would you implement row-level security in PostgreSQL for a multi-tenant SaaS application?

    postgresmulti-tenancy
  • 36

    When would you choose a monorepo over a polyrepo, and what tooling decisions follow from that choice?

    monorepo
  • 37

    How do you implement a zero-downtime rolling deployment in Kubernetes? What can go wrong?

    kubernetesdeployment
  • 38

    How do you architect a micro-frontend system using module federation? What are the shared dependency pitfalls?

    system-designmicro-frontendsfederation
  • 39

    How does the Node.js cluster module work, and how does it compare to using a load balancer in front of multiple instances?

    load-balancing
  • 40

    What are the trade-offs between embedding documents and referencing them in MongoDB for a social media post schema?

    mongodbschema
  • 41

    How do you identify and eliminate Core Web Vitals regressions before they reach production?

    web-vitals
  • 42

    How do you write integration tests for an API endpoint that depends on a third-party payment gateway?

    integrationendpointsapi
  • 43

    How do Go interfaces differ from TypeScript interfaces, and how does this affect how you design shared abstractions?

    typescripttypesdesign
  • 44

    Describe the strangler fig pattern and how you would apply it to migrate a monolith to microservices.

    microservicesmonolithmigration
  • 45

    How would you design an Elasticsearch index for a product search with multi-language support and faceted filtering?

    indexessearchdesign
  • 46

    How do you model a one-to-many relationship in DynamoDB using single-table design?

    dynamodbdesign
  • 47

    Walk me through how you write an RFC to propose a significant architectural change. What sections matter most?

    decision-makingarchitecture
  • 48

    How do you handle authentication in Next.js App Router with middleware, and what are the edge runtime constraints?

    middlewareauthnextjs
  • 49

    How does CloudFront cache invalidation work, and when should you use ETags versus TTL-based expiry?

    caching
  • 50

    How do you use discriminated unions to model API response states in a type-safe way?

    api
  • 51

    Describe how you have established or improved engineering standards across a team, including how you got buy-in.

  • 52

    What is CQRS and when does separating read and write models provide real benefit versus adding unnecessary complexity?

    cqrsalgorithms
  • 53

    How do you implement graceful shutdown for a Node.js HTTP server under Kubernetes with active connections?

    lifecyclehttpkubernetes
  • 54

    Walk through how you would design a leaderboard system that updates in real time using Redis sorted sets.

    system-designdesignredis
  • 55

    How do you decide when a shared library should become an internal service?

  • 56

    What are the trade-offs between server components and client components in Next.js, and how do you decide which to use for a given feature?

    componentsnextjs
  • 57

    How does Go's context package work for cancellation and timeout propagation across goroutines and HTTP calls?

    httpconcurrency
  • 58

    Explain the difference between a Kubernetes Deployment, StatefulSet, and DaemonSet. When do you use each?

    kubernetesdeployment
  • 59

    How do you handle secrets management in a containerized environment? Compare Vault, AWS Secrets Manager, and Kubernetes Secrets.

    kubernetescontainerssecrets
  • 60

    How do you use PostgreSQL EXPLAIN ANALYZE to diagnose a slow query, and what are the most common root causes?

    queriespostgres
  • 61

    How do you implement cursor-based pagination in GraphQL, and why is it preferable to offset pagination at scale?

    graphqlpagination
  • 62

    How do you approach contract testing between microservices, and which tools support this pattern?

    contractmicroservices
  • 63

    Explain the circuit breaker pattern and how you would implement it in a Node.js service calling external APIs.

    resilienceapi
  • 64

    How do you use HTTP/2 and caching headers together to minimize client round trips for a web application?

    cachinghttp
  • 65

    How do you structure Terraform modules for a multi-environment deployment with per-environment variable overrides?

    terraformdeploymentconfig
  • 66

    How would you implement a plugin system in a Vue 3 application that allows third-party teams to add features without touching the core?

    system-design
  • 67

    How does AWS SQS differ from SNS, and when would you combine them in a fan-out pattern?

    fan-out
  • 68

    How do you balance technical debt reduction against new feature delivery when you have stakeholder pressure from both sides?

    tech-debtcommunication
  • 69

    How does the Elasticsearch inverted index work, and what are the performance implications of high-cardinality fields?

    indexessearchperformance
  • 70

    What is the actor model, and when would you use it instead of traditional request-response in a backend service?

    actor-model
  • 71

    How do you prevent unnecessary context re-renders when a context value holds a large object?

  • 72

    What is the difference between process.nextTick, setImmediate, and setTimeout(fn, 0) in the Node.js event loop?

    event-loopconcurrency
  • 73

    How do you structure error handling in Go to distinguish between operational errors and programming errors?

  • 74

    How do you design a DynamoDB table to support both fine-grained lookups and broad range queries efficiently?

    dynamodbqueriesdesign
  • 75

    How do you onboard a new senior engineer to a complex legacy codebase while keeping them productive within their first two weeks?

    onboarding
  • 76

    How do you use lazy loading, code splitting, and prefetching together in a large React application to optimize time to interactive?

    optimizationlazy-loadingreact
  • 77

    What are the key differences between synchronous REST and asynchronous event-driven communication, and how do you choose between them?

    eventsrestasync
  • 78

    How do you write a type-safe event emitter in TypeScript where the event payload type is inferred from the event name?

    typescript
  • 79

    How does AWS Lambda cold start affect user-facing latency, and what are the most effective mitigation strategies?

    latency
  • 80

    What is the testing pyramid, and how does it change for a full-stack team that owns both frontend and backend?

    testing
  • 81

    How would you design a feature flag system that supports gradual rollouts, A/B testing, and instant kill switches?

    system-designdesignfeature-flags
  • 82

    How do you implement full-text search in PostgreSQL, and when would you reach for Elasticsearch instead?

    postgressearch
  • 83

    How does the Kubernetes Horizontal Pod Autoscaler decide when to scale, and how do you configure custom metrics?

    kubernetesconfigmonitoring
  • 84

    How do you test a custom hook that manages a WebSocket connection, including reconnection logic?

    hookswebsockets
  • 85

    How do you instrument a Node.js service with OpenTelemetry to capture distributed traces across multiple services?

    distributed
  • 86

    Describe the trade-offs between pessimistic and optimistic concurrency control in a high-contention database.

    databaselockingconcurrency
  • 87

    How does Go's garbage collector work, and what patterns cause GC pauses that affect latency?

    latencygc
  • 88

    Tell me about a time you had to deliver bad news to stakeholders about a technical failure, and how you handled it.

    storycommunication
  • 89

    How do you implement proper token rotation and refresh token invalidation in a stateless JWT-based auth system?

    jwttokenssystem-design
  • 90

    What is the hexagonal architecture, and how does it help with testability and technology migration?

    hexagonalmigrations
  • 91

    How would you handle an Elasticsearch cluster going into red status in production, and what is your triage process?

    searchconcurrency
  • 92

    How do you use Redis Pub/Sub versus Streams, and when does one outperform the other?

    redis
  • 93

    How do you design a multi-region active-active deployment on AWS for a stateful application?

    designdeployment
  • 94

    How do you evaluate whether to build, buy, or use open source when adding a new capability to your platform?

    decision-making
  • 95

    How do you handle breaking changes in Terraform provider upgrades without causing production downtime?

    soft-skillsterraform
  • 96

    How do you diagnose slow database queries in a production system with minimal impact on running traffic?

    databasequeriessystem-design
  • 97

    How do you run an architecture review meeting to get genuine technical feedback rather than just rubber-stamping decisions?

    feedbackarchitecture
  • 98

    How do you design a branded type system to prevent passing a UserId where an OrderId is expected at compile time?

    system-designdesign
  • 99

    How do you optimize Next.js for a page that needs both personalized user data and heavily cached public content?

    cachingoptimizationnextjs
  • 100

    What is observability, and how is it different from monitoring? What are the three pillars and how do you implement them end to end?

    observabilitymonitoring