10 questions · STAR-scored

Backend Developer Interview Questions

The questions backend developers actually get asked — with STAR-structured sample answers you can rewrite in your voice. Practice the rooms before you're in them.

The questions

1
Behavioral
Tell me about a time you debugged a production incident under pressure.
Show sample answer

Our checkout service started returning 500s during a flash sale. I checked dashboards first, saw the DB connection pool was exhausted, and traced it to a missing connection release in a new code path. I shipped a hotfix to release connections in a finally block and added a pool-saturation alert. We recovered in 22 minutes and I wrote a postmortem so the gap never recurred.

2
Behavioral
Describe a technical decision where you had to trade off speed against long-term maintainability.
Show sample answer

We needed a reporting endpoint in two days for a launch. I shipped a simple synchronous query knowing it wouldn't scale, but I documented the limitation and added a metric on its latency. Once it crossed 800ms I had the data to justify moving it to a pre-aggregated table. Being explicit about the tradeoff let us hit the deadline without quietly accruing hidden debt.

3
Behavioral
Give an example of a disagreement with a teammate over an architecture choice.
Show sample answer

A peer wanted to introduce a new message broker; I felt our existing queue was sufficient. Instead of debating opinions, we wrote a one-page comparison against our real throughput numbers and failure modes. The data showed our current setup met requirements with far less operational cost, so we deferred the new broker. We both agreed because the decision was grounded in evidence, not seniority.

4
Behavioral
Tell me about a time you improved a slow or unreliable system.
Show sample answer

A search endpoint averaged 1.2s and timed out under load. I profiled it, found N+1 queries and a missing composite index, fixed both, and added a Redis cache for hot terms. p99 dropped to 240ms and the timeout rate went to near zero. The key was measuring before and after rather than guessing at the bottleneck.

5
Behavioral
Describe how you handle being asked to deliver something you think is the wrong approach.
Show sample answer

A stakeholder wanted to store sensitive tokens in plaintext to save time. I explained the concrete risk and the audit exposure, then offered an equally fast path using our existing secrets manager. By pairing the objection with a ready alternative, I kept the timeline intact while protecting the system. They appreciated that I came with a solution, not just a blocker.

6
Behavioral
Tell me about a time you mentored a junior engineer.
Show sample answer

A new grad was struggling with flaky integration tests. Rather than fixing them myself, I paired with them to isolate the shared state causing the flakiness and showed them how to use test containers for clean fixtures. They later fixed three similar suites independently. I measured success by their growing autonomy, not by how fast the immediate problem closed.

7
System design
Design a URL shortener that handles 10,000 redirects per second.
Show sample answer

I'd generate short keys with a base-62 encoding of an auto-increment ID or a hash, store the mapping in a key-value store like Redis fronted by a durable DB. Reads dominate, so I'd cache hot keys aggressively and serve redirects from a CDN-backed edge layer. For 10K rps I'd shard the store, use 301/302 appropriately, and add rate limiting plus analytics written asynchronously to a queue.

8
System design
How would you design an idempotent payment API?
Show sample answer

I'd require an idempotency key from the client on each create call and persist the key with the request's result in a unique-indexed table. On retry, if the key exists I return the stored response rather than charging again. I'd wrap the charge and key write in a transaction so a crash can't leave them inconsistent, and expire keys after a sensible window.

9
Technical
Explain how you'd diagnose a sudden spike in database CPU.
Show sample answer

I'd start with the slow-query log and pg_stat_statements to find the most expensive queries by total time, then check for missing indexes or a plan regression after a deploy. I'd also look at connection counts and lock contention. Often it's a single unindexed query newly hitting a large table, which an EXPLAIN ANALYZE confirms before I add the right index.

10
Technical
What's the difference between optimistic and pessimistic locking, and when do you use each?
Show sample answer

Optimistic locking assumes conflicts are rare: you read a version number and only commit if it's unchanged, retrying on conflict. Pessimistic locking takes a lock up front to block others. I use optimistic for high-read, low-contention paths like profile edits, and pessimistic for short critical sections with frequent collisions like inventory decrements, where retries would thrash.

How to prepare — the STAR rubric

Every strong behavioral answer follows the same four-part structure: Situation(the context — 2 sentences), Task (what success looked like — 1 sentence),Action (what you actually did, 3-5 specific steps), and Result(the measurable outcome). Most candidates over-invest in Situation and under-invest in Result. The Result is where the interviewer scores you.

Watch-outs specific to backend developer interviews

Run a backend developer mock interview — free.

Voice or text. Per-answer STAR scoring. Saved across devices.

Start free
Continue your Backend Developer prep
About this guide
The ApplyVita Career Team

The ApplyVita Career Team builds the resume-scoring and job-matching tools at the core of ApplyVita. Our guidance is grounded in the same four-component ATS rubric our product scores resumes on — content and impact, keyword match, formatting, and skills — and in current recruiter and hiring-manager practice. Every guide is checked against that rubric before it is published, and updated as hiring norms change.

Salary figures are estimates informed by publicly reported data from Glassdoor, Levels.fyi, AmbitionBox, LinkedIn Salary and others — negotiation anchors, not guarantees.Read our editorial standards, sourcing & corrections policy →