Skip to content
tezvyn:

⚙️Backend Dev

Backend engineering, APIs, and databases

141 bites

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

Advanced concepts in Backend Dev, page 3

advanced2 min read

Go's `internal` Directory: Private by Convention

Go's internal directory creates private packages within your module, making them inaccessible to external projects. Use it for helper logic you don't want to support as a public API.

advanced2 min read

Node.js DNS: lookup vs. resolve

Node.js splits DNS into two paths: dns.lookup uses getaddrinfo for IPs, while the dns.resolve family fetches records like MX or TXT. Use lookup for connections and the resolve family for service discovery.

advanced2 min read

Rust Cargo Workspaces: A Monorepo Control Panel

A Cargo Workspace is a control panel for a multi-crate Rust project, unifying dependencies and build artifacts. Use it for related binaries and libraries to ensure consistent builds.

LSM-Tree: Fast Writes, Later Merges
advanced2 min read

LSM-Tree: Fast Writes, Later Merges

An LSM-tree optimizes for high-volume writes by batching them in memory before flushing to disk, like a notepad for a busy filing cabinet. It's used in databases like Cassandra for write-heavy tasks. The footgun is unpredictable read latency.

advanced2 min read

ARIES Recovery Algorithm

ARIES is a widely-used database recovery algorithm, found in systems like IBM Db2 and SQL Server. It enables high performance by supporting a 'no-force, steal' policy, ensuring data integrity after a crash. The main footgun is not understanding this policy.

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.

PostgreSQL's Free Space Map: Finding Room to Write
advanced2 min read

PostgreSQL's Free Space Map: Finding Room to Write

A Free Space Map is a table of contents for empty space in a Postgres table. It lets Postgres quickly find a page with enough room for a new row or index entry, avoiding a slow scan. It's used on every INSERT/UPDATE.

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.

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.

Express Error Middleware: Your App's Safety Net
advanced2 min read

Express Error Middleware: Your App's Safety Net

Express error middleware is a safety net that intercepts unhandled errors, preventing crashes. It's used to centralize logging and format consistent error responses. The biggest footgun is placement: it must be defined *after* all other routes and middleware.

advanced2 min read

Go's GC: Low-Latency Collection with Tri-color Marking

Go's GC uses a tri-color algorithm to find unused memory concurrently, avoiding long pauses. It's crucial for low-latency services. The main footgun is breaking the invariant: a 'finished' (black) object must never point to a new (white) one without notifying…

advanced2 min read

Rust's Interior Mutability: Mutating 'Immutable' Data

Interior mutability lets you modify data through an immutable reference, moving Rust's borrow checks from compile-time to runtime. It's used in single-threaded code when the compiler can't verify safe access.

advanced2 min read

Rust's NLL: Smarter Borrows Based on Use, Not Scope

Non-Lexical Lifetimes (NLL) make Rust's borrow checker smarter. A borrow's lifetime ends after its last use, not at the end of its code block. This allows modifying data after a borrow is finished, even if the reference variable is still in scope.

FastAPI: Mounting Independent Sub-Applications
advanced2 min read

FastAPI: Mounting Independent Sub-Applications

Mounting delegates a URL prefix to a separate FastAPI app, giving it its own isolated logic and API docs. Use it to combine microservices or isolate domains. The footgun: the main app's dependencies and middleware do not apply to the sub-app.

advanced2 min read

Go's Panic/Recover: For Exceptional Errors Only

Go's panic/recover is a last-resort error mechanism, not a try/catch replacement. A panic unwinds a goroutine's stack until a recover in a defer'd function catches it. It's used to keep a server alive when one request fails catastrophically.

advanced2 min read

Rust's `panic!`: When to Crash Your Program Intentionally

Rust's panic! is an emergency stop for unrecoverable bugs, intentionally crashing the current thread. It's for impossible states where continuing is dangerous, not for recoverable errors like failed I/O—use Result for that.

advanced2 min read

Composable Error Types with `thiserror` in Rust

thiserror generates boilerplate for custom Rust error types, letting you define specific, matchable errors for a library. Use it when callers need to handle different failure modes. The footgun is using it for simple app errors where anyhow would suffice.

BASE: Trading Consistency for Availability
advanced2 min read

BASE: Trading Consistency for Availability

BASE is a database design philosophy that prioritizes availability over strict consistency, the opposite of ACID. It's used in large-scale systems like social media where uptime is key and slightly stale data is okay.

advanced2 min read

Polyglot Persistence: Use the Right Database for the Job

Polyglot persistence means using multiple, specialized data stores in one system. Instead of one database handling everything, you might use a relational DB for transactions, a document DB for profiles, and a graph DB for connections.

advanced2 min read

Vector Databases: Searching by Meaning, Not Keywords

A vector database finds "what's most like this?" instead of "find me exactly this." It organizes data by semantic meaning, not just exact values, making it ideal for recommendation engines, semantic search, or finding similar images.

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