Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

136 bites

Test yourself: Top 30 easy Backend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Easy interview questions in Backend Dev, page 2

easy1 min read

The ACID properties of transactions

Define Atomicity, Consistency, Isolation, Durability and why each matters.

How do you define a Pydantic model for FastAPI request body validation?
easy2 min read

How do you define a Pydantic model for FastAPI request body validation?

Subclass BaseModel with id int, email str, full_name str|None; pass it as a route param so FastAPI validates JSON and returns 422s.

easy1 min read

The lost update anomaly explained

Both transactions read the same value, each adds one, the second overwrite erases the first.

How does Pydantic handle extra JSON fields, and how to configure it?
easy2 min read

How does Pydantic handle extra JSON fields, and how to configure it?

This tests Pydantic's data filtering behavior and configuration. By default, Pydantic ignores extra fields silently. Set model_config = ConfigDict(extra='forbid' or 'allow') to change it. A red flag is claiming FastAPI 422s by default on unknown fields.

easy1 min read

Database deadlocks and how engines resolve them

Define a deadlock as mutual waiting on locks, name detection plus victim rollback, and prevention by consistent lock ordering.

What is the difference between a Pydantic default and Optional field?
easy2 min read

What is the difference between a Pydantic default and Optional field?

Both forms are non-required; str = 'guest' rejects None, Optional[str] = None accepts it.

easy1 min read

fs.readFileSync vs fs.readFile

Sync blocks the event loop and returns directly, async takes a callback or promise, only sync is safe at startup.

easy1 min read

Why use path.join over string concatenation

Path.join uses the correct OS separator, collapses duplicate slashes, normalizes . and .. segments.

easy2 min read

How do Go and Rust control visibility of functions and types?

Tests encapsulation conventions in systems languages. Go uses capitalization: uppercase exports across packages; Rust uses explicit pub keywords with module-level privacy. Red flag: claiming either uses Java-style access modifiers or runtime visibility.

easy1 min read

Minimal HTTP server with the http module

CreateServer with a request listener, set status and Content-Type, end the response, call listen on 3000.

easy2 min read

Go package declaration, directory name, and import path relationship

Tests Go's separation of directory layout and package identity. A good answer states: import path is module path plus subdirectory; package clause is the in-code name; mismatch is legal and common for main or tests.

easy1 min read

What a database index is and when it helps

An index is a sorted lookup structure avoiding full scans, helps selective WHERE/JOIN columns, but costs write overhead.

easy1 min read

Composite index column order for multi-column filters

Create one index on (last_name, first_name); order matters because the index serves leftmost-prefix lookups.

How do you define a Pydantic model and use it in FastAPI?
easy2 min read

How do you define a Pydantic model and use it in FastAPI?

Subclass BaseModel with name str and age int, then type-hint the parameter with the model.

easy1 min read

Clustered versus non-clustered indexes

A clustered index orders the table's actual rows, one per table; a non-clustered index is a separate structure pointing to rows.

How would you use a Pydantic response_model to enforce output structure?
easy2 min read

How would you use a Pydantic response_model to enforce output structure?

Tests separation of internal models from API contracts. Define a Pydantic output model with only safe fields, set it as the endpoint response_model, and let FastAPI filter and validate.

easy2 min read

Define a FastAPI endpoint with path and query parameters

Tests if you know FastAPI infers parameter location from the route string. Good answer: route with {item_id}, signature item_id: int, q: str | None = None, noting any param not in the path becomes a query param.

easy2 min read

Describe Go's memory management, garbage collection, and trade-offs

Explain Go's GC recycles heap memory, the compiler stack-allocates locals, and automatic collection costs runtime overhead.

easy2 min read

Explain Rust's Ownership and its three compiler-enforced rules

Tests your grasp of Rust's compile-time memory model. A strong answer lists the three ownership rules, links them to stack versus heap, and notes borrow checking enforces them at compile time. Red flag: calling it manual memory management.

easy1 min read

Minimal Express Hello World server

Import express, create an app, define app.get on the root sending a response, call app.listen on a port.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles