A Software Engineer at Gusto works on payroll, benefits and HR software used by small businesses in the United States. The work involves a Ruby on Rails codebase alongside microservices and React frontends. The hard part is domain logic: multi-state tax calculations, payroll runs and benefits enrollments, where a wrong date boundary or a rounding error ends up as a wrong paycheck.
That domain shows up in the reported questions. Alongside standard coding problems (integer to English words, bold tags with overlapping ranges, a time-based key-value store), candidates report practical exercises: parsing logs and HTTP responses, aggregating nested JSON payroll payloads, and calculating net pay or benefit deductions across partial pay periods and leap years. The bank adds progressive tax brackets, capped money distribution and tax-date rules.
The design questions follow the same pattern. Reported prompts include a shift-scheduling and publishing service for multi-location businesses, a payroll distribution engine with batching, retries and audit logs, an internal metrics system, and API contracts for multi-step onboarding. Prepare relational data modeling first: entities, keys, cardinality and normalization come before caching or service boundaries. On the behavioral side, candidates describe a dedicated Values & Motivations Alignment (VMA) interview and a hiring manager conversation about project history.
Application Review
reportedCandidates describe this stage only as an initial review of qualifications. Your resume is the whole case here, so make each bullet show evidence rather than a list of technologies. The must-have skills listed for the role are fluency in at least one modern language, data structures and algorithms, object-oriented design, relational databases and data modeling, and code backed by unit and integration tests. The nice-to-haves are Ruby on Rails, compliance-heavy domains such as fintech, payroll, HR or insurance, React, cloud and container tooling, and background job processing such as Sidekiq.
What to demonstrate
- Whether the resume shows the must-have skills with concrete evidence: a schema you designed, a tested service you owned, a language you shipped production code in
- Whether any work in money, dates, compliance or regulated data is easy to spot, since those domains match the reported interview questions
- Whether each bullet says what changed because of your work rather than only naming the tools
How to prepare
- Rewrite your top three bullets so each one names the problem, your change and the result, and cut any bullet that is only a list of technologies
- If you have worked on billing, payments, payroll, tax, insurance or audit-heavy systems, move that work to the top and say what correctness problem it solved
- Name the relational database and the testing approach you actually used, since both are listed as must-haves
Recruiter Screen
reportedCandidates describe this stage as either a screening call or an automated online technical assessment. Ask the recruiter which format you will get, and for an assessment, which platform and languages you will get, because the preparation is different. On a call, expect to cover your background, project experience, target level and fit. In an automated assessment nobody gives hints and there is no credit for partial ideas, so the worked examples in the prompt are the whole specification, and hidden cases decide the score.
What to demonstrate
- On a call: whether you can explain your recent projects clearly to a non-engineer and state the level you are targeting
- On a call: whether your reasons for wanting to work on payroll, benefits and HR software are specific rather than generic
- In an automated assessment: whether your solution handles cases the examples do not show, such as empty input, a single element and boundary values
How to prepare
- Ask the recruiter which format you will get and which languages you can use, then practise in that environment
- Prepare a short walkthrough of your two most recent projects: what was broken, what you changed and what happened after
- For an automated assessment, write a small harness first that runs the worked examples plus an empty case and a boundary case, printing expected against actual output
Live Technical Screen
reportedCandidates describe a live coding session with an engineer, focused on practical problem-solving. Ask your recruiter which editor the session uses, and otherwise practise in a plain browser editor. Treat it as a pairing session: state the input and your assumptions, talk through the approach before typing, and run tests as you go rather than at the end. Reported coding questions (not tied to a specific round) include string processing, a time-based key-value store, parsing structured strings, and filtering and grouping nested data, so those categories make good practice material for this stage.
What to demonstrate
- Whether you clarify input shape and edge cases, such as nulls, empty collections and date boundaries, before writing the main logic
- Whether the code is readable and split into named helpers, with error handling where input can be malformed
- Whether you run your code early and often, and write test cases that catch the edge cases you named
- Whether you take a hint or a bug report calmly and test it against a concrete case
How to prepare
- Practise an interval-merge string problem end to end: find match ranges, merge overlapping and adjacent intervals, then build the output string in one pass
- Implement a timestamped map where each key holds a list of (timestamp, value) pairs and a lookup binary-searches for the largest timestamp at or before the query
- Practise in a plain browser editor, running a small test function after each helper you write
- Have someone point out a bug in your code mid-problem, and practise confirming it with a test before you change anything
Virtual Onsite Loop
reportedCandidates describe the final loop, sometimes called the virtual onsite or Super Day, as several separate sessions: live pair-programming and refactoring "working sessions", a system design and data modeling session, a hiring manager interview about project history, and a Values & Motivations Alignment (VMA) interview. Prepare each session type separately. For the working sessions, practise the reported practical categories (parsing, aggregation, date- and money-based business logic, refactoring under tests); for design, practise the reported design categories with relational modeling first; for the hiring manager and VMA sessions, prepare project and values stories.
What to demonstrate
- In working sessions: whether you can extend or refactor unfamiliar code safely by finding hidden edge cases, avoiding shared-state mutation and keeping existing tests green
- In design: whether you model entities, keys and cardinality before discussing scaling, and whether money flows have retries, idempotency and an audit trail
- With the hiring manager: whether you can walk through a project you owned, the decisions you made and what happened when the plan broke
- In VMA: whether your stories show concrete customer impact, open communication and how you handled feedback
How to prepare
- Take a small class that has tests, add a feature that changes its date or money rules, and practise the refactor without mutating inputs or breaking a test
- For design practice, take the reported shift-scheduling design question and model it as tables first (locations, employees, shifts, schedules, a publish state), then state the one query each index serves
- For money-flow design practice, sketch a payment distribution flow with batches, per-payment status, retries keyed by an idempotency key and an append-only audit log
- Write out stories for ambiguous requirements, a technical disagreement, a trade-off between quality and speed, and a production bug you handled
6 candidate reports. Individual accounts describe a particular role and hiring cycle.
Gusto Software Engineer coding round: hard LeetCode problem and sponsorship constraint
I started with the recruiter and first stage, then moved on to a coding round. The problem felt closer to the hard end of LeetCode than to an easy exercise. I first solved it with a brute-force approach, and after I showed that I understood the core logic, the interviewer pushed me toward an optimal method. I reached an efficient solution and passed the relevant test coverage, so I left feeling t…
Read full experienceGusto Software Engineer interview with timed LeetCode medium assessment
The process felt straightforward and predictable. After applying, I completed an online assessment, followed by a technical interview focused on a LeetCode medium problem. The process then moved toward an offer decision. The online assessment was the difficult part. One question was relatively easy, but after that I essentially had to produce a perfect coding solution without debugging, all withi…
Read full experienceGusto Software Engineer interview with repeated scheduling and communication issues
My biggest problem wasn't the technical difficulty. It was the process itself, especially how scheduling and communication kept falling apart. I had several recruiter interactions go sideways: calls where nobody joined, last-minute reschedules where I was stood up again, and follow-ups that never produced a clear answer. At one point, I even received a generic rejection email without any meaningf…
Read full experienceGusto Software Engineer interview, take-home and pair session
My process felt rigorous and time-heavy. It stood out because it involved more than a single technical screen, with multiple signals being collected. I was surprised by how much effort the interview required overall, including a take-home component, follow-up work, and extended technical work that didn't feel proportional to the compensation. The questions were framed as "real work," but they wer…
Read full experienceGusto Software Engineer interview with a Codesignal GCA-style assessment
After I applied, I moved forward only after completing a Codesignal GCA-style assessment that wasn’t automatic. Once I passed, I had two technical rounds with LeetCode-style questions drawn from the company’s tagged topics. The rounds felt sequential and fairly structured. I solved each problem, reviewed my approach, and moved to the next step after clearing the previous one. After the technical…
Read full experiencePracHub editorial advice for the preparation topics above.
Assuming an isolation level prevents the anomaly you actually have
Isolation levels are named by the SQL standard but implemented differently, so any claim about one is only true of a named engine. PostgreSQL defaults to READ COMMITTED, where every statement takes a fresh snapshot, so two statements inside one transaction can legitimately disagree about the same row. Its REPEATABLE READ is snapshot isolation: it removes non-repeatable and phantom reads but permits write skew, where two transactions each read a set, each conclude their own write is safe, both commit, and the combined result violates a constraint that no single row expresses. Only SERIALIZABLE closes that, and it closes it by aborting a transaction with a serialization failure (SQLSTATE 40001), which means the guarantee is theoretical unless the application has a retry loop. InnoDB's REPEATABLE READ is a different mechanism again - plain SELECTs read a consistent snapshot while locking reads and writes see the latest committed row - so a read-modify-write inside one transaction can act on a value that the transaction's own earlier SELECT never returned.
Letting a slow dependency consume unbounded concurrency
The failure that takes a service down is usually not an error but a delay. A dependency answering in thirty seconds instead of fifty milliseconds holds each request's worker or connection six hundred times longer, and since required concurrency is arrival rate times latency, a fleet sized for sixty in-flight requests now needs thirty-six thousand to sustain the same rate - so it queues, and requests whose clients have already abandoned them still occupy resources. Retries make it precisely worse: a policy of three attempts triples the load on a dependency at the exact moment it is least able to serve, which is how one slow dependency becomes an outage of everything sharing that pool. Containment is four specific things - a timeout on every outbound call shorter than the caller's remaining budget, a bounded pool per dependency so one cannot starve the others, backoff with full jitter rather than a fixed delay so retries do not resynchronise, and a circuit that stops sending once the failure rate makes an attempt pointless.
Quoting amortised or average cost as if it were a worst-case guarantee
Appending to a dynamic array is amortised O(1), but the append that triggers a resize copies every element, and hash lookup is constant only while the hash spreads the actual keys. Say which guarantee you are offering when the caller cares about the latency of one call rather than the total over many.
Treating a network call as though it were a local function call
A remote call can be slow, fail, or return after you stopped waiting, so name the timeout, the retry policy, and what the caller sees while the dependency is down. A call with no timeout turns one slow dependency into an exhausted thread or connection pool in every service upstream of it.
Choose a category, try a prompt, then open its approach, worked solution or follow-up when you need it.
Time-Based Key-Value Store: Design a key-value data structure that can…
Time-Based Key-Value Store: Design a key-value data structure that can store multiple values for the same key at different timestamps and retrieve a key's value at a given timestamp.
Approach
- Name the brute-force solution and its complexity before improving on it.
- Restate the input: its shape, its size, and what is guaranteed about it.
- Walk one small example through your approach before writing the whole thing.
Follow-up
- How does this change if the input no longer fits in memory?
- Which test case would catch an off-by-one here?
Array & Hashmap Manipulation: Filter, sort, and aggregate multi-nested…
Array & Hashmap Manipulation: Filter, sort, and aggregate multi-nested data structures to group relational entity attributes based on runtime criteria.
Approach
- Name the brute-force solution and its complexity before improving on it.
- Restate the input: its shape, its size, and what is guaranteed about it.
- Walk one small example through your approach before writing the whole thing.
Follow-up
- What is the worst case, and how likely is it on real data?
- Which test case would catch an off-by-one here?
Integer to English Words: Convert a non-negative integer into its Engl…
Integer to English Words: Convert a non-negative integer into its English words representation (e.g., standard numeric parsing up to billions, handling scale words and spacing carefully).
Approach
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- Restate the input: its shape, its size, and what is guaranteed about it.
Follow-up
- Which test case would catch an off-by-one here?
- What is the worst case, and how likely is it on real data?
Embolden String / Remove Bold Tag: Given a string and a list of substr…
Embolden String / Remove Bold Tag: Given a string and a list of substrings, add bold formatting tags around matching sub-patterns, efficiently merging overlapping ranges.
Approach
- State the target complexity and say which constraint rules the naive version out.
- 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.
Follow-up
- What is the worst case, and how likely is it on real data?
- How does this change if the input no longer fits in memory?
Track a rolling failure rate per destination for circuit decisions
The egress service delivers about 1,500 webhooks per second across roughly 40,000 destinations, each call bounded by a 10 second timeout. Maintain, per destination, the failure rate over the trailing 60 seconds so a caller can ask before dispatch whether the circuit should open. Attempts arrive as (destination_id, finished_at_ms, outcome). Requirement: amortised O(1) per attempt, with total memory bounded by the destination count rather than by traffic. Give the structure, its exact memory, and the rule that stops a destination with three attempts from opening a circuit.
Approach
- Name the exact-deque version and then reject it as the default. Holding timestamps and advancing a tail pointer past anything older than now minus 60 seconds is a correct two-pointer window at amortised O(1) per attempt, but its memory tracks in-window traffic, so one destination in a retry storm holds hundreds of thousands of entries while thousands of quiet destinations hold none.
- Use a ring of 60 one-second buckets per destination, each bucket a pair of counters for attempts and failures. On an attempt, advance the ring by the elapsed whole seconds, zeroing at most min(elapsed, 60) buckets, then increment the head. That is amortised O(1) with a fixed footprint per destination.
- State the footprint: 60 buckets times two 4-byte counters is 480 bytes of payload per destination, so 40,000 destinations is roughly 20 to 25 MB with per-entry overhead, bounded by the catalogue rather than by the rate. The cost is granularity, since the oldest bucket ages out in whole seconds, which is far tighter than the decision needs.
- Require a minimum sample before the circuit may open. A destination with three attempts and three failures reads as 100 percent and is not evidence; a floor of roughly 20 attempts in the window makes the ratio meaningful, and below that floor use a run of consecutive failures as the trigger instead.
- Expire idle destinations, or memory grows with every destination ever seen rather than with the live set. Hold the rings in a bounded LRU keyed on destination_id and treat a miss as no history, which is the correct default for an endpoint that has been silent for a minute.
- Keep the half-open probe out of the window arithmetic. After the circuit opens, one probe per interval decides whether to close it, and folding that single success into a window that still holds a 100 percent failure history would reopen the destination on one data point.
Worked solution 20 min
- Define the bucket struct and the advance step: take floor(finished_at_ms / 1000), compare with the ring's current second, zero min(delta, 60) buckets forward, then write into the new head.
- Trace a destination that receives 5 attempts, goes silent for 90 seconds, then receives one more, and confirm the rate is computed from one attempt rather than six.
- Compute total memory for 40,000 destinations at 60 buckets of two 4-byte counters, and state what changes if the window widens to 300 seconds.
- Write the open rule as a single predicate combining the minimum-attempt floor with the rate threshold.
Follow-up
- The fleet is 30 instances and each sees roughly a thirtieth of a destination's traffic. Where does the rate actually live, and what does a per-instance answer get wrong?
- A destination answers in 9.5 seconds and succeeds. It is not failing but it is consuming your per-destination concurrency. What signal should open the circuit here?
- How would you make the window survive a process restart, and is it worth the cost?
Keep soft-deleted accounts from blocking re-registration
app_user holds user_id, tenant_id, email CITEXT, password_hash (NULL for SSO principals), email_verified_at, auth_version, status ('invited','active','suspended','deactivated'), created_at, updated_at, deleted_at. Two live accounts for one address inside a tenant must be impossible, but an address freed by a soft delete must be reusable, and the same tenant may delete and re-register it repeatedly. Write the uniqueness DDL for PostgreSQL 16, then the equivalent for MySQL 8 where partial indexes do not exist, and say what each permits once three deleted rows already hold that address.
Approach
- Start from what is actually unique: not (tenant_id, email), but (tenant_id, email) among live rows. PostgreSQL says that directly — CREATE UNIQUE INDEX app_user_live_email ON app_user (tenant_id, email) WHERE deleted_at IS NULL. A full constraint over the same two columns burns the address permanently the first time someone deletes an account.
- Keep case-insensitivity in the type or the index, never in the application: CITEXT as given, or UNIQUE (tenant_id, lower(email)) as an expression index where the extension is unavailable. A case-sensitive unique column is exactly how two accounts for one human appear.
- For MySQL 8 the predicate has to move inside the key: add a discriminator column that is a constant 0 while the row is live and is set to user_id on delete, with UNIQUE (tenant_id, email, deleted_marker). Live rows share the constant and still collide; deleted rows differ from each other and stop colliding.
- State the NULL variant and its dependency: leaving the marker NULL for deleted rows also works, because a unique index treats NULLs as distinct — true in MySQL, and true in PostgreSQL only under the default NULLS DISTINCT, which PostgreSQL 15 lets you reverse. Check the polarity against the three existing deleted rows: constant-on-live is what preserves the collision you want, and reversing it silently admits duplicate live accounts.
- Say what a soft delete must do besides setting deleted_at: increment auth_version so existing tokens stop validating, leave resource.owner_user_id and resource_revision.actor_user_id intact, and accept that the address is retained — erasure is a different requirement answered by scrubbing the column, not by a DELETE that would break those references.
Follow-up
- A deleted account re-registers with the same address the next day. Do the old resource rows follow the new user_id, and how does the API keep the two principals apart?
- How do you honour an erasure request while resource_revision.actor_user_id still references this table?
- What changes if a user may hold membership in two tenants?
Find version gaps and relay lag with window functions
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.
- Interpret rather than report: no gaps plus a normal p95 of published_at - created_at points at the consumer; gaps or a fat lag tail point at the relay; rows still 'pending' with attempts > 0 point at neither, because they never left the database.
- Be explicit that the partial index on (created_at, event_id) WHERE status = 'pending' does not serve any of these — they read published rows. Name the index a recurring monitor would need, and say why a query run twice a year may not deserve one.
Worked solution 30 min
- Write the three queries against seven days of data and confirm each returns without error.
- In a scratch copy, delete one middle event for a single aggregate and confirm the gap query names that aggregate and the versions either side.
- Run a running total over ungrouped rows ordered by date_trunc('second', created_at), once with the default frame and once with ROWS, and record where the two series diverge.
- Compare the DISTINCT ON and row_number() plans on the same data and record rows-read for each.
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?
- The consumer claims it never received event 4,812,006. What do you look at, in what order?
Live Refactoring & Bug Fixing: Extend an existing codebase by identify…
Live Refactoring & Bug Fixing: Extend an existing codebase by identifying hidden edge cases, refactoring brittle class boundaries, and ensuring test coverage passes without breaking current functionality.
Approach
- Clarify what is being asked and what a complete answer contains.
- Say what you would check first and why it is the highest-information step.
- State your assumptions explicitly before working the problem.
Follow-up
- What assumption would you test first?
- How would you know your answer was wrong?
Payroll & Tax Rules Processing: Implement domain logic that calculates…
Payroll & Tax Rules Processing: Implement domain logic that calculates net pay or benefits deductions based on varying date ranges, handling edge cases such as leap years, object mutation, and partial pay periods.
Approach
- Work from the requirement backwards to the design.
- Say what you would check first and why it is the highest-information step.
- Clarify what is being asked and what a complete answer contains.
Follow-up
- How would you know your answer was wrong?
- What assumption would you test first?
Make the resource write endpoint safe for retrying clients
The edge API accepts POST /v1/resources at 1.2k writes/second peak under a 400 ms p99 budget, and clients retry on timeout. idempotency_key has PRIMARY KEY (tenant_id, idempotency_key) plus request_fingerprint CHAR(64), state in ('in_flight','succeeded','failed'), response_status, response_body, resource_id, locked_until and expires_at. Specify the exact sequence the handler runs: what the second request does when it arrives while the first is still executing, what a retry carrying a different body receives, what happens when a process dies mid-request, and how the table is kept from growing without bound.
Approach
- Start from the race rather than the happy path. Insert the key row first, in its own short transaction, with state 'in_flight' and locked_until set to now() plus the request deadline. The unique constraint on (tenant_id, idempotency_key) is the arbitration mechanism: exactly one caller commits the insert, and every other caller takes a unique violation (SQLSTATE 23505) and becomes a follower. Reading the table and then inserting is a check-then-act race that both callers pass, and they pass it most often under the load that generates the retries.
- Give the follower a branch for every state it can observe, with no fall-through to doing the work: fingerprint mismatch means the key is being reused for a different request, so reject with 422 and never replay the stored response; 'succeeded' replays response_status and response_body verbatim; 'failed' allows a fresh attempt; 'in_flight' with locked_until in the future is answered with 409 and a retry hint, or a short bounded wait, because the only alternative is executing the effect twice.
- Commit the effect and the record of the effect together. The resource insert, its resource_revision row, its outbox_event row and the transition of the key row to 'succeeded' all happen in one transaction, so no crash can leave the work done and the key still 'in_flight'. The earlier insert is deliberately a separate transaction: it has to be visible to a concurrent caller before the work starts, which an uncommitted row is not.
- Close the wedged-key path. A process that dies after the insert leaves a row that would otherwise block that key forever, which is what locked_until exists for. Reclaim with a single conditional statement, UPDATE ... SET state='in_flight', locked_until=now()+interval WHERE ... AND state='in_flight' AND locked_until < now(), and treat a zero rowcount as losing the reclaim. Two statements that read and then update reintroduce the original race one layer down.
- Size the retention before it becomes an incident. At the 1.2k/second peak a 24-hour window is on the order of 100 million rows, and the table grows with traffic rather than with data, so the sweep is load-bearing. Batched deletes driven by an index on expires_at keep it bounded. Range-partitioning by day and dropping whole partitions is cheaper, but PostgreSQL requires every partition-key column to appear in the primary key, so the key becomes (tenant_id, idempotency_key, created_at) and a retry that straddles the boundary no longer collides with its original. State that cost rather than meeting it later.
Worked solution 20 min
- Draw a timeline with the retry arriving 150 ms into a 900 ms first attempt, and mark the instant each row becomes visible to the other transaction.
- Write the insert-first statement, then a five-row branch table for the follower: fingerprint mismatch, 'succeeded', 'failed', live 'in_flight', expired 'in_flight' - one action each.
- Write the single conditional UPDATE that reclaims an expired in_flight row, and argue why two concurrent reclaimers cannot both see a non-zero rowcount.
- Compute rows per day at peak, name the index the sweep uses, and check the sweep rate against the insert rate.
Follow-up
- The stored response body averages 200 KB and this table is now the largest in the database. What do you store instead, and what does a replay return once the body has been pruned?
- A client library generates a fresh idempotency key on every attempt. What breaks, which layer should have caught it, and does the server have any defence?
- The first attempt succeeded but its response was lost, and the client retries 30 hours later, after the key expired. What does the second attempt do, and is that acceptable?
Every query on one table stalls for forty seconds mid-deploy
During a release on PostgreSQL, every query touching resource times out for about 40 seconds and then recovers with no intervention. The release ran one migration, ALTER TABLE resource ADD COLUMN archived_reason TEXT, and the migration log shows it completing in 6 ms. Unrelated tables showed no change in error rate. Explain how a 6 ms statement caused a 40-second stall, give the ordered checks you would run on a live system to confirm it, and give the migration procedure that prevents a repeat.
Approach
- Separate the statement's duration from the lock's duration. ADD COLUMN with no default is a catalogue-only change and genuinely runs in milliseconds, but it requires ACCESS EXCLUSIVE, and it cannot acquire that until every transaction already touching the table has finished.
- Account for the queueing, which is the part that surprises people. A lock request that is waiting blocks later requests for conflicting modes behind it rather than letting them overtake, so one long-open transaction holds the DDL and the DDL holds all the traffic. The stall length is set by the longest open transaction, not by the size of the change.
- Confirm on a live system in this order: pg_stat_activity for that table ordered by xact_start, looking for the oldest transaction and specifically for state = idle in transaction; then pg_locks where granted = false to find the waiter; then join them on pid to name blocker and blocked. pg_blocking_pids() does that join for you and is the fastest single call.
- Prevent rather than merely time it better. Set lock_timeout to a second or two on the migration session so the DDL abandons the queue after a bounded wait and is retried, instead of holding it for as long as the oldest transaction lives. Be exact about what that buys: queries arriving during the wait still queue behind the pending ACCESS EXCLUSIVE request, so each attempt costs them up to one lock_timeout of added latency. The outage goes from 40 seconds to about one second per attempt, not to zero. Also run migrations away from deploy-time peaks, and put a statement timeout and an idle-in-transaction timeout on the analytics role that opens the long transactions.
- Know the lock each change takes, since the mitigation differs by change. A column with a non-volatile default is a metadata-only change from PostgreSQL 11 and still needs the brief ACCESS EXCLUSIVE; an index needs CREATE INDEX CONCURRENTLY, which cannot run inside a transaction block and leaves an INVALID index to drop if it fails; a check or foreign key is added NOT VALID and then VALIDATE CONSTRAINT as a separate statement under a weaker lock.
Follow-up
- The same release also wants NOT NULL on that column. What is the sequence that gets there without a long lock?
- Your lock_timeout retry fails ten times in a row because the analytics transaction is always open. What do you change?
- How does this differ on MySQL with InnoDB online DDL, and what is the equivalent of the waiting-lock queue there?
For a candidate senior enough that the loop turns on design and judgement rather than on whether the coding round gets finished. Five days build one system properly and then stress it; coding gets a single maintenance day, on the assumption that the risk at this level is an unexamined tradeoff rather than a missed algorithm.
Prepare, practise & reflect
One practical outcome each day. Spend longer where you need it.
0 / 7 done01Numbers before diagrams
- Build your own reference card of the figures you will re-derive all week: bytes for a realistic record, requests per second implied by a given daily active count, and the storage that a year at a given write rate produces. Derive each one rather than copying it, because the derivation is what survives a follow-up.
- Turn one product statement into capacity requirements. From ten million daily users at four writes and forty reads each, state the peak-to-average factor you are assuming and why, then produce peak write QPS, peak read QPS and a year of storage.
- Write the two numbers whose order of magnitude changes the design, the read-to-write ratio and the working-set size against memory per node, and state the threshold at which each one flips your answer.
Deliverable: A one-page numbers card and one worked capacity estimate with every assumption written down.
Practice prompt ↗Practice prompt ↗Worked solution ↗02One system, from requirements to schema
- Spend the first ten minutes producing only functional requirements, non-functional targets with numbers attached, a p99 latency, a durability expectation, a consistency requirement, and an explicit out-of-scope list.
- Define the interface before the boxes: the three or four endpoints, their parameters, what each returns, and which of them are idempotent.
- Write the data model, then write the single access pattern that justifies it, and state what the schema would have to become if the dominant access pattern were the other one.
Deliverable: One design carried to endpoint-and-schema depth, with non-functional targets expressed as numbers and a written out-of-scope list.
Practice prompt ↗Practice prompt ↗03The consistency you are actually buying
- Write out what a client sees under asynchronous replication when its write commits on the leader and its next read is served by a lagging follower, then write the two fixes, pinning that session's reads to the leader for a bounded window or carrying a version token the replica must reach, and the cost of each.
- Work the quorum arithmetic on paper for N of three with W and R of two, and separate what R + W > N does guarantee, that any read set intersects any write set, from what it does not: on its own it is not linearizability, and a sloppy quorum that accepts writes on nodes outside the preference list breaks even the intersection.
- Take two storage choices with different defaults, a single-leader relational store committing synchronously and a quorum-replicated store that converges eventually, and write the specific product behaviour that would be wrong under each, rather than a general statement about which is stronger.
Deliverable: A page separating what quorum overlap guarantees from what it does not, with one concrete product misbehaviour attached to each gap.
Practice prompt ↗Practice prompt ↗04Failure is the design
- For one write path, work through the case where the client times out after the server has already committed, then design the idempotency key: who generates it, how long it is retained, and what the duplicate request returns.
- Express the retry policy as parameters rather than as a word: maximum attempts, base delay, backoff factor, jitter, and which error classes are retried at all. Then state why retrying a non-idempotent write without a key is a correctness bug and not merely waste.
- Compute the fan-out effect on tail latency. If a request waits on ten backends and each independently exceeds its p99 one percent of the time, the chance at least one is slow is 1 - 0.99^10, about ten percent. Then write why independence is the optimistic assumption and what correlates them in practice.
- Name the backpressure mechanism for one queue or one dependency in the design, a bounded queue with shedding or a concurrency limit, and write what the caller is told when it engages.
Deliverable: One write path with an idempotency design, a parameterised retry policy, and a written tail-latency calculation with its assumption named.
Practice prompt ↗Practice prompt ↗Worked solution ↗05Scaling the hot path
- Choose cache-aside or write-through for one read path and write the staleness window each produces, then name the invalidation event and what the system does when that event is lost.
- Design against the stampede: either coalesce requests so only one recomputes a missing key, or refresh early with jittered expiry, and write why identical TTLs on keys populated in the same moment produce a synchronised expiry and a thundering herd.
- Shard one table by a key you choose, then answer the two questions that break the choice: which queries now require a scatter-gather, and what happens to the distribution when one tenant is a hundred times larger than the median.
- Write the cost of adding a node under plain modulo placement, where nearly every key moves, against consistent hashing, where roughly one key in n+1 moves, and state what virtual nodes are for.
Deliverable: A caching and sharding decision for one path, each with its failure mode and its rebalancing cost written beside it.
Practice prompt ↗Practice prompt ↗06Keep the coding hand in, at the bar that applies to you
- Solve one medium problem in thirty minutes, then spend twenty more making it production-shaped: named invariants, validation at the boundary, and errors that distinguish a caller mistake from an internal fault.
- Write the tests you would require of a colleague's version of that function: one for empty input, one for the boundary, and one for the case the implementation is most likely to get wrong.
- Read a piece of your own code from six months ago and write the change you would ask for, phrased as you would actually phrase it in review.
Deliverable: One problem hardened to review standard, with its test list and one written review comment.
Practice prompt ↗Practice prompt ↗07Defend it while being interrupted
- Run a forty-five-minute design mock with an interviewer briefed to change a requirement halfway, a tenfold traffic increase or a new strict consistency requirement, and to push on one number you estimated.
- Rehearse the two sentences a senior loop is listening for: naming the tradeoff you are choosing against and why, and saying what you would measure to learn that the choice was wrong.
- Prepare the design you regret: a real decision, the constraint that produced it, what it cost, and what you changed afterwards.
Deliverable: Mock notes recording how the design changed under the new requirement, plus a written account of one regretted decision.
Practice prompt ↗Practice prompt ↗Worked solution ↗Expand any day for tasks and deliverables. Your progress is saved on this device.
A slipped date is only a bad story if you sat on it. What matters is what you believed when you gave the number, the signal that told you it was wrong, how many days passed before you said so, and what you cut rather than asking for more time. Scope you defended counts as much as scope you dropped.
Handling Technical Disagreements: Tell me about a time you disagreed w…
Handling Technical Disagreements: Tell me about a time you disagreed with a teammate or senior engineer on an architectural design choice. How did you resolve it?
Approach
- Give the blast radius: what could have broken, and what you measured.
- Close with what you would do differently, concretely.
- Pick a story where you made the decision, not one where you watched it.
Follow-up
- How did you know your change caused the improvement?
- What would you do differently if you ran that again?
Demonstrating Customer Empathy: How do you incorporate the end-user's …
Demonstrating Customer Empathy: How do you incorporate the end-user's perspective into your engineering design decisions and daily coding practices?
Approach
- Pick a story where you made the decision, not one where you watched it.
- Give the blast radius: what could have broken, and what you measured.
- Close with what you would do differently, concretely.
Follow-up
- What would you do differently if you ran that again?
- What did you decide not to do, and why?
Argue against a design, lose, and commit anyway
Describe a design you argued against and lost. State the failure you predicted as a named mechanism, not a feeling about complexity: two services that would need one transaction, a projection with no rebuild path, a write path with no idempotency key. Say what evidence you brought, what the decision maker weighed instead, and what you did after the decision was made: what you instrumented, what you wrote down, and whether the prediction came true. Five minutes.
Approach
- State the prediction in falsifiable form up front: the mechanism, the condition that triggers it, and the observable outcome. A prediction that cannot be checked also cannot be credited to you later.
- Show the evidence you had at the time and label each piece honestly as measured, analogous, or intuition. Keeping the intuition is fine; disguising it as data is the thing that erodes your standing in the next argument.
- Represent the opposing case at full strength, including the constraint you did not control: a fixed date, a team boundary, or the fact that the decision was cheap to reverse and yours was not.
- Make disagree-and-commit concrete. Name the artefact you left behind so the prediction could be settled without you: the alert and its threshold, the counter on the dashboard, the decision note that recorded the trade-off and the condition that would revisit it.
- Report the outcome without editing it. If the design held and your predicted mechanism never fired, say so and say what you had mis-weighted, which is more persuasive than a vindication story.
Follow-up
- What threshold on that alert would have proved you right, and did anyone ever look at it?
- If the same proposal arrived tomorrow with the same deadline, would you argue it the same way?
- How did you behave toward the design once it shipped and started failing in a different way than you predicted?
- 01
Handling Technical Disagreements: Tell me about a time you disagreed with a teammate or senior engineer on an architectural design choice. How did you resolve it?
- 02
Demonstrating Customer Empathy: How do you incorporate the end-user's perspective into your engineering design decisions and daily coding practices?
- 03
Describe a design you argued against and lost. State the failure you predicted as a named mechanism, not a feeling about complexity: two services that would need one transaction, a projection with no rebuild path, a write path with no idempotency key. Say what evidence you brought, what the decision maker weighed instead, and what you did after the decision was made: what you instrumented, what you wrote down, and whether the prediction came true. Five minutes.
Is this an official Gusto interview guide?
No. It is PracHub's own research and practice material for the Software Engineer role at Gusto. Rounds and questions reflect what candidates have reported, not a process Gusto has published, and they change over time. Confirm the current format and scope with your recruiter.
PracHub interview research ↗What programming language can I use during the technical interviews?
You are generally free to use whichever standard programming language you are most comfortable with (such as Ruby, Python, Java, C++, or JavaScript). However, because Gusto relies heavily on Ruby on Rails internally, demonstrating familiarity with dynamic languages or modern web frameworks can be additive.
PracHub interview research ↗How are pair programming sessions conducted?
Live technical sessions are conducted via collaborative web tools like CoderPad or CodeSignal. Interviewers expect active communication: state your assumptions, outline your approach before coding, ask clarifying questions about domain requirements, and write executable test cases to validate your solution.
PracHub interview research ↗How important is the Values & Motivations Alignment (VMA) interview?
The VMA interview is a critical milestone in the hiring process. Gusto takes company culture and core values very seriously. Candidates who pass all technical screens can still be rejected if they fail to demonstrate alignment with values such as transparent communication, customer empathy, and collaborative humility.
PracHub interview research ↗How long does the entire interview process take from start to finish?
The typical pipeline takes between 2 to 4 weeks depending on scheduling availability. The recruiter screen and initial technical assessment are usually completed within the first 1–2 weeks, followed by the virtual onsite loop shortly thereafter.
PracHub interview research ↗Sources & methodology 3 sources ↗
Official role evidence, timestamped platform data and clearly labeled preparation advice.
- 01PracHub interview research ↗
PracHub editorial research into this company and role, maintained with this guide. Candidate-reported, not an employer publication.
platform · Accessed 2026-09-24 - 02PracHub Software Engineer practice ↗
Cross-company practice questions for this role.
platform · Accessed 2026-09-24 - 03PracHub interview preparation framework ↗
The framework the preparation plan follows.
platform · Accessed 2026-09-24