Interview questions in Backend Dev, page 27
cgo threading challenges with multi-threaded C libraries
Cgo calls run on a dedicated OS thread and detach the P; thread-local state and callbacks into Go are fragile; solutions include LockOSThread, minimizing crossings, and a dedicated…
Reading the full response body in middleware
Responses stream as multiple body messages and headers go first, so you cannot add a header after seeing the body; you must buffer all chunks, compute the hash, set the header, then resend.
Callback hell and how to refactor it
Deeply nested callbacks (pyramid of doom) hurt readability and error handling, refactor with promises or async/await.
Problems the Lakehouse architecture solves
Lakehouse adds ACID transactions, schema enforcement, and time travel on cheap object storage.
Design a graceful worker pool in Go
Buffered job channel, fixed worker goroutines, WaitGroup to await in-flight work, context cancellation to stop intake.
Choosing Uvicorn worker count in production
Workers exist to use multiple CPU cores past the GIL; a common starting point ties count to cores, then you tune by load testing, balancing CPU and memory (each worker is a full copy) against connection-pool…
Nested routes versus query params for related resources
Nested routes express ownership and scope clearly, query params on the flat resource are flexible for filtering and combining.
Modeling IoT data with tags and fields
Tags are indexed identifying metadata, fields are unindexed measured values, and tag cardinality drives memory.
Defining many-to-many relationships in Sequelize
Use belongsToMany through a join table, the through table holds the foreign keys, eager-load courses with include.
Diagnosing high Redis eviction and cache misses
Use INFO memory and stats to confirm pressure, check fragmentation ratio, pick LFU over LRU for skewed access, set sane TTLs.
JWT login and protected route flow in Express
Verify credentials, sign a JWT, client stores and sends it (Authorization header or httpOnly cookie), middleware verifies signature on protected routes.
Unit testing Express auth middleware in isolation
Build fake req/res, use a spy/mock for next and res methods, assert next called on valid token and 401 sent on invalid.
Diagnosing intermittent crashes with PM2
PM2 auto-restarts and runs cluster mode for availability, inspect logs and metrics, watch memory for leaks, capture errors.
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