Backend Engineer interview questions
56 questions asked in Backend Engineer interviews, on APIs, distributed systems, databases and production incidents. They are built from thousands of real job ads. Under each one: what the interviewer is listening for, and the follow-up they may ask. For the recruiter call, see the HR screen questions.
Behavioral questions
Questions about how you work in this role. More in behavioral questions for any tech role.
-
1
What's the hardest on-call shift you've had? Walk me through what you did that night.
Mid, Senior
Listening for Stays calm, communicates, fixes or escalates, and follows up after.
Follow-up Ask what they changed so it would not happen again.
-
2
Tell me about a time you ran something against a production database and it didn't go as planned.
All levels
Listening for Honest about what happened, how fast they told others and how they recovered.
Follow-up Ask what safety step they use now.
-
3
Think of a part of a codebase that everyone was afraid to touch. What did you do when you had to change it?
Junior, Mid
Listening for Builds confidence with tests, small steps and asking people who know it.
Follow-up Ask what they left better than they found it.
-
4
Describe a time the frontend or mobile team wanted something from your API that you didn't agree with. How did you settle it?
Junior, Mid
Listening for Listens to the other team's need, explains the backend cost and finds a shared answer.
Follow-up Ask how the API looks now.
-
5
Tell me about a time you pushed back on a design because you didn't think it would hold up in production.
Mid, Senior
Listening for Concrete technical reasons, a respectful way of raising them and the outcome.
Follow-up Ask what happened if they turned out to be wrong.
-
6
Have you ever shipped a change that broke another team's service? What happened next?
Mid, Senior
Listening for Owns it, fixes fast, talks to the other team and adds a guard.
Follow-up Ask how the two teams work together now.
-
7
Tell me about a time you noticed a system costing far more than it should. How did you get it fixed?
Senior
Listening for Finds the cause with data, weighs savings against effort and gets others to act.
Follow-up Ask how much it saved.
-
8
Tell me about a large migration you led that touched several teams. How did you keep it moving to the end?
Senior
Listening for Plans in stages, tracks progress in the open, removes blockers and actually finishes the last 10%.
Follow-up Ask what slowed it down most.
Technical discussion questions
Talking through your experience and decisions, not a coding test. Grouped by topic.
Distributed systems
-
1
Your service calls another service that sometimes doesn't answer. What should your code do while it waits, and after that?
Junior
Listening for Timeouts, limited retries with backoff, and a clear error or fallback for the user.
Follow-up Ask when retrying makes things worse.
-
2
We need our service to keep working if a whole cloud region goes down. What would you change?
Senior
Listening for Replication, failover, data consistency and the cost of running active-active versus standby.
Follow-up Ask how they would test a failover.
-
3
A downstream service is slow but not down. How do you stop it from taking your service down with it?
Senior
Listening for Timeouts, bulkheads, circuit breakers, limited retries and fallbacks.
Follow-up Ask how they would pick the timeout value.
-
4
An order has to update payments, inventory and shipping, each in its own service. How would you keep them consistent if one step fails?
Senior
Listening for Sagas or an outbox with compensating steps instead of distributed transactions.
Follow-up Ask how support staff would see a stuck order.
API design
-
5
Walk me through an API endpoint you built recently, from the request coming in to the response going out.
Junior, Mid
Listening for A clear path through routing, validation, business logic and storage in their own words.
Follow-up Ask what happens when the input is invalid.
-
6
A client calls your API with bad input. How do you decide what status code and error message to send back?
Junior
Listening for Knows the common status codes and writes errors a client can act on.
Follow-up Ask how they handle an error they did not expect.
-
7
Old mobile app versions still call our API. How do you change an endpoint without breaking them?
Mid, Senior
Listening for Additive changes, versioning, deprecation windows and tracking who still calls the old shape.
Follow-up Ask when they would finally remove the old version.
System design
-
8
When would you put a cache in front of a database, and what can go wrong with it?
Junior, Mid
Listening for Knows read-heavy patterns, TTLs, invalidation and stale data.
Follow-up Ask what happens when the cache goes down.
-
9
How would you design the backend for a simple booking app for a small clinic? Just talk me through the main parts.
Junior
Listening for Sensible data model, a few clear endpoints and thought about double bookings.
Follow-up Ask what changes when there are a hundred clinics.
-
10
How would you design rate limiting for a public API, so one customer can't slow things down for everyone?
Mid, Senior
Listening for Per-key limits, a sensible algorithm, where the counters live and what the client sees.
Follow-up Ask how it works across many servers.
-
11
How would you design a system that sends millions of notifications a day by email and push?
Senior
Listening for Queues, workers, retries, provider limits, user preferences and dedupe.
Follow-up Ask what happens when the email provider is down for an hour.
-
12
A mid-level engineer brings you a design doc for a new service. What do you look for when you review it?
Senior
Listening for Checks requirements, failure modes, data and operations, and gives feedback that teaches.
Follow-up Ask how they handle a design they think is wrong but could still work.
Observability
-
13
When something breaks in production, what do you look at first, and what does it tell you?
Junior
Listening for Knows the difference between logs, metrics and traces and uses them in a sensible order.
Follow-up Ask what was missing the last time they debugged prod.
-
14
A request goes through five services and is slow somewhere in the middle. What would you need in place to find which one?
Mid, Senior
Listening for Distributed tracing, correlation ids, per-service latency metrics.
Follow-up Ask how they would get teams to add tracing to old services.
-
15
Walk me through the worst production incident you've been close to. How was it found, and what changed after it?
Mid, Senior
Listening for A clear timeline, their own part, the root cause and follow-ups that stuck.
Follow-up Ask what would have caught it earlier.
-
16
Several backend teams each run their own services. How would you raise the reliability bar across all of them?
Senior
Listening for SLOs, shared tooling, deploy and alerting standards, reviews of incidents, and getting buy-in rather than forcing it.
Follow-up Ask how they would measure progress.
AWS
-
17
Which cloud services have you used in a project, and why were they a good fit?
Junior
Listening for Honest, concrete experience and some idea of why each service was picked.
Follow-up Ask what they would use instead if the cost doubled.
-
18
When would you run a backend on serverless functions instead of containers?
All levels
Listening for Weighs traffic shape, cold starts, cost at scale, limits and team skills.
Follow-up Ask what would make them move back to containers.
Microservices
-
19
In your own words, what changes for a developer when an app is many small services instead of one big one?
Junior
Listening for Understands network calls, separate deploys, versioned APIs and harder debugging.
Follow-up Ask which part they found hardest in practice.
-
20
Our team wants to split a large monolith into services. How would you decide what to split first, if anything?
Mid, Senior
Listening for Starts from a real pain, picks a part with clear boundaries and data, and knows services add network and ops cost.
Follow-up Ask how they would split the data.
Kubernetes
-
21
Your service keeps restarting in Kubernetes every few minutes. What would you check?
Junior, Mid
Listening for Looks at pod events, exit codes, memory limits, health probes and logs from the last run.
Follow-up Ask how they would tell a memory leak from a bad probe.
Python
-
22
A Python service handles more traffic every month and starts using all its CPU. How would you decide whether to optimise, scale out or rewrite part of it?
Senior
Listening for Profiles first, knows the GIL and async limits, compares cost of each option.
Follow-up Ask what result would convince them to rewrite.
PostgreSQL
-
23
One endpoint got slow after the users table grew to a few million rows. How would you find out why?
Junior, Mid
Listening for Measures before guessing: query logs, the query plan, missing indexes.
Follow-up Ask what they would do if the index does not help.
-
24
You're about to add three new indexes to a busy orders table. What would make you hesitate?
Mid, Senior
Listening for Knows indexes cost writes, storage and lock time on big tables.
Follow-up Ask how they would add one safely while traffic is live.
-
25
You need to rename a column on a table that a live service reads and writes. How would you do it without downtime?
Mid, Senior
Listening for Expand and contract: add, dual-write, backfill, switch reads, then drop.
Follow-up Ask what could go wrong during the backfill.
Go
-
26
You're starting a new backend service. How would you choose between Go, Java, Python or TypeScript for it?
Mid, Senior
Listening for Weighs the workload, libraries, hiring, team skills and how it fits what already runs.
Follow-up Ask when they would go against what the team knows.
-
27
Our Go service has a good average latency, but one request in a hundred takes over two seconds. How would you find out why?
Senior
Listening for Looks at percentiles, traces and profiles, and suspects GC, lock contention, slow dependencies or queueing.
Follow-up Ask how they would set a target for it.
CI/CD
-
28
Walk me through what happens from the moment you merge a pull request until your code is running in production.
Junior, Mid
Listening for Understands the pipeline steps: build, tests, image, deploy, health checks.
Follow-up Ask which step they would trust least and why.
-
29
Your pull request passes on your machine but fails in the CI pipeline. How do you work out why?
Junior
Listening for Reads the logs, compares environments, versions and test data, and reproduces locally.
Follow-up Ask about a time this happened to them.
-
30
How would you roll out a risky change to a service that handles all of our traffic?
Mid, Senior
Listening for Canary or gradual rollout, feature flags, clear rollback signals.
Follow-up Ask what metric would make them stop the rollout.
Kafka
-
31
Why would you put a message queue between two services instead of one calling the other directly?
Junior, Mid
Listening for Decoupling, buffering spikes and retries, with an example from their work.
Follow-up Ask what new problems the queue brings.
-
32
Our order events sometimes arrive out of order in a downstream service. How would you deal with that?
Mid, Senior
Listening for Partition keys, per-entity ordering, versions or timestamps to ignore stale events.
Follow-up Ask what changes if one partition becomes hot.
Event driven
-
33
A consumer processed the same payment event twice, and a customer was charged twice. How would you stop that happening again?
All levels
Listening for Accepts at-least-once delivery and makes the handler idempotent with a key or dedupe table.
Follow-up Ask where they would store that key and for how long.
Data pipelines
-
34
Tell me about a background job or data pipeline you worked on. What happened when it failed halfway through?
Junior, Mid
Listening for Thinks about retries, partial writes and being able to rerun safely.
Follow-up Ask how they knew it had failed.
-
35
Every night a job imports a file from a partner into our database. What would you do to make it safe to run twice?
Junior
Listening for Idempotent writes with upserts or a run log, validation before writing, and alerts on failure.
Follow-up Ask what happens if the file arrives half written.
-
36
A bug in our pipeline wrote wrong data for six months. How would you plan reprocessing all of it?
Mid, Senior
Listening for Replays from a source of truth in batches, protects live traffic, checks results before switching.
Follow-up Ask how they would know the fix is correct.
Concurrency
-
37
Two requests try to book the last seat at the same moment. How would you make sure only one of them gets it?
Junior, Mid
Listening for Uses a transaction, row lock, unique constraint or atomic update rather than a check-then-write.
Follow-up Ask how they would test that it really works.
-
38
Have you written code that runs things in parallel, like threads or goroutines? What went wrong, or nearly went wrong?
Junior
Listening for A real example of shared state, a race or a deadlock and how they spotted it.
Follow-up Ask what they would do differently now.
LLMs
-
39
Let's say we add a feature that calls a large language model API on every request. What would you worry about in production?
All levels
Listening for Latency, cost, rate limits, timeouts, retries, wrong output and what the user sees when it fails.
Follow-up Ask how they would cap the cost.
Authentication
-
40
How does your current app keep a user logged in, from the login form to every API call after that?
Junior, Mid
Listening for Explains sessions or tokens and where they are stored and checked.
Follow-up Ask what happens when a token is stolen or expires.
-
41
A teammate wants to log the full request body for every call, including the login endpoint. What would you say?
Junior, Mid
Listening for Spots passwords, tokens and personal data in logs and suggests redaction or structured logging.
Follow-up Ask how they would clean up logs that already leaked.
-
42
How should one internal service prove who it is when it calls another service? What have you used?
Mid, Senior
Listening for Real options such as mTLS, signed tokens or a service mesh, and why trust inside the network is not enough.
Follow-up Ask how secrets get rotated.
TypeScript
-
43
If you've built a backend in TypeScript, what did the types catch for you, and where did they still let bugs through?
Junior, Mid
Listening for Knows types stop at the network edge and data must be checked at runtime.
Follow-up Ask how they validate incoming data.
GCP
-
44
We're moving our services and data jobs from one cloud provider to another. How would you plan it so customers don't notice?
Senior
Listening for Inventory, moving in stages, data sync, rollback per step and cost tracking.
Follow-up Ask which piece they would move first and why.
AI agents
-
45
Do you use AI coding tools or agents in your work? Where do they help you, and where do you check their output carefully?
Junior
Listening for Uses AI tools with judgement and reviews what they produce.
Follow-up Ask about a time the tool gave them something wrong.
-
46
Let's say an AI model can call one of our APIs to look up an order. What would that API need that a normal one might not?
Junior
Listening for Clear descriptions and inputs, strict permissions for the user it acts for, safe errors and limits.
Follow-up Ask what the model should never be able to see.
-
47
We want an AI agent that can call some of our internal APIs. How would you stop it from doing something it shouldn't?
Mid, Senior
Listening for Limited scopes, allow-lists, human approval for risky actions, audit logs and treating model output as untrusted.
Follow-up Ask how they would test it.
-
48
An AI agent in our backend sometimes calls the same tool over and over and never finishes. How would you debug and fix that?
Mid, Senior
Listening for Logs each step, sets step and cost limits, checks the tool results and prompt.
Follow-up Ask how they would notice this in production before users do.