Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

280 bites

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

Advanced everything in Backend Dev, page 9

advanced1 min read

Accessing the Raw Request Object in FastAPI

Think of it as dropping to a lower level. Instead of FastAPI handing you validated data, you grab the raw Starlette HTTP request yourself. Use this for data not covered by standard declarations, like a client's IP.

advanced2 min read

Overriding FastAPI Dependencies for Testing

Overriding dependencies lets you swap real components for fakes during tests. This is vital for isolating tests from external services like auth providers or databases, letting you control inputs and avoid slow, flaky network calls.

advanced2 min read

FastAPI's Security Utility: Dependencies for Auth

FastAPI's Security utility is a specialized Depends for authentication. It signals to OpenAPI that a dependency is required for security, enabling interactive docs. Use it to protect endpoints by injecting the authenticated user.

advanced2 min read

FastAPI: Setting Custom Response Headers

Set custom HTTP headers in FastAPI by adding a Response parameter to your endpoint. This lets you add metadata like trace IDs without changing your return data. The footgun is thinking you must return the Response object; just return your data as usual.

advanced2 min read

FastAPI `yield` Dependencies for Setup and Teardown

A yield dependency is a context manager for your endpoints. Code before yield runs setup, like getting a DB connection; code after yield runs teardown.

Pydantic Computed Fields: Serialize Derived Values
advanced2 min read

Pydantic Computed Fields: Serialize Derived Values

A Pydantic computed field makes a derived value, like an area from width and length, part of your model's serialized output. Use it to include calculated attributes when calling .model_dump().

advanced2 min read

Starlette's Request Object: A Clean API for ASGI

Starlette's Request object is a high-level wrapper around the raw ASGI scope, providing a clean API for request data. Use it in endpoints to read headers, query params, or parse the body. The footgun: the request body can only be read once.

advanced2 min read

FastAPI: Use HTTPException to Return Client Errors

FastAPI's HTTPException is your tool for stopping an operation and sending a clean HTTP error. Raise it when business logic fails, like a missing database record. The footgun is catching it yourself; just raise it and let FastAPI do the rest.

The Python GIL: One Thread at a Time
advanced2 min read

The Python GIL: One Thread at a Time

The Python Global Interpreter Lock (GIL) is a mutex ensuring only one thread executes Python bytecode at a time. This serializes CPU-bound threads, but the lock is released during I/O, making it effective for network-bound tasks.

Python Concurrency vs. Parallelism
advanced2 min read

Python Concurrency vs. Parallelism

Concurrency is juggling tasks; parallelism is doing them at once. In Python, use concurrency (threading/asyncio) for I/O-bound work like API calls, and parallelism (multiprocessing) for CPU-bound tasks.

Accessing Python Type Annotations Safely
advanced2 min read

Accessing Python Type Annotations Safely

Accessing an object's type hints isn't just obj.__annotations__. Use inspect.get_annotations() in Python 3.10+ for safe access. This is key for tools like FastAPI that introspect your code.

CI/CD Pipelines for Node.js Applications
advanced2 min read

CI/CD Pipelines for Node.js Applications

A CI/CD pipeline is an automated assembly line for Node.js code, installing dependencies, running tests, and packaging your app for deployment. This is standard for any professional project, but a common footgun is not caching dependencies, leading to slow…

Docker Compose for Multi-Container Apps
advanced2 min read

Docker Compose for Multi-Container Apps

Docker Compose is a conductor for your containers. Instead of running each service manually, you define your app and its database in one YAML file and launch them together. This is standard for local Node.js/Postgres development.

PM2: Zero-Downtime Reloads in Cluster Mode
advanced2 min read

PM2: Zero-Downtime Reloads in Cluster Mode

PM2's reload command updates a clustered Node.js app without downtime by restarting processes one by one. Use this for live deployments. The footgun is using it on a stateful app, which will cause data loss unless state is externalized.

Sticky Sessions: Pinning a User to a Server
advanced2 min read

Sticky Sessions: Pinning a User to a Server

Sticky sessions pin a user's requests to a single server in a multi-server setup. This is crucial for stateful apps like Socket.IO, where a user's session lives on one machine.

Socket.IO Adapters: Scaling Beyond One Server
advanced2 min read

Socket.IO Adapters: Scaling Beyond One Server

Socket.IO adapters let you scale beyond one server. They use a backend like Redis Pub/Sub to broadcast messages across all your instances, so a user on Server A gets events from Server B. The footgun is assuming this handles everything; you still need a load.

Socket.IO Namespaces: Channels on One Connection
advanced2 min read

Socket.IO Namespaces: Channels on One Connection

Socket.IO namespaces are virtual channels over a single WebSocket connection, letting you split app logic without multiple connections. Use them for separate areas like /admin or for multi-tenancy.

advanced2 min read

V8's Garbage Collector: A Performance Pillar

V8's garbage collector is a key to its speed, using a "stop-the-world, generational, accurate" approach to reclaim memory. This runs automatically in Node.js and Chrome, but its pauses can impact performance.

SharedArrayBuffer: True Shared Memory for JS Threads
advanced2 min read

SharedArrayBuffer: True Shared Memory for JS Threads

SharedArrayBuffer is a shared whiteboard for JS threads, letting them access the same memory without slow data copies. It's used for high-performance parallel tasks. The footgun: without Atomics to coordinate, you'll get race conditions and corrupted data.

advanced2 min read

Nock: Intercept and Mock Node.js HTTP Requests

Nock acts like a fake switchboard for your Node.js app's outgoing HTTP calls, redirecting them to pre-defined responses. This lets you unit test code that relies on external services, making tests fast, deterministic, and offline-capable.

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