Skip to content
tezvyn:

Top 30 Advanced Backend Dev Concepts Quiz

30 advanced multiple-choice Backend Dev concept questions, the corners that separate having used it from understanding it: internals, edge cases, and the reasons behind the design. They come from 30 bites in the Backend Dev library, the hardest slice of the 550 Backend Dev concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

Backend engineering, APIs, and databases

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    How does Libuv ensure non-blocking I/O for operations that lack native asynchronous support from the operating system?

    Show the answer

    Answer: c · It uses a dedicated thread pool to execute these operations, preventing the main JavaScript thread from blocking.

    Libuv employs a thread pool for I/O operations that do not have native asynchronous OS APIs, allowing these tasks to run in the background without blocking the main JavaScript event loop. Relying on the main thread or just JavaScript Promises would not achieve true non-blocking I/O at the system level.

    Read the full bite: Libuv: The Engine Behind Node.js Async I/O

  2. Question 2 of 30

    You write an async generator that awaits during resource teardown, but mistakenly decorate it with @contextmanager. What is the most likely result?

    Show the answer

    Answer: b · A runtime error occurs because the synchronous decorator cannot await inside the generator

    The card explicitly warns that @contextmanager is for synchronous generators only and cannot await, causing a crash. Distractor A is tempting because blocking the event loop is discussed as a general risk of async code, but the specific mistake of using the sync decorator with async cleanup results in a runtime error rather than silent blocking.

    Read the full bite: Python Async Context Managers

  3. Question 3 of 30

    Which statement best describes the core trade-off when selecting a lower transaction isolation level?

    Show the answer

    Answer: d · It aims to maximize concurrent transaction execution, potentially allowing more data anomalies.

    The card states that lower isolation levels increase concurrency by using fewer locks, but this comes at the cost of allowing more types of data anomalies. Option D accurately captures this fundamental trade-off between maximizing concurrent execution and the risk of data anomalies. Option B describes the characteristics of higher isolation levels, not lower ones.

    Read the full bite: Transaction Isolation Levels: The Concurrency vs. Correctness Dial

  4. Question 4 of 30

    For which task would Node.js Worker Threads provide the most significant benefit?

    Show the answer

    Answer: c · Processing a large video file to apply a filter.

    Worker threads are specifically designed for CPU-bound operations like video processing to offload heavy computation from the main thread. I/O-bound tasks, such as database queries or network requests, are already efficiently managed by Node's event loop and do not benefit from worker threads.

    Read the full bite: Worker Threads: True Parallelism in Node.js

  5. Question 5 of 30

    What characteristic most directly prevents an abstraction from being considered 'zero-cost'?

    Show the answer

    Answer: b · It necessitates runtime data or dynamic dispatch.

    An abstraction is not zero-cost if it requires runtime information, such as dynamic dispatch or allocations, because the compiler cannot prove it away entirely. While many function calls (option C) might seem costly, they can often be inlined and optimized away at compile time, which is a hallmark of zero-cost abstractions.

    Read the full bite: Zero-Cost Abstractions: Pay at Compile Time, Not Runtime

  6. Question 6 of 30

    What is the primary advantage of employing the Node.js cluster module in a multi-core environment?

    Show the answer

    Answer: c · It allows a single Node.js application to utilize all available CPU cores for I/O-bound network operations on one machine.

    The cluster module's core purpose is to enable a single Node.js application to fully utilize all CPU cores on a *single* multi-core machine for I/O-bound tasks like network applications. It is not designed for direct memory sharing (that's worker_threads), distributing across multiple physical servers, or low-overhead IPC for frequent data exchange, as IPC overhead is noted as high.

    Read the full bite: Node.js Cluster: Scaling on a Single Machine

  7. Question 7 of 30

    What is the fundamental purpose of relational algebra within a database system?

    Show the answer

    Answer: b · To provide a formal, procedural model for query execution and optimization.

    Relational algebra serves as the formal, procedural model that a database uses to translate declarative SQL queries into an optimizable execution plan. Option C describes SQL itself, which is the high-level, declarative language, not relational algebra.

    Read the full bite: Relational Algebra: The Math Behind SQL Queries

  8. Question 8 of 30

    What specific problem did direct access to "__annotations__" for a class, like "Derived.__annotations__", commonly cause in Python 3.9 that "inspect.get_annotations()" addresses in Python 3.10+?

    Show the answer

    Answer: c · It would incorrectly show annotations inherited from a parent class, even if the derived class had no explicit annotations.

    In Python 3.9 and earlier, direct access to a class's __annotations__ would incorrectly include annotations inherited from parent classes. Python 3.10+ and `inspect.get_annotations()` resolve this by ensuring a class's __annotations__ only contains its own explicitly defined annotations, returning an empty dictionary if none are present.

    Read the full bite: Accessing Python Type Annotations Safely

  9. Question 9 of 30

    What is the primary philosophical goal Codd's 12 Rules aim to achieve for database systems?

    Show the answer

    Answer: a · Ensuring complete separation between the logical data model and its physical implementation.

    Codd's rules were created to formally define data independence, which is the separation of the logical data representation from its physical implementation. They are explicitly stated as a theoretical benchmark, not a practical tool for vendor comparison.

    Read the full bite: Codd's 12 Rules: The Relational Database Litmus Test

  10. Question 10 of 30

    Why is Python's threading module generally not recommended for speeding up CPU-bound tasks on multi-core machines?

    Show the answer

    Answer: a · The Global Interpreter Lock (GIL) prevents multiple threads from executing Python bytecode simultaneously.

    The card states that the GIL "prevents multiple threads from executing Python code at the same time," which is the fundamental reason threading cannot achieve true parallelism for CPU-bound tasks. While thread management overhead (option C) can make a program slower, the GIL is the core reason it won't speed up by utilizing multiple CPU cores.

    Read the full bite: Python Concurrency vs. Parallelism

  11. Question 11 of 30

    What is the primary reason Python's threading module can improve performance for I/O-bound applications despite the Global Interpreter Lock (GIL)?

    Show the answer

    Answer: d · The GIL is released by a thread when it enters a waiting state for an I/O operation, allowing other threads to execute Python bytecode.

    The card explains that when a thread is blocked waiting for an I/O operation, the GIL is released, allowing other threads to acquire it and execute Python bytecode, thereby improving concurrency. Option C is incorrect because the GIL is released and reacquired, not entirely bypassed.

    Read the full bite: The Python GIL: One Thread at a Time

  12. Question 12 of 30

    Under what specific condition might a database designer intentionally opt for a 3NF schema instead of striving for BCNF?

    Show the answer

    Answer: b · If achieving BCNF would make it impossible to enforce a critical functional dependency using a key constraint.

    The card explicitly states that the primary reason not to use BCNF is the trade-off with dependency preservation, where achieving BCNF might prevent enforcing an original functional dependency with a key constraint. Option D describes the goal of BCNF, which is stricter than 3NF in eliminating anomalies, making it an incorrect reason to choose 3NF.

    Read the full bite: Boyce-Codd Normal Form (BCNF): Stricter Than 3NF

  13. Question 13 of 30

    What is the primary purpose of using Rust's turbofish (`::<>`) or fully qualified syntax?

    Show the answer

    Answer: c · To specify which trait's method to use when multiple traits define methods with the same name for a given type, or to provide type hints for generic functions.

    The card states the turbofish is used to resolve ambiguity when a type implements multiple traits with same-named methods, or to provide type hints for generic functions like `collect()`. Option C accurately describes these scenarios. Option A describes defining generics, not resolving ambiguity during their use.

    Read the full bite: Rust's Turbofish (`::<>`): When the Compiler Needs Help

  14. Question 14 of 30

    What is the primary reason Box<T> is essential for defining recursive data structures in Rust?

    Show the answer

    Answer: d · It ensures that the overall size of the recursive type can be determined at compile time.

    The core problem Box<T> solves for recursive types is making their size known at compile time by storing the actual data on the heap and only keeping a fixed-size pointer on the stack. While Box<T> can help prevent stack overflows by moving data off the stack, this is a secondary effect; the primary issue for recursive types is their indeterminate size at compile time.

    Read the full bite: Using Box<T> for Heap Allocation in Rust

  15. Question 15 of 30

    If module A requires B, and B subsequently requires A, what does Node.js provide to B for A's exports when A was the module initially loaded?

    Show the answer

    Answer: a · An empty object or a partially populated module.exports object from A.

    To prevent an infinite loop, Node.js returns the module.exports object from A as it exists at that moment, which is often incomplete. It does not immediately crash or provide a fully resolved object, but rather an unfinished version that can lead to later TypeErrors.

    Read the full bite: Node.js Circular Dependencies: The Unfinished Export

  16. Question 16 of 30

    Which statement accurately describes the primary trade-off when using a materialized view?

    Show the answer

    Answer: b · It sacrifices data freshness to achieve faster query execution.

    The card explicitly states that a materialized view involves a "direct tradeoff: speed for freshness." It pre-computes and stores query results for faster access, but this means the data can be stale. Option A is incorrect because materialized views increase storage by storing a physical copy of the data. Option C is incorrect as they primarily improve read performance, not write performance. Option D is incorrect because materialized views introduce data staleness, which is the opposite of real-time consistency.

    Read the full bite: Materialized Views: Pre-computing Slow Queries

  17. Question 17 of 30

    What specific type of data redundancy does Fourth Normal Form (4NF) primarily address that BCNF does not?

    Show the answer

    Answer: c · Redundancy from combining multiple independent lists of facts about a single entity.

    Correct answer C directly describes the core problem 4NF solves: the redundancy arising when a table combines two or more independent, multi-valued lists of facts about a single entity. Option A describes the type of redundancy addressed by BCNF, which focuses on functional dependencies where a determinant is not a superkey, not on independent multi-valued relationships.

    Read the full bite: Fourth Normal Form (4NF): Isolating Independent Facts

  18. Question 18 of 30

    What is the primary advantage of using an NPM scope (e.g., @my-org/package) for your packages?

    Show the answer

    Answer: b · It allows you to publish private packages and organize related modules under a shared namespace.

    Option B accurately describes the core benefits of NPM scopes: they are mandatory for publishing private packages and provide a way to group related modules under a common, unique namespace. Option D is incorrect because the card states that scoped packages are public by default and require a specific flag for private access.

    Read the full bite: NPM Scopes: Namespacing Packages to Avoid Collisions

  19. Question 19 of 30

    In a FastAPI application, when is it appropriate to explicitly raise HTTPException?

    Show the answer

    Answer: b · To signal that a requested resource or business rule violation occurred due to client input.

    HTTPException is designed for expected, client-caused errors like a missing resource (404) or a permission issue (403), which stem from business logic. FastAPI automatically handles Pydantic validation errors (422) and it's not for unexpected server bugs (500).

    Read the full bite: FastAPI: Use HTTPException to Return Client Errors

  20. Question 20 of 30

    A developer implements a CPU-intensive image resize inside an async def FastAPI endpoint. Under concurrent load, what is the most likely outcome?

    Show the answer

    Answer: b · The event loop blocks during each resize, starving other concurrent requests

    CPU-intensive work inside async def never yields control to the event loop, so it starves other requests on the same worker. FastAPI only runs regular def routes in a thread pool, and async does not create parallel multicore execution.

    Read the full bite: Async Path Operations in FastAPI

  21. Question 21 of 30

    Which statement accurately describes a key behavior when consuming the request body via Starlette's Request object?

    Show the answer

    Answer: c · It must be explicitly awaited, and the underlying stream can only be read once.

    The card explicitly states that accessing the body involves 'await-ing methods that consume the receive channel' and that 'This body consumption can only happen once.' Option A is a common misconception, as the Request object treats the body as a stream that is consumed upon the first read, not automatically cached.

    Read the full bite: Starlette's Request Object: A Clean API for ASGI

  22. Question 22 of 30

    Which statement best describes the core mechanism by which Timestamp Concurrency Control maintains database consistency?

    Show the answer

    Answer: d · It assigns timestamps to transactions and aborts those whose operations violate the established temporal order.

    Timestamp Concurrency Control assigns a unique timestamp to each transaction and allows them to proceed optimistically. If a transaction's operations are found to violate the serializable order implied by these timestamps, it is aborted and restarted. Option C describes traditional pessimistic locking, which TCC is designed to avoid.

    Read the full bite: Timestamp Concurrency Control: No Locks, Just Time

  23. Question 23 of 30

    When using Promise.race() for a network request with a timeout, what is the outcome if the timeout promise rejects before the network request resolves?

    Show the answer

    Answer: d · The Promise.race() promise will reject with the timeout's error.

    Promise.race() settles with the outcome of the very first promise to settle, regardless of whether it resolves or rejects. If the timeout promise rejects first, the race() promise immediately rejects with that error. The network request's eventual resolution is ignored because it was not the first to settle.

    Read the full bite: Promise.race(): First Promise to Settle Wins

  24. Question 24 of 30

    For which access pattern is Go's sync.Map specifically optimized?

    Show the answer

    Answer: c · Keys that are written once or infrequently, but read many times concurrently.

    sync.Map is designed for read-heavy workloads where keys are stable and written once or infrequently, as stated in the card. It is explicitly not a general-purpose replacement for a map protected by a mutex, making option A a common but incorrect assumption.

    Read the full bite: Go's sync.Map: A Specialized Concurrent Map

  25. Question 25 of 30

    Which scenario best illustrates a limitation of Snapshot Isolation, where a logical inconsistency can occur despite successful transaction commits?

    Show the answer

    Answer: a · Two transactions independently check a resource's availability, then each updates a different, related record based on that initial check, leading to an invalid state.

    The correct answer describes a write skew anomaly, which Snapshot Isolation explicitly does not prevent, leading to logical inconsistencies despite no direct write-write conflict. Other options describe anomalies like non-repeatable reads or dirty reads, which Snapshot Isolation is designed to prevent by providing a consistent snapshot.

    Read the full bite: Snapshot Isolation: A 'Photo' of Your Database

  26. Question 26 of 30

    What is the primary reason to use Promise.allSettled() over Promise.all() for multiple asynchronous tasks?

    Show the answer

    Answer: a · To obtain a status report for every task, allowing individual handling of successes and failures.

    Promise.allSettled() is designed to provide an outcome for every promise in the batch, whether it fulfilled or rejected, allowing for graceful handling of partial failures. Option C describes Promise.all(), which short-circuits and rejects the entire batch if any promise fails.

    Read the full bite: Promise.allSettled(): Never Fail a Batch of Promises

  27. Question 27 of 30

    What is the primary purpose of using a Pydantic @computed_field?

    Show the answer

    Answer: b · To automatically include a value derived from other fields in the model's serialized output.

    A computed field promotes a derived value to be part of the model's exportable data, automatically including it in the serialized output. It is not for defining fundamental inputs, which should be regular Pydantic fields.

    Read the full bite: Pydantic Computed Fields: Serialize Derived Values

  28. Question 28 of 30

    Which problem does Weak<T> primarily help mitigate when used in conjunction with Rc<T>?

    Show the answer

    Answer: a · Preventing memory leaks caused by reference cycles.

    The card states that "To prevent memory leaks from cycles, Rc<T> is often paired with Weak<T>." Option B describes the role of Arc<T>, while option C describes the role of types like RefCell<T> or Cell<T>.

    Read the full bite: Rust's Rc<T>: Shared Ownership on a Single Thread

  29. Question 29 of 30

    Which scenario best describes when to use Promise.any()?

    Show the answer

    Answer: d · To retrieve the result from the first promise that successfully completes, ignoring any failures.

    The correct answer (D) accurately describes Promise.any()'s purpose: to get the first successful result, even if other promises fail. Option C describes Promise.race(), which settles with the first promise regardless of its outcome.

    Read the full bite: Promise.any(): Get the Fastest Successful Result

  30. Question 30 of 30

    Which situation most accurately describes a write skew anomaly under Snapshot Isolation?

    Show the answer

    Answer: b · Two transactions read a shared dataset, each decides to modify a different part of that dataset, and both commit, resulting in a state that violates a multi-row business rule.

    Write skew occurs when two transactions read the same data, make independent decisions, and then update different data items, which Snapshot Isolation permits. This leads to a logical inconsistency or business rule violation because SI's conflict detection doesn't trigger for non-overlapping writes. The other options describe different concurrency anomalies that SI either prevents or handles differently.

    Read the full bite: Write Skew: The Phantom Anomaly of Snapshot Isolation

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon