Backend Interview Topics Guide: Databases, APIs, Caching, and Microservices

A deep backend interview guide covering SQL and NoSQL tradeoffs, API design, transactions, caching, queues, microservices, observability, and practical code examples.

·

Backend Interview Topics Guide

Backend interviews are wide by design. Unlike a pure coding round, a backend round can move from indexing strategy to API idempotency to retry semantics in the space of ten minutes. That breadth is exactly why many candidates feel inconsistent. They know each concept in isolation, but they have not organized them into a backend mental model.

This guide does that organization for you. The highest-value backend interview topics are not random. They cluster around a few recurring themes:

If you can explain those areas clearly, you can handle a large percentage of backend interview questions at growth-stage startups, infrastructure teams, and big tech companies.

For broader architecture prep, pair this with System Design Interview Patterns and Examples. For role-specific prep, compare it against the shorter Backend Engineer Interview Guide.

1. Databases: Start With Access Patterns, Not Brand Names

Interviewers do not care whether you say PostgreSQL or DynamoDB first. They care whether your choice matches the workload.

Ask yourself:

SQL vs NoSQL

Use SQL when:

Use NoSQL when:

Candidates often sound stronger when they say, "I’d start with PostgreSQL because the domain is transactional and relational, then reevaluate only if scale or access patterns demand a different storage model."

Example Schema Design

Suppose you are designing an order system:

CREATE TABLE orders (
  id BIGSERIAL PRIMARY KEY,
  user_id BIGINT NOT NULL,
  status VARCHAR(32) NOT NULL,
  total_cents BIGINT NOT NULL,
  created_at TIMESTAMP NOT NULL DEFAULT NOW()
);

CREATE TABLE order_items (
  id BIGSERIAL PRIMARY KEY,
  order_id BIGINT NOT NULL REFERENCES orders(id),
  product_id BIGINT NOT NULL,
  quantity INT NOT NULL,
  unit_price_cents BIGINT NOT NULL
);

CREATE INDEX idx_orders_user_created_at
  ON orders(user_id, created_at DESC);

What matters in the interview is the reasoning:

2. API Design: Contracts Matter

Backend interview topics often include API design because APIs expose how you think about domain modeling, consistency, and client experience.

Good APIs are:

Example REST Endpoints

POST /api/v1/orders
GET /api/v1/orders/{id}
GET /api/v1/orders?user_id=123&cursor=eyJpZCI6NDAwfQ==
POST /api/v1/orders/{id}/cancel

Good backend answers mention:

Example Idempotency Handling

def create_order(request, db):
    idem_key = request.headers.get("Idempotency-Key")
    if not idem_key:
        raise ValueError("missing idempotency key")

    existing = db.find_idempotent_response(idem_key)
    if existing:
        return existing

    order = db.insert_order(request.json)
    response = {"order_id": order.id, "status": order.status}
    db.store_idempotent_response(idem_key, response)
    return response

The important part is the semantics: retries should not create duplicate side effects.

3. Transactions and Consistency

A surprising number of backend interview questions are really consistency questions in disguise.

You should be able to explain:

When To Use A Transaction

Use a transaction when multiple writes must succeed or fail together. For example: creating an order and reserving inventory in the same relational store.

Avoid oversized transactions that lock too much data or mix long-running external calls into the same unit of work.

What To Say About Distributed Consistency

If services are separate, a single database transaction usually is not available. Then the question becomes:

This is where patterns like outbox plus async consumers matter more than theoretical distributed transactions.

4. Caching: Know What Problem You Are Solving

Caching is one of the most common backend interview topics because it is easy to name and easy to misuse.

Good answers start with the bottleneck:

Then choose the strategy:

Example Cache-Aside Flow

def get_user_profile(user_id: int, cache, db):
    cache_key = f"user_profile:{user_id}"
    cached = cache.get(cache_key)
    if cached is not None:
        return cached

    profile = db.fetch_user_profile(user_id)
    cache.set(cache_key, profile, ttl=300)
    return profile

The tradeoff to mention: cache-aside is operationally simple, but invalidation can serve stale data. That is better than pretending caching is free.

5. Queues, Background Jobs, and Event-Driven Systems

Backend interviews love async processing because it reveals whether you understand throughput, retries, and failure isolation.

Use a queue when:

Examples:

Example Consumer Skeleton

def handle_message(message, service, dead_letter_queue):
    try:
        service.process(message)
        acknowledge(message)
    except TemporaryError:
        retry_later(message)
    except Exception:
        dead_letter_queue.publish(message)

The important interview idea is not the code. It is the contract:

6. Microservices: Use Them For Boundaries, Not Fashion

Many candidates still overprescribe microservices because they think it sounds senior. Mature answers are more restrained.

Microservices are useful when:

They are expensive when:

In interviews, it is often better to say:

"I would start with a modular monolith if the team is small and the domain is evolving. I would split services only where boundaries are already clear."

That answer often lands better than "let’s create eight services."

7. Reliability and Observability

Backend engineers are expected to think beyond happy-path correctness.

You should be ready to discuss:

For example, if your payment provider is timing out, a good answer mentions:

That is operational thinking, and interviewers notice it.

8. A Simple Backend Interview Framework

When a question is broad, use this sequence:

  1. Define the dominant use case.
  2. Pick the storage model.
  3. Define the API contract.
  4. Decide where consistency matters.
  5. Add cache or queue only if the workload justifies it.
  6. Explain failure modes and observability.

This framework keeps your answer from turning into a grab bag of tools.

Common Backend Interview Mistakes

Naming Technologies Before Constraints

Do not start with "I’d use Kafka, Redis, and MongoDB." Start with requirements and access patterns.

Forgetting Idempotency

If your design includes retries, idempotency is probably relevant. Especially on create, payment, and job-processing flows.

Treating Microservices As Automatically Better

Microservices add network calls, deployment complexity, and consistency boundaries. Say why they are worth it.

Ignoring Failure Modes

A backend answer without timeouts, retries, and metrics sounds incomplete.

Practice This Inside Interview Simulator

Interview Simulator is useful here because backend answers are as much about explanation as correctness:

Explore Related Topics

Final Takeaway

Backend interview prep gets easier once you realize that most questions reduce to a few recurring concerns: how data is stored, how clients interact with it, how consistency is preserved, how load is handled, and how failures are observed.

If you can explain those five concerns clearly, with concrete examples and realistic tradeoffs, you will sound like a backend engineer instead of a candidate reciting keywords. That is the real target.