TOPIC
Backend
These are the same questions found in the library, grouped here by the capability each one mainly examines.
30 questions
A · Professional problem solving and implementation29
- When writing code and reviewing it, what checks have become habit for avoiding performance problems such as querying a database inside a loop or holding large objects too long? How do you know they actually work?
- Implement a retry wrapper that retries by error type, supports a maximum attempt count, backoff, and cancellation, and does not overwhelm the dependency. Define the interface before coding, then explain how to make clocks, waits, and tests deterministic.
- A cache can make reads faster and can also show users stale content. How do you decide whether a piece of data suits caching, and how do you notice when it goes wrong?
- After a page sits idle, the first request is much slower than later ones. What network-level causes could explain it, and how would you tell them apart?
- A query filters on an indexed column and is still slow. Explain how an index lookup works and what can keep it from helping.
- A long-running process keeps using more memory, while object counts in heap snapshots fluctuate. How would you use evidence to distinguish a true leak, intentional cache retention, fragmentation, or growth in native memory?
- Your service handles requests with threads and a colleague proposes processes instead. What would you compare, and when would you push back?
- Your endpoint works in local tests, but during integration a frontend colleague insists it errors or returns nothing. What means do you use to locate the problem, and how do you produce evidence the other person will accept?
- In production the same order is occasionally submitted twice, and you cannot reproduce it locally. How would you narrow it down, and would you stop the bleeding first or add observability first?
- An API has been slow since yesterday, and there is no release on record. Given logs, monitoring, and database slow-query records, in what order would you investigate?
- How should the permission system of a large operations back office be designed? How do you organize roles, data scope, approvals, and audit, and how do you keep it from getting out of control as permissions multiply?
- How would you design an article editing and publishing system? How should state and data be organized for drafts, review, scheduled publishing, multi-channel distribution, and edits after publication?
- Issuing a coupon after payment used to run synchronously, and it is being changed to an async queue with retries. Review this change: which failure sequences worry you most, and what would you rehearse before release?
- How would you design an online audio or video editor? How should the timeline, assets, non-destructive editing, preview, and final export each be designed?
- The local database has updated, but syncing the cache or sending a downstream message fails. How would you make the systems converge and handle retries, compensation, or manual recovery?
- Design a collaboration product that supports large-file uploads with resumability, where files must be validated and scanned before other members can access them. What constraints would you clarify, and how would you design upload, temporary storage, scanning, publication, permissions, and cleanup boundaries?
- How would you design a large-model chat system? How do you handle streamed output, multi-turn context, history, interruption, and retries, and how do you control cost and latency?
- How should coupons, discounts, and flash sales integrate with a trading system without slowing the core transaction flow? How would you calculate, combine, and reconcile discounts?
- Consumers are slower than producers, so the message queue keeps growing while upstream requests still succeed. Where would you apply backpressure, and how would you protect recovery capacity?
- API latency rises while database CPU remains low, and application logs show connection waits. How would you distinguish connection leaks, an undersized pool, and slow transactions holding connections?
- A payment-creation API must support safe client retries. How would you define the idempotency-key scope, retention period, and conflict behavior to avoid duplicate charges without suppressing valid requests?
- After writing an order to a database, a service must publish an event downstream; the process may crash at either step. How would you design durable publication and handle duplicates and ordering?
- In an admin console, inserts and deletes while paging by creation time cause duplicate or missing rows. How would you compare offset and cursor pagination and define the consistency expectation?
- An API runs across multiple instances, and a local request limiter makes the total allowance grow with each instance. How would you design request-rate controls for bursts, accuracy, and failures, and where would you keep their state?
- Implement a map with concurrent reads and writes, per-entry expiration, and expired-entry cleanup. How would you define expiration semantics, synchronization boundaries, and deterministic tests?
- Implement an incremental UTF-8 log parser that receives chunks which may split multibyte characters, reorder fields, contain multiple records, or include an exceptionally long line. Define parser state, error recovery, and memory limits, then implement repeatable core logic.
- After a service is registered as a singleton, different user requests occasionally see one another’s temporary state. How would you explain dependency-injection lifetimes and design a safe object boundary?
- After adding authentication, logging, and error-handling middleware, some failures lack trace IDs and unauthorized requests still trigger expensive parsing. How would you analyze pipeline order and boundaries?
- A service has stable average latency but periodic p99 spikes near allocation peaks. How would you determine whether garbage collection is responsible and distinguish it from other pauses?
No questions in this section match your target. ·