Interview guides · Ion Group
Ion Group Software Engineer Interview Guide
Ion Group Software Engineer interview guide: reported rounds, questions and how candidates describe the process.
The 60-second brief
A Software Engineer at Ion Group plays a critical role in designing, developing, and deploying high-performance, mission-critical software solutions that power the global financial sector. Ion Group provides trading, analytics, and risk management solutions to financial institutions, central banks, and corporate treasuries worldwide. In this role, you will be responsible for building robust, scalable systems capable of processing massive volumes of financial transactions with ultra-low latency and absolute precision. The impact of this position is immense, as the code you write directly influences the daily operations of global capital markets. You will work within an agile environment, contributing to the entire software development lifecycle—from analyzing complex business requirements to defining architecture, writing clean code, and establishing continuous integration pipelines.
This guide is scoped to a Software Engineer candidate at Ion Group.
Focus areas
- Data Structures & Algorithms (DSA)
- On-the-spot Coding
- Complexity Analysis (Time/Space Complexity)
The Ion Group interview process
Ion Group candidates report 6 rounds over 4-6 weeks. The stages below are what candidates describe, not a published process.
Online Assessments
Initial assessments to filter for core aptitude and coding skills.
What to demonstrate
- Initial assessments to filter for core aptitude and coding skills
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Implement a queue data structure from scratch using a linked list.
- Answer aloud and timed: Design and implement a queue using two stacks, explaining the time complexity of enqueue and dequeue operations.
Virtual Technical Evaluation
Deep-dive virtual evaluations focusing on technical skills and case studies.
What to demonstrate
- Deep-dive virtual evaluations focusing on technical skills and case studies
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Given a specific scenario, how would you implement a phone book using a Trie data structure to optimize prefix-based searches?
- Answer aloud and timed: Explain the key differences between Merge Sort and Quick Sort, and discuss the specific scenarios where one is preferred over the other.
Case Study Round
Evaluation of business logic, structured data analysis, and communication of analytical thoughts.
What to demonstrate
- Evaluation of business logic, structured data analysis, and communication of analytical thoughts
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Describe how you would find the shortest path in a network using a Depth-First Search (DFS) or Breadth-First Search (BFS) approach.
- Answer aloud and timed: Explain the four pillars of Object-Oriented Programming and provide a concrete, real-world code example of polymorphism.
Stakeholder Interviews
Interviews with key stakeholders to assess fit and alignment.
What to demonstrate
- Interviews with key stakeholders to assess fit and alignment
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Describe the difference between compile-time (method overloading) and runtime (method overriding) polymorphism, and explain how virtual functions work under the hood.
- Answer aloud and timed: What is the difference between an abstract class and an interface, and when would you use one over the other in a system architecture?
Executive Interviews
Final interviews with executives to evaluate leadership and cultural fit.
What to demonstrate
- Final interviews with executives to evaluate leadership and cultural fit
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Explain the concepts of "is-a" and "has-a" relationships, providing examples of inheritance versus composition.
- Answer aloud and timed: How would you design the class structure for a music streaming service like Spotify using clean OOP principles?
ION Day
Immersive event where shortlisted candidates meet in person for final evaluations.
What to demonstrate
- Immersive event where shortlisted candidates meet in person for final evaluations
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: You have 25 horses and a track that can race only 5 horses at a time. What is the minimum number of races needed to find the top 3 fastest horses?
- Answer aloud and timed: A blind man is presented with 4 pills: 2 are red and 2 are blue. They are identical in shape, size, and texture. To survive, he must take exactly 1 red pill and 1 blue pill. How can he do this?
Where candidates lose points
Master the "Why
Never just present a solution without being able to explain the underlying mechanics. If you use a HashMap, be ready to explain how hashing works, how collisions are resolved, and the worst-case time complexity.
Brush Up on Classic Puzzles
Spend time reviewing classic mathematical and logical puzzles from well-known online repositories. Ion Group interviewers love these puzzles and use them to test your raw cognitive capacity.
Be Structured in the Case Study
When presented with the business case study, do not rush to a conclusion. Use a structured framework: state the objective, list the key data points, perform your calculations step-by-step, and then deliver your recommendation.
Questions & practice
Implement a queue data structure from scratch using a linked list.
Medium · Data Structures & Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Given a specific scenario, how would you implement a phone book using a Trie data structure to optimize prefix
Medium · Data Structures & Algorithms
Given a specific scenario, how would you implement a phone book using a Trie data structure to optimize prefix-based searches?
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Explain the key differences between Merge Sort and Quick Sort, and discuss the specific scenarios where one is
Medium · Data Structures & Algorithms
Explain the key differences between Merge Sort and Quick Sort, and discuss the specific scenarios where one is preferred over the other.
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Describe how you would find the shortest path in a network using a Depth-First Search (DFS) or Breadth-First S
Medium · Data Structures & Algorithms
Describe how you would find the shortest path in a network using a Depth-First Search (DFS) or Breadth-First Search (BFS) approach.
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Describe the difference between compile-time (method overloading) and runtime (method overriding) polymorphism
Medium · Object-Oriented Programming (OOP) & Desi
Describe the difference between compile-time (method overloading) and runtime (method overriding) polymorphism, and explain how virtual functions work under the hood.
Approach
- Say what the runtime actually does before reasoning about the code.
- Name what is shared across threads and what owns each piece of state.
- Identify the window where an invariant is briefly untrue.
- Distinguish a value from a reference to it, and say which one you handed out.
Follow-up
- What happens if two callers reach this at the same time?
- Where could this allocate more than you expect?
Denormalise tenant onto revisions and backfill it live
Hard · denormalisation · online migration · backfill
resource_revision (revision_id, resource_id, version, actor_user_id, change_kind, patch, request_id, created_at) has 400M rows and no tenant column; tenant_id lives only on resource. Two reads need it: a tenant-scoped audit feed ordered by created_at DESC, and an offboarding purge. Both join back to resource today. Justify adding tenant_id to resource_revision against those two reads, name the anomaly the copy introduces and the constraint that prevents it, then give the ordered migration for a live table taking 1.2k writes/second — the lock each step takes, how the backfill is batched, and where each step stops being reversible. PostgreSQL 16.
Approach
- Justify from the access path rather than from taste. Without the column, the audit feed either scans resource_revision by created_at and discards other tenants' rows, or resolves the tenant's resource_ids first and probes with them — both proportional to the tenant's whole history rather than to one page. With (tenant_id, created_at DESC, revision_id DESC) it is a seek that stops at 50 rows, and the purge becomes a ranged delete instead of a join.
- Name the cost exactly: a second copy of a fact can disagree with the first. Make the disagreement unwritable rather than documented — add UNIQUE (resource_id, tenant_id) on resource so it can serve as a foreign-key target, then FOREIGN KEY (resource_id, tenant_id) REFERENCES resource (resource_id, tenant_id) on the revision table. A revision can then only ever carry its parent's tenant.
- Step one, expand: ALTER TABLE resource_revision ADD COLUMN tenant_id BIGINT NULL, with no default, so it is a catalogue change and no rewrite. It still needs ACCESS EXCLUSIVE for an instant, and that instant queues behind the longest open transaction on the table while every later query queues behind it — set lock_timeout to 2s and retry rather than wait.
- Step two, dual-write: deploy the writer that populates tenant_id on every new revision while reads still use the join. Reversible by redeploying the previous build, because nothing reads the column yet.
Follow-up
- The backfill is half finished and a rollback is required. What state is the table in, and what does the previous build do with a half-populated column?
- How do you verify the backfill actually finished, given rows are still being inserted while it runs?
Find version gaps and relay lag with window functions
Medium · window functions · event tables · frame semantics
outbox_event holds event_id, aggregate_type, aggregate_id, aggregate_version, event_type, payload, status ('pending','published','dead'), attempts, created_at, published_at. A projection is missing rows and you must decide whether the relay skipped events or the consumer dropped them. Write three queries over the last seven days: one listing every aggregate_id whose published aggregate_version sequence has a hole, one giving per-day counts with a running total, and one returning the newest published event per aggregate. For each, say where the window function is evaluated relative to WHERE and LIMIT. PostgreSQL 16.
Approach
- Gaps: compute lead(aggregate_version) OVER (PARTITION BY aggregate_id ORDER BY aggregate_version) in a subquery, then filter next_version <> aggregate_version + 1 in the outer query. Window functions are evaluated after WHERE, GROUP BY and HAVING and before the outer ORDER BY and LIMIT, so the predicate cannot sit in the same WHERE clause and PostgreSQL 16 has no QUALIFY.
- Say what the seven-day filter does to the answer: it truncates every partition, so the first row per aggregate has no predecessor inside the window and a hole spanning the boundary is invisible. Widen the window, or join to resource.version as the authority for the true maximum.
- Running total: SELECT date_trunc('day', created_at) AS d, count() AS n, sum(count()) OVER (ORDER BY date_trunc('day', created_at) ROWS UNBOUNDED PRECEDING). An aggregate inside a window call is legal because grouping runs before windowing. The grouping key is unique per row here so ROWS and RANGE agree, but write the frame anyway — over ungrouped rows with tied timestamps the default RANGE frame pulls in every peer row and the total jumps.
- Newest per aggregate: DISTINCT ON (aggregate_id) ... ORDER BY aggregate_id, aggregate_version DESC is the cheap PostgreSQL-only form when an index matches that order; row_number() OVER (PARTITION BY aggregate_id ORDER BY aggregate_version DESC) = 1 is the portable form and needs a subquery for the same evaluation-order reason as the gap query.
Follow-up
- Relay failover redelivers events. Does a duplicate break the gap query, and how would you detect one from this table alone?
- Turn the gap check into a continuous monitor rather than a query someone runs after an incident. What does it watch?
Design and implement a queue using two stacks, explaining the time complexity of enqueue and dequeue operation
Medium · Data Structures & Algorithms
Design and implement a queue using two stacks, explaining the time complexity of enqueue and dequeue operations.
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Explain the four pillars of Object-Oriented Programming and provide a concrete, real-world code example of pol
Medium · Object-Oriented Programming (OOP) & Desi
Explain the four pillars of Object-Oriented Programming and provide a concrete, real-world code example of polymorphism.
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
What is the difference between an abstract class and an interface, and when would you use one over the other i
Medium · Object-Oriented Programming (OOP) & Desi
What is the difference between an abstract class and an interface, and when would you use one over the other in a system architecture?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Explain the concepts of "is-a" and "has-a" relationships, providing examples of inheritance versus composition
Medium · Object-Oriented Programming (OOP) & Desi
Explain the concepts of "is-a" and "has-a" relationships, providing examples of inheritance versus composition.
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
How would you design the class structure for a music streaming service like Spotify using clean OOP principles
Medium · Object-Oriented Programming (OOP) & Desi
How would you design the class structure for a music streaming service like Spotify using clean OOP principles?
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
You have 25 horses and a track that can race only 5 horses at a time. What is the minimum number of races need
Medium · Logic Puzzles & Brainteasers
You have 25 horses and a track that can race only 5 horses at a time. What is the minimum number of races needed to find the top 3 fastest horses?
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
A blind man is presented with 4 pills: 2 are red and 2 are blue. They are identical in shape, size, and textur
Medium · Logic Puzzles & Brainteasers
A blind man is presented with 4 pills: 2 are red and 2 are blue. They are identical in shape, size, and texture. To survive, he must take exactly 1 red pill and 1 blue pill. How can he do this?
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Explain the "camel and banana" puzzle to find the maximum number of bananas that can be transported over a set
Medium · Logic Puzzles & Brainteasers
Explain the "camel and banana" puzzle to find the maximum number of bananas that can be transported over a set distance with specific carrying constraints.
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Solve the classic "priest and demon" river crossing puzzle, explaining the logical constraints and your step-b
Medium · Logic Puzzles & Brainteasers
Solve the classic "priest and demon" river crossing puzzle, explaining the logical constraints and your step-by-step state transitions.
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
A car has 4 tires, and each tire can run for a maximum of 20,000 miles before wearing out. If you have one spa
Medium · Logic Puzzles & Brainteasers
A car has 4 tires, and each tire can run for a maximum of 20,000 miles before wearing out. If you have one spare tire, what is the maximum distance the car can travel?
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Design a low-level system for an online movie ticket booking platform, including class definitions, database s
Medium · System Design & Architecture
Design a low-level system for an online movie ticket booking platform, including class definitions, database schemas, and concurrency handling.
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How would you design a highly scalable doctor appointment booking system, ensuring that double-booking is prev
Medium · System Design & Architecture
How would you design a highly scalable doctor appointment booking system, ensuring that double-booking is prevented under high concurrent load?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Explain how you would implement "undo" and "redo" functionalities in a text editor like MS Word. Which data st
Medium · System Design & Architecture
Explain how you would implement "undo" and "redo" functionalities in a text editor like MS Word. Which data structures are best suited for this, and why?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How would you approach designing a system that needs to scale from handling 100 users to over 100,000 active u
Medium · System Design & Architecture
How would you approach designing a system that needs to scale from handling 100 users to over 100,000 active users? What architectural trade-offs would you make?
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
You are presented with a business performance report containing financial metrics and operational data. Walk t
Medium · Case Studies & Business Analysis
You are presented with a business performance report containing financial metrics and operational data. Walk through your analysis to identify the core bottlenecks in the business.
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Analyze a market-entry scenario for a new financial product. What key economic variables and technical constra
Medium · Case Studies & Business Analysis
Analyze a market-entry scenario for a new financial product. What key economic variables and technical constraints must be balanced to ensure success?
Approach
- Clarify what is being asked and what a complete answer contains.
- State your assumptions explicitly before working the problem.
- Say what you would check first and why it is the highest-information step.
- Work from the requirement backwards to the design.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Given a scenario where a software project is experiencing significant delays, how would you systematically ide
Medium · Case Studies & Business Analysis
Given a scenario where a software project is experiencing significant delays, how would you systematically identify the root causes and propose a technical solution?
Approach
- Establish what changed and when, before forming any theory.
- Pick a bisection that eliminates candidates whichever way it turns out.
- Check the instrumentation before believing the symptom.
- Separate the trigger from the cause; the deploy is rarely the bug.
Follow-up
- What would you look at first, and what would it rule out?
- How would you tell a cause from a coincidence here?
Suggested practice checklist
Built from the rounds and topics Ion Group candidates report.
Day 1 — Map the Ion Group loop
- Write out the reported sequence: Online Assessments, Virtual Technical Evaluation, Case Study Round, Stakeholder Interviews, Executive Interviews, ION Day.
- For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.
Deliverable: A one-page map of the 6 reported rounds, with the weakest marked.
Day 2 — Work Data Structures & Algorithms (DSA)
- Spend the session on Data Structures & Algorithms (DSA), which Ion Group candidates report being tested on.
- Write one worked example in Data Structures & Algorithms (DSA) and time yourself on it.
Deliverable: One timed worked example in Data Structures & Algorithms (DSA).
Day 3 — Work On-the-spot Coding
- Spend the session on On-the-spot Coding, which Ion Group candidates report being tested on.
- Write one worked example in On-the-spot Coding and time yourself on it.
Deliverable: One timed worked example in On-the-spot Coding.
Day 4 — Work Complexity Analysis (Time/Space Complexity)
- Spend the session on Complexity Analysis (Time/Space Complexity), which Ion Group candidates report being tested on.
- Write one worked example in Complexity Analysis (Time/Space Complexity) and time yourself on it.
Deliverable: One timed worked example in Complexity Analysis (Time/Space Complexity).
Day 5 — Answer out loud: Data Structures & Algorithms
- Answer aloud, timed: Implement a queue data structure from scratch using a linked list.
- Answer aloud, timed: Design and implement a queue using two stacks, explaining the time complexity of enqueue and dequeue operations.
Deliverable: Spoken answers to 2 reported Data Structures & Algorithms question(s), under time.
Day 6 — Answer out loud: Object-Oriented Programming (OOP) & Design
- Answer aloud, timed: Explain the four pillars of Object-Oriented Programming and provide a concrete, real-world code example of polymorphism.
- Answer aloud, timed: Describe the difference between compile-time (method overloading) and runtime (method overriding) polymorphism, and explain how virtual functions work under the hood.
Deliverable: Spoken answers to 2 reported Object-Oriented Programming (OOP) & Design question(s), under time.
Day 7 — Answer out loud: Logic Puzzles & Brainteasers
- Answer aloud, timed: You have 25 horses and a track that can race only 5 horses at a time. What is the minimum number of races needed to find the top 3 fastest horses?
- Answer aloud, timed: A blind man is presented with 4 pills: 2 are red and 2 are blue. They are identical in shape, size, and texture. To survive, he must take exactly 1 red pill and 1 blue pill. How can he do this?
Deliverable: Spoken answers to 2 reported Logic Puzzles & Brainteasers question(s), under time.
Behavioural preparation
Behavioural rounds judge the decision you made and what it cost.
Narrate an outage you owned from page to postmortem
Hard · incident response · blast radius · postmortems
Pick an incident you personally drove, ideally one where writes were affected rather than reads. In six to eight minutes: state the symptom as it first appeared on a dashboard, the blast radius you established before you knew the cause, the mitigation you applied and when, the mechanism you eventually proved, and the follow-up that would prevent a repeat. Bring numbers: error rate, tenants affected, minutes to mitigate, minutes to resolve. If you cannot name what you measured, choose a different incident.
Approach
- Open on the signal rather than the cause: which metric at which percentile moved, on which service, at what time, so the listener follows the same evidence you had rather than a conclusion you already reached.
- Separate mitigation from diagnosis out loud. State what you did to stop the bleeding (flag off, shed traffic, drain a lease, roll back a deploy) and say plainly that you did it before the mechanism was known, because those are two jobs with different deadlines.
- Establish blast radius in countable terms: how many tenants, how many writes, and crucially whether the effect was loss or only delay. An append-only revision table or a pending outbox row means the change survived and the projection was merely behind, which is a repair rather than a data-loss incident.
- Prove the mechanism instead of asserting it. Name the trace span that grew, the plan that flipped to a sequential scan, the lease that expired, plus one alternative you ruled out and the signal that stayed flat while you ruled it out.
Follow-up
- What would you do differently in the first five minutes, given the same dashboard and no more information?
- Which follow-up action did you deliberately not take, and why was dropping it the right call?
Estimate work you have never done and defend the range
Hard · estimation · backfills · expand-contract
You are asked to estimate a change you have never attempted: add a column to a 100-million-row table, populate it, move reads across, and drop the old shape. Give a range with the assumptions that generate it, including batch size, the signal your backfill throttles on, and wall-clock hours, and name the three unknowns that would move the number most. Then describe a real estimate you gave under comparable ignorance: how you expressed its uncertainty, what you committed to, and how wrong you turned out to be.
Approach
- Decompose into independently deployable steps before estimating anything: add the column nullable, write both shapes, backfill in batches, verify, move reads, stop writing the old shape, drop it. That is four deploys spread over days, and the calendar estimate is dominated by them rather than by the loop's runtime.
- Do the arithmetic aloud for the part that has arithmetic in it: batch size times number of batches times per-batch duration, at a write rate the primary can absorb alongside roughly 1.2k writes per second of production traffic. The loop is throttled by replication lag and lock waits, not by how fast it can issue statements.
- Price the schema step by its lock rather than its statement duration. In PostgreSQL an ALTER TABLE taking ACCESS EXCLUSIVE waits for every open transaction on that table while later queries queue behind it, so a millisecond change issued during a thirty-second analytics query stalls that table for thirty seconds. Adding a nullable column with a non-volatile default avoids a rewrite from version 11; a new index wants CREATE INDEX CONCURRENTLY, which cannot run inside a transaction block and leaves an invalid index behind if it fails.
- Express the answer as a range whose endpoints each trace to a stated assumption, then name the cheapest experiment that collapses it, which is almost always running one real batch against the real table and multiplying.
Follow-up
- How do you verify the backfill genuinely finished, given rows written by production traffic while it ran?
- Where does the backfill resume from after a worker is killed mid-batch, and what makes that resume point trustworthy?
Ship under a deadline and bound the debt you chose
Medium · pagination · technical debt · tradeoffs
You have four days to ship a tenant-facing listing endpoint. The version you would defend uses keyset pagination over (tenant_id, status, updated_at DESC, resource_id DESC); the version you can finish uses LIMIT/OFFSET with no matching index. Describe a deadline call you actually made of this shape: what you shipped, what you knowingly deferred, how you bounded the damage with a mechanism rather than an intention, and the specific numeric condition that would force the follow-up. Name who you told and where you wrote it down.
Approach
- Name the deferred failure precisely instead of calling it slow. OFFSET n makes the database produce and discard n rows, so cost grows with page depth; without an index matching the sort, every matching row is read and sorted before the limit applies; and rows inserted between two page fetches shift across the boundary so items are skipped or repeated with nothing in the response to signal it.
- Bound the blast radius with something mechanical rather than a promise: cap maximum page depth, cap page size, restrict the endpoint to one internal caller, or keep it behind a flag. State which failure each cap removes and which it leaves standing.
- Attach a number to the trigger and wire it to an alarm: the first tenant crossing N resources, or the endpoint's p99 crossing its share of the 400 ms budget, so the debt announces itself instead of waiting to be remembered.
- Write it where the next engineer looks, which is the code and the ticket, not a chat message: what was deferred, why, the cap, and the trigger.
Follow-up
- At what page depth does the offset version breach your latency budget, given your page size and row counts?
- What breaks first when you switch to keyset pagination later, and what does a client holding an old page token see?