Easy interview questions in Backend Dev, page 7
Purpose of Go import C and Rust equivalent mechanism
This tests FFI entry points: Go's import "C" activates cgo to reference C symbols directly, while Rust uses an unsafe extern "C" block to declare external functions. A red flag is calling either a normal import or omitting unsafe in Rust.
Pass a string from Go and Rust to C safely
This tests FFI ownership and null-termination. In Go, use C.CString then C.free it. In Rust, create a std::ffi::CString, bind it to a let, then pass as_ptr while the binding lives. Red flag: claiming Rust is auto-safe without mentioning the temp-drop gotcha.
Inverted index in search engines
An inverted index maps each term to the list of documents containing it, making keyword lookup O(1)-ish instead of scanning every document.
HTTP request-response versus WebSocket connections?
HTTP is request-initiated, pull-based, client waits for response. WebSocket is persistent, bidirectional, either side sends data anytime.
Socket.IO emit methods: socket, io, broadcast differences?
Socket.emit() sends to one client, broadcast.emit() to all except sender, io.emit() to all.
Structuring a Go CLI that fetches a URL
Parse args with the flag package, http.Get the URL, check err and status, defer resp.Body.Close, copy body to stdout, exit non-zero on failure.

How do you define a WebSocket endpoint in FastAPI?
Import WebSocket, use @app.websocket, await accept, receive_text, then send_text.
How to add Socket.IO to an Express application?
Create HTTP server with express(), attach Socket.IO to it, listen on server not app, define event handlers.
Handling Result and errors in a Rust web handler
Handler returns Result, the ? operator early-returns errors, a custom error type implements IntoResponse to map to 500, success returns 200 with data.
What are startup and shutdown events in FastAPI?
Tests app lifespan hooks and resource lifecycle. Startup creates DB pools before traffic arrives; shutdown closes them after the last request. These decorators are deprecated; prefer lifespan context managers. Red flag: per-request middleware.
In-memory rate limiter middleware in Go
Use a token-bucket limiter (golang.org/x/time/rate), guard a per-client map with sync.Mutex, wrap http.Handler so requests over the limit get 429.
Environment configuration and secrets management in Node.js?
Use environment variables, load from .env file (dev only), never commit secrets.
What does PM2 do for Node.js applications?
PM2 restarts crashed processes and manages multiple workers.

Walk me through a basic Dockerfile for a FastAPI app
Slim base, install deps before app code to cache layers, expose port, exec-form CMD for Uvicorn.
How does NODE_ENV=production change Express behavior?
NODE_ENV is a convention signal, production disables verbose logging and enables caching.
Why use an ASGI server like Uvicorn instead of the dev server?
Tests: dev vs prod environment distinction. Answer: Uvicorn is a prod server program; contrast dev server's constant restart/break/fix cycle with prod needs for performance, stability, and uninterrupted access.
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