Interview questions in Backend Dev, page 26
Go if err != nil versus Rust's ? operator
Go's explicit checks are verbose but make every error site visible; Rust's ? propagates concisely while still forcing the error into the type, reducing boilerplate.
Pydantic computed fields in response models
A @computed_field decorated property is excluded from input and validation but included in serialization and the OpenAPI schema, ideal for values like full_name derived from other fields.
Validating request bodies with Express middleware
Run validation middleware before the handler, check email format and password length, return 400 with errors on failure, call next on success.
Optimizing queries on a billion-row fact table
Partition to prune scans, index for selective lookups, materialize views to precompute aggregates; each adds write or maintenance cost.
anyhow versus thiserror in Rust error handling
Anyhow gives one opaque dynamic error type for applications where you mostly propagate and report; thiserror derives concrete typed enums for libraries so callers can match on variants.
Streaming large file downloads efficiently
Use StreamingResponse with a generator that yields chunks (or FileResponse for an on-disk file), set media_type and a Content-Disposition header, so memory stays flat regardless of file size.
Purpose of an ORM like Sequelize
Maps rows to objects, gives a model-based API, handles associations, migrations, and parameterized queries across dialects.
Diagnosing and optimizing a slow production query
Read the EXPLAIN ANALYZE plan, find the costly node, then fix via indexing, rewrite, or stats.
Implicit Go interfaces versus explicit Rust trait impls
Go's implicit satisfaction enables decoupling and retrofitting but hides who implements what and risks accidental conformance; Rust's explicit impls aid discovery, refactoring…
Feature-based vs layer-based project structure
Layer-based groups by technical role and is simple early but scatters a feature across folders; feature-based groups by domain, improving cohesion and ownership at the cost of some duplication and…
Pinpointing validation errors in nested request data
Use schema validation that reports a path, collect all errors not just the first, return a 400 with field paths and messages.
Designing an HA/DR strategy for an OLTP database
Sync standby in-region for zero data loss, async cross-region for DR, automated failover with a quorum.
Go scheduler work-stealing and blocking syscalls
The GMP model runs goroutines (G) on OS threads (M) attached to logical processors (P); idle P's steal half of another P's run queue; on a blocking syscall the M detaches with its G.
selectinload vs joinedload for eager loading
Use eager loading options to avoid lazy N+1; joinedload uses a single JOIN (good for many-to-one) but can fan out rows on collections; selectinload issues a second IN query (better for one-to-many).
Managing user presence with reconnection grace periods
Rely on heartbeats, apply a grace period before marking offline, reconcile reconnects by user not socket id, use a shared store for multi-instance.
Cutting managed database costs without breaking SLOs
Pool connections, prune and tune indexes, offload reads, tier or partition cold data, right-size storage IOPS.
Cancellation and cleanup: Go context/errgroup vs Tokio
Go propagates cancellation via context.Context that goroutines must poll, with errgroup canceling siblings on first error; Tokio cancels by dropping futures, which stops them at await…
OAuth2 social login with your own JWT
A login endpoint redirects to the provider with a state param, a callback exchanges the code for the provider token, you fetch the user profile, upsert the local user, then mint your own JWT.
Blocking versus non-blocking I/O in Node
Blocking calls halt the thread until done, non-blocking returns immediately and notifies via callback or promise, fs.readFileSync versus fs.readFile.
Why choose Kafka over a REST endpoint for ingestion
Kafka buffers spikes, decouples producers from consumers, replays and fans out durably.
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