Interview guides · Atomus
Atomus Software Engineer Interview Guide
Atomus Software Engineer interview guide: five reported rounds, ten reported questions with answer plans, behavioral prep and a seven-day study plan.
The 60-second brief
Atomus is an early-stage company building software for cybersecurity compliance. Candidates name hypersonic aircraft manufacturers, satellite operators and AI firms among the organisations the product serves. The applications run on Windows, macOS and Ubuntu, with cloud backend engines on Azure and GCP and customer-facing web platforms in NextJS and TypeScript. The key responsibilities candidates describe name Go, TypeScript and Postgres for the backend engines, plus debugging of the desktop agents. An engineer in this role works directly with the co-founders and the customer success team, and also helps shape engineering and product processes as the company grows.
This guide is for engineers preparing for the Software Engineer loop at Atomus. The requirements candidates describe list 7+ years of full-time SaaS or desktop application development, NextJS, TypeScript, Postgres, a cloud platform such as Azure, and knowledge of OS internals and CI/CD, with security or compliance products and cross-platform agents as a plus. They also state that the role is in the office in downtown San Francisco five days a week. The guide covers the five reported stages, the ten reported questions with answer plans, behavioral preparation and a seven-day schedule.
Candidates report five stages over roughly four to six weeks: a Phone Screen, a Project Submission, a Behavioral Interview with a founder built on that project, a Technical Coding Session and a Low-Level Design Interview that is described as potential rather than certain.
Focus areas
- Cybersecurity
- Security Compliance
- NextJS
Overview
The work spans several layers, and the reported questions follow that spread. Candidates describe backend engines in Go, TypeScript and Postgres on Azure and GCP, desktop agents for Windows, macOS and Ubuntu, and a NextJS web front end. The technical questions ask how to architect a secure multiplatform agent, how to choose between Azure and GCP for high-compliance infrastructure, how to scale Postgres for a busy SaaS platform, how to keep security-first habits when deploying quickly, and what CI/CD experience in a regulated setting looks like. Prepare one end-to-end system that you can walk through from endpoint to database to web view, with the reasons behind each choice.
The loop is built around your own work. Candidates report a project presentation or documentation that is reviewed and then feeds a conversation with a founder, followed by a live coding session and a possible low-level design interview. Because the submission shapes the founder conversation, choose the project early and rehearse the reasoning: what you picked, what you rejected, how it behaved under load, what you would redo. Candidates say the "why" behind architectural decisions matters as much as the "how".
Two example scenarios are reported for the design side: tracking compliance across a distributed network of thousands of endpoints, and handling a major security vulnerability in an existing production codebase. No coding problems are reported for the live session, so rely on fundamentals in the language you are fastest in.
The alignment questions are more specific than usual. Candidates report being asked about interest in the defense and aerospace space, support for the mission of the US military or critical national infrastructure, and readiness to work in person in downtown San Francisco. They also describe a process that can feel informal or intense depending on the interviewer. Answer the alignment questions directly and with evidence, and prepare an opening outline of your background so that you can move a slow conversation forward.
The Atomus interview process
Candidates describe five stages, and they describe the last one, the Low-Level Design Interview, as potential. What follows is what candidates report, not a published schedule.
Phone Screen
Candidates describe the opening call as a conversation to establish baseline alignment, and report no technical format for it. Use it to show that your background matches the stack the role lists and that the logistics work, since the requirements candidates describe include being in the office five days a week in downtown San Francisco.
What to demonstrate
- Baseline alignment between your background and the role, which is how candidates describe the call
- Your reasons for wanting this company and the cybersecurity compliance space
- Fit with the in-office requirement candidates describe
How to prepare
- Prepare a short career walkthrough that surfaces the stack the role lists: Go, TypeScript, Postgres, NextJS, a cloud platform and any desktop or cross-platform agent work.
- Write direct answers to the cybersecurity-interest and in-person questions before the call so you do not improvise them.
- Ask which stages follow and what the project submission should contain, since candidates describe it only as a presentation or documentation.
Project Submission
Candidates report submitting a project presentation or documentation for review, and the later founder conversation is built on it. Nothing is reported about which project to choose or how long the submission should be, so ask during the phone screen. Pick work where you made real architectural decisions and can name the alternatives you rejected.
What to demonstrate
- How clearly you explain the design and impact of a past project
- The reasoning behind your tool and architecture choices, a theme candidates report across the loop
- Whether the submission gives the founder conversation concrete decisions to discuss
How to prepare
- Structure the submission as problem, constraints, architecture, two or three decisions with the alternatives you rejected, security considerations, outcome and what you would change.
- Prefer a project that touches the listed stack: Postgres under load, a cloud deployment, a CI/CD pipeline or a client-side agent. Remove any confidential material you cannot share.
- Rehearse a walkthrough you can give without slides, because the follow-up conversation can wander away from your structure.
Behavioral Interview
Candidates describe a discussion with a founder that starts from your submitted project. They also report that founders take part directly in technical vetting and that the conversation can feel informal or intense, and one tip they give is to take the lead with an outline of your background if things start slowly. The behavioral and alignment questions (ambiguity, pressure, interest in defense and aerospace, in-person work, mission) are the question type to rehearse for a conversation like this.
What to demonstrate
- Technical storytelling: explaining the impact of your previous work, a theme candidates report
- Ambiguity management: how you define tasks when requirements are unclear
- Alignment with the mission and the in-person operating model candidates describe
How to prepare
- Map each behavioral prompt on this page to one real story with a decision, a trade-off and a result you can state.
- Prepare project questions you can answer in depth: why this database or cloud service over another, what failed, what you would change, how security shaped the design.
- Write a short opening outline of your background to use if the conversation starts slowly.
Technical Coding Session
Candidates describe a live coding session to assess technical skills. No language, problem set or platform is reported, so prepare broadly. The requirements candidates describe stress turning a large, loosely specified problem into secure, performant code, so practise stating assumptions and edge cases before you write.
What to demonstrate
- Working code produced live, which any live coding stage tests
- How you clarify and decompose a vague problem
- How clearly you communicate your thought process while coding
How to prepare
- Choose the language you are fastest in; Go and TypeScript are the two the role names. Practise writing code with its tests in one sitting.
- Practise narrating: assumptions first, then approach, then code, then a walk through edge cases such as empty input, duplicates and very large inputs.
Low-Level Design Interview
Candidates describe the Low-Level Design Interview as a potential stage, not a certain one, focused on design aspects of software engineering. No problem is reported, so prepare to design at the code level: modules, interfaces, data model, failure handling and tests.
What to demonstrate
- Design thinking at the module and class level, the reported focus of the stage
- How you justify structure and tool choices, including their effect on long-term maintenance, a theme candidates report
How to prepare
- Take a subject from the loop, such as a cross-platform endpoint agent, and write a module outline: interfaces, per-OS adapters, local state, error paths and how you would test each part.
- For every structural choice, prepare a one-sentence reason and a sentence on what would make it hard to change later.
- Rehearse the idea of a design that you can extend without rewriting it, and be ready to name where it would bend first.
Where candidates lose points
Submitting a project write-up that lists features but no decisions
The founder conversation is built on the submission, so structure it around constraints, the options you weighed, why you chose one, the security considerations and the outcome. Add what you would change, so there is something to discuss.
Answering the Azure versus GCP question with a brand preference or a feature checklist
Start from requirements for a high-compliance workload: data residency, identity integration, the compliance programmes and government-oriented offerings each provider documents, team skills and existing tooling. Say you would verify current attestations in each provider's own documentation before committing.
Presenting security-first and ship-fast as opposites, or claiming you never trade one off
Show how checks run inside the pipeline so they cost little: dependency and secret scanning, required reviews, signed artifacts. Then name what you would hold firm on and what you would defer under a deadline.
Hedging on the in-person and mission questions
Give the answer in the first sentence, then the evidence. Candidates describe a five-day on-site requirement and direct alignment questions, so unclear answers cost more here than elsewhere.
Waiting for the interviewer to drive in a loop candidates describe as informal or uneven
Keep a short opening outline of your background and two clarifying questions about the role ready for each stage. In the coding session, state assumptions and edge cases aloud before writing code so the conversation has direction even if the prompt is thin.
Questions & practice
Identify the heaviest tenants in a five-minute window under memory pressure
Medium · top-k · heavy hitters · streaming
The edge service handles about 3,000 requests per second across roughly 50,000 tenants, peaking near 9,000. Expose the 50 heaviest tenants by request count over the trailing five minutes so limits can be tightened before one tenant's backfill starves the fleet. You may not retain five minutes of raw records. Give the exact solution and its memory, then the bounded-memory approximation with its error stated as a formula, and say which you would ship and at what tenant cardinality that choice changes.
Approach
- Do the exact version first, because it is affordable at this cardinality: a ring of 300 one-second counters per tenant, advanced lazily, is 1,200 bytes of counters per tenant and roughly 60 to 90 MB for 50,000 tenants with overhead. Carry a running total and subtract the bucket you overwrite so a window read is O(1) rather than 300 adds.
- Extract the top 50 with a size-k min-heap over the tenant sums: O(d log k) for d tenants, against O(d log d) to sort them all. Maintaining the heap continuously instead of on query requires a tenant-to-heap-index map, because incrementing a count already inside the heap means sifting from a known position, and without that map you rebuild the heap on every request.
- State the approximation precisely rather than gesturing at sketches. Misra-Gries with m counters retains every item whose true count exceeds N/(m+1), and each retained count underestimates the truth by at most N/(m+1). With m = 1,000 and N = 900,000 requests in the window the error is roughly 900 requests, which is fine for spotting a tenant sending 50,000 and useless for ranking two tenants 200 apart.
- Say what breaks when the window slides: Misra-Gries and Space-Saving are insert-only and cannot be decremented as records age out. The workable construction is one summary per sub-window, say ten seconds, with 30 summaries merged at query time, and the merged error is the sum of the per-summary errors, so the bound degrades linearly in the number of sub-windows.
Follow-up
- The heaviest tenant is heavy because of one export job rather than user traffic. Should the limiter treat those as the same tenant?
- Two tenants sit tied at the boundary of the top 50. Does your answer flap, and does the flapping matter?
Canonicalise a request body into a stable idempotency fingerprint
Medium · parsing · canonicalisation · hashing
idempotency_key.request_fingerprint is a SHA-256 over the method, path and canonicalised body, and a retry whose fingerprint differs must be rejected with 422 rather than served the stored response. Write the canonicaliser. Bodies are JSON up to 256 KB nested at most 32 levels; clients vary key order, whitespace and unicode escaping, and some send 64-bit ids as JSON numbers. Produce a deterministic byte string such that semantically identical bodies match and any semantic difference does not. State your complexity and name two normalisations you refuse to perform.
Approach
- Parse once into a tree, then re-serialise under fixed rules: object keys sorted, array order preserved, one escaping convention, no insignificant whitespace. Parsing is O(n) and sorting keys is O(k log k) per object, so O(n log n) overall with O(depth) stack, and the 32-level cap is enforced during parsing because hostile nesting is how a canonicaliser becomes a stack overflow.
- Sort keys by their UTF-8 bytes and say why the obvious implementation is wrong in some runtimes: a default string comparison that orders by UTF-16 code units places surrogate pairs, meaning code points from U+10000 up, below U+E000 to U+FFFF, which is not UTF-8 byte order, so two services written in different languages disagree on the same document.
- Do not re-encode numbers through a double. IEEE-754 binary64 represents integers exactly only up to 2^53, so normalising a 19-digit id through a float changes it, and 1 against 1.0 cannot be reconciled without deciding whether they are the same value. Preserve the literal token, and require ids as strings at the API boundary if you want them comparable.
- Reject duplicate keys rather than picking one. JSON permits them and parsers disagree, most keeping the last, so any choice you make ties the fingerprint to a parser detail that the code handling the request does not necessarily share.
Follow-up
- A client sends the same logical request with an extra field your API ignores. Same key, different fingerprint, so you return 422. Is that the right answer?
- Where does the fingerprint get computed relative to request decompression and the body-size limit?
Archive a resource graph without breaking live references or recursing
Medium · graph traversal · topological order · tenant isolation
Resources reference other resources within a tenant; for the largest tenant the reference table holds up to 2,000,000 nodes and 8,000,000 edges. Archiving a resource must archive everything reachable from it that nothing outside the set still references, refuse when a live external referrer exists, and terminate when references form cycles, which they legitimately do. Produce the archive order and the refusal list, targeting O(V+E). Say what stops the traversal crossing a tenant boundary, and why recursion is the wrong control structure at this size.
Approach
- Load the subgraph with the tenant predicate on both endpoints of the edge, not only on the side you started from. Scoping the left table alone is the classic cross-tenant leak: one mis-entered edge then pulls another tenant's resources into the traversal and, worse, into the archive.
- Traverse iteratively with an explicit stack. A 2,000,000-node graph can hold a chain deep enough to exhaust a native stack in the low tens of thousands of frames, and that failure is a process crash rather than an error you can return.
- Treat cycles as data rather than corruption: compute strongly connected components with Tarjan in O(V+E) using its own explicit stack, then condense. The condensation is a DAG, so a topological order over it gives the archive order, and every member of a component archives in one transaction because no order within a cycle is valid.
- Decide refusals with reverse edges. A candidate is archivable only if every in-edge originates inside the candidate set, so build the transpose or count in-degrees restricted to the visited set, and emit each blocked resource with the id of the external referrer, which is the only part of the answer an operator can act on.
Follow-up
- The graph is read in one query and the archive writes a minute later. What can change in between, and how do you make the write safe?
- The candidate set is 400,000 resources. Is that one transaction, and if not, what does a half-finished archive look like to a reader?
Write the update path that detects a concurrent edit
Medium · optimistic concurrency · transactional outbox · audit history
resource carries version INT NOT NULL DEFAULT 1. resource_revision holds revision_id, resource_id, version, actor_user_id, change_kind, patch JSONB, request_id, created_at with UNIQUE (resource_id, version). outbox_event holds aggregate_type, aggregate_id, aggregate_version, event_type, payload, status. A PUT carries the version the client read. Write the exact statements for the single transaction that applies the edit, records the revision and enqueues 'resource.updated', and give the handler's branch on zero affected rows. Then say what PostgreSQL 16 does under READ COMMITTED when two of these updates hit one row at once.
Approach
- One transaction, three writes, no network call inside it: UPDATE resource SET title = $3, version = version + 1, updated_at = now() WHERE resource_id = $1 AND tenant_id = $4 AND version = $2; then INSERT the resource_revision row at version $2 + 1; then INSERT the outbox_event row at the same aggregate_version. The event goes to a table rather than a broker because no transaction spans both.
- Branch on the affected-row count before doing anything else. Zero has three causes — stale version, wrong tenant, row gone — so re-read once and map to 409 carrying the current version, or 404 for an id outside the caller's tenant, which also stops the endpoint confirming that another tenant's id exists.
- State the engine behaviour instead of assuming it. Under READ COMMITTED the second UPDATE blocks on the row lock, and when the first commits PostgreSQL re-evaluates the WHERE clause against the newly committed row, so the version predicate now fails and the statement reports zero rows. Under REPEATABLE READ the identical collision raises SQLSTATE 40001 instead, so the handler must fold both shapes into one conflict response.
- Keep UNIQUE (resource_id, version) even though the predicate already serialises writers. It is what makes a lost update unwritable if any other path ever reaches the revision table, and it converts a logic bug into 23505 rather than into a silently missing history row.
Follow-up
- A client sends the version it read ten minutes ago and the resource has moved three versions. What is in your 409 so it can resolve the conflict without a full re-fetch?
- Two editors, two disjoint fields, no overlap. Does your answer still refuse the second write, and should it?
Explain why the owner filter ignores the listing index
Medium · composite index · query plans · sort elimination
The only index on resource is (tenant_id, status, updated_at DESC, resource_id DESC). A new endpoint returns one user's resources across all statuses, newest created first: WHERE tenant_id = $1 AND owner_user_id = $2 ORDER BY created_at DESC LIMIT 20. On a tenant with 2M rows it takes 900 ms and EXPLAIN shows a sort above a large scan. Explain precisely why the existing index cannot serve it, give the index that can, and state which of these the new index still will not help: owner_user_id alone across tenants; the same query ordered by updated_at. PostgreSQL 16.
Approach
- Separate the two jobs an index does. For filtering, a composite btree is seekable only on a left prefix, so with no predicate on status the scan can at best range over tenant_id and test owner_user_id per row; PostgreSQL 16 has no btree skip scan to jump the unconstrained column.
- For ordering, the index is sorted by (status, updated_at) within a tenant and not by created_at, so the LIMIT cannot stop early: every matching row is read and then sorted. That is the 'Sort Method: top-N heapsort' line, and it is why the plan reads 2M rows to answer with 20.
- Derive the replacement from the access path — equality, equality, then the ordering column: CREATE INDEX CONCURRENTLY ON resource (tenant_id, owner_user_id, created_at DESC). The scan seeks to the (tenant, owner) range and walks 20 entries in order, so the Sort node disappears along with the row-read.
- Treat INCLUDE (title, status) as conditional, not free. An index-only scan still visits the heap for any row whose page is not marked all-visible, so on a table taking 1.2k writes/second the win depends on autovacuum keeping the visibility map current, and the wider index costs more on every insert.
Follow-up
- 90% of rows are status='active'. Would a partial index WHERE status = 'active' change your answer, and for which of the three queries?
- A dashboard runs this for 40 owners in one page load. What changes about the design?
How would you architect a secure multiplatform agent for Windows, MacOS, and Ubuntu?
Medium · Technical and Domain Knowledge
Approach
- Split the agent into a shared core and thin OS adapters. The core holds check scheduling, policy evaluation, a local result queue and upload, written once in a cross-compiling language such as Go. The adapters cover service install (Windows Service via the SCM, macOS launchd LaunchDaemon, Linux systemd unit) and data collection (registry and WMI on Windows, system_profiler and configuration profiles on macOS, /etc files and dpkg on Ubuntu).
- Apply least privilege on the host. A small privileged service runs only the checks that need root or SYSTEM, and an unprivileged user-session helper handles any UI. They talk over local IPC with access control: a named pipe with a restrictive ACL on Windows, a Unix domain socket with owner-only permissions on macOS and Linux. The service validates every message, because the IPC channel is a privilege-escalation surface.
- Give each device its own identity. At enrollment a one-time token is exchanged for a device-generated key pair, and the private key is kept in the OS store (DPAPI or TPM-backed CNG on Windows, Keychain on macOS, a root-only 0600 file or TPM on Linux). The agent uses mutual TLS with a pinned backend CA, so the server ties every result to a device and rejects unauthenticated reports.
- Treat the update channel as the highest-risk path. Sign every package (Authenticode on Windows; Developer ID signing plus notarization on macOS; a GPG-signed apt repository for .deb) and have the agent verify the signature before it installs anything. Roll out in rings with automatic rollback when the heartbeat or crash rate gets worse.
- Plan for offline devices and fleet scale. Results go to a durable local queue (for example SQLite), each with an idempotency key, so retries never create duplicates. Polling uses jitter and exponential backoff so thousands of endpoints do not hit the backend at the same moment. The server treats a missing heartbeat as a finding, since an agent that stops reporting may have been disabled.
Follow-up
- A new agent version crash-loops on one OS only. How do you stop the rollout and recover the devices that already took it?
- How would you detect that a local administrator has stopped, uninstalled or modified the agent?
- What changes in the design if the agent must enforce settings rather than only report them?
What are the primary trade-offs you consider when choosing between Azure and GCP for high-compliance infrastru
Medium · Technical and Domain Knowledge
What are the primary trade-offs you consider when choosing between Azure and GCP for high-compliance infrastructure?
Approach
- Start from the obligations, not the vendors. Ask what data is in scope (CUI, export-controlled technical data), which frameworks apply (FedRAMP Moderate or High, DFARS 252.204-7012, CMMC, DoD Impact Levels), and whether data residency or personnel-screening rules apply. Those answers decide which offerings are even eligible.
- Compare how each provider builds the compliance boundary. Azure Government is a physically isolated cloud with its own regions and endpoints, and it usually has fewer services and later feature parity than commercial Azure. GCP applies controls through Assured Workloads folders inside its commercial infrastructure. In both clouds authorization is per service, so map every service you need against the current FedRAMP and Impact Level scope lists.
- Weigh the identity and endpoint ecosystem. If the organisations being served already run Microsoft 365 GCC High, Entra ID and Intune, Azure shortens the integration path for SSO and device data. A Google Workspace or Cloud Identity shop changes that calculation.
- Compare the controls you will operate every day. For keys: Azure Key Vault Managed HSM against Cloud KMS and Cloud HSM, both with customer-managed keys and FIPS-validated modules. For guardrails: Azure Policy against the Organization Policy Service. Also compare audit-log retention and export, cost, and how familiar the team already is with each.
- State the trade-off and decide. Running both clouds doubles the boundary you have to document and the evidence you have to collect. I would keep regulated data inside one authorized boundary, define it in Terraform so every control change is reviewed as code, and write down the shared-responsibility split for the assessor.
Follow-up
- A managed service you depend on is not yet authorized in the sovereign environment. What do you do?
- How would you collect audit evidence for an assessor if the workload did span both clouds?
- Which requirement would make you reverse your choice?
Can you explain your approach to scaling a Postgres database for a high-traffic SaaS platform?
Medium · Technical and Domain Knowledge
Approach
- Measure before changing anything. Use pg_stat_statements to rank queries by total_exec_time, run EXPLAIN (ANALYZE, BUFFERS) on the top offenders, and check the buffer cache hit ratio, active connection count, replica lag and table bloat. This tells you whether the limit is CPU, I/O, locks or connections.
- Take the cheap wins first. Add composite indexes that match each query's WHERE and ORDER BY, partial indexes for hot subsets, and INCLUDE columns for index-only scans. Remove N+1 query patterns and replace OFFSET pagination with keyset pagination. Put PgBouncer in transaction mode in front of the database, because every Postgres connection is a separate backend process. Note that transaction mode breaks session state such as SET and session-level advisory locks.
- Scale reads with streaming replicas and a cache, keeping replica lag in mind. After a user writes, route that user's reads to the primary for a short window, or until the replica has replayed past the write's LSN, so they always see their own change.
- Handle data growth and write load. Use declarative partitioning by time or by tenant so the planner prunes partitions and old data goes away with DROP PARTITION instead of a huge DELETE. Tune autovacuum per hot table. In a multi-tenant schema put tenant_id first in keys and indexes, and consider row-level security. Shard by tenant (Citus or application-level routing) only when one primary cannot absorb the writes. After that, cross-tenant queries get expensive.
- Know the edge cases that cause outages. Long-running or idle-in-transaction sessions block vacuum, which leads to bloat and transaction-ID wraparound risk. Migrations need CREATE INDEX CONCURRENTLY (it cannot run inside a transaction block, and a failed run leaves an INVALID index to drop) and a lock_timeout so a waiting ALTER does not queue every other query behind it.
Follow-up
- One tenant generates far more load than all the others. How does your design change?
- A user saves a setting and the next page shows the old value. Walk through the cause and the fix.
- How would you add an index or a NOT NULL column to a table with hundreds of millions of rows without downtime?
How do you ensure security-first coding practices are maintained in a rapid deployment environment?
Medium · Technical and Domain Knowledge
Approach
- Make the secure path automatic in CI, so shipping fast never means skipping checks. Run SAST (CodeQL or Semgrep), dependency scanning against advisory databases, and secret scanning (gitleaks) both pre-commit and in CI. Block merges only on high-confidence, high-severity findings, and route the rest to a triage queue with a fix-by deadline.
- Lock down the supply chain. Commit lockfiles and pin third-party CI actions to a commit SHA. Use OIDC federation from CI to the cloud instead of long-lived keys, and keep CI tokens least-privilege. Sign build artifacts and generate an SBOM for each release, so you can answer whether a given version is affected within minutes.
- Put review effort where the risk is. Use branch protection with required reviews, plus CODEOWNERS on authentication, cryptography, update and permission code. For changes that cross a trust boundary, write a short threat model (STRIDE works). Use safe defaults in the code: parameterized queries, schema validation such as zod at every API boundary in a TypeScript stack, and no dangerouslySetInnerHTML in React or Next.js without sanitizing.
- Contain mistakes at runtime. Ship behind feature flags with staged rollouts so a vulnerable change can be switched off without a redeploy. Keep secrets in a managed vault, and write audit logs for privileged actions. Track time-to-remediate for high-severity findings, so you know whether the practices are actually working.
- Name the trade-off. Noisy gates train engineers to bypass them. Tune the rules, keep the pipeline fast, and treat a false positive as a bug in the tooling rather than a reason to add an override.
Follow-up
- A high-severity CVE is published in a transitive dependency late on a Friday. Walk through your response.
- How would you prove to an auditor that every production change was reviewed and tested?
- An engineer needs to bypass a failing security gate to ship a hotfix. What process do you allow?
Every query on one table stalls for forty seconds mid-deploy
Medium · lock contention · ddl · migrations
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.
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?
Suggested practice checklist
The plan follows the five reported stages and the ten reported questions, with one day each for the agent design, the cloud and Postgres topics, security-minded delivery, live coding and low-level design, then behavioral answers.
Day 1 — Map the loop and choose your project
- Write out the five reported stages and note what you need to bring or ask for each, including the format of the project submission.
- Choose the project you will submit, then outline it as problem, constraints, architecture, two or three decisions with rejected alternatives, security considerations, outcome and what you would change.
Deliverable: A one-page loop map and a one-page project outline with the decisions marked.
Day 2 — Design a secure multiplatform agent
- Sketch the architecture for the question on a secure multiplatform agent for Windows, MacOS and Ubuntu: collector, local persistent queue, policy evaluation, update mechanism, authenticated upload, and per-OS adapters.
- List the platform differences you would need to handle, such as how a background service is installed and supervised on each OS and how packages are signed and updated.
- Extend the sketch to the reported scenario of tracking compliance across thousands of endpoints: what the agent reports, how the backend stores it and how you detect a silent endpoint.
Deliverable: A component diagram, a table of per-OS differences, and a spoken answer outline for the agent question and the endpoint-compliance scenario.
Day 3 — Cloud choice and Postgres under load
- Write a requirements-first comparison of Azure and GCP for a compliance workload, then practise saying it as a decision with trade-offs.
- Write a Postgres scaling ladder in order: query and index fixes found with EXPLAIN, connection pooling, caching, read replicas, partitioning, then vacuum and maintenance. Say which signal tells you to move to the next step.
Deliverable: A one-page cloud comparison, the scaling ladder with its trigger signals, and written fixes for the three practice problems.
Day 4 — Security-first delivery and CI/CD
- Write the stages of a pipeline you have run, marking the security and approval controls, then add what a regulated setting would require.
- Outline your response to the reported scenario of a major vulnerability in an existing production codebase: contain, assess exposure, fix, release, tell affected customers, learn from it.
- Rehearse aloud the answers on security-first practices in rapid deployment and on CI/CD experience in a regulated industry.
Deliverable: An annotated pipeline diagram, a vulnerability-response runbook outline and two rehearsed spoken answers.
Day 5 — Live coding practice
- For each, state assumptions, complexity and at least three edge cases before coding, then write the tests.
Deliverable: Two solved problems with tests and a note on the complexity and edge cases of each.
Day 6 — Low-level design
- Write a module outline for the endpoint agent from day 2: interfaces, data model, error paths and test seams, with a one-sentence reason for each structural choice.
- Note where the design would be hardest to change and what you would do about it.
Deliverable: A solved graph problem and a module-level design outline with a reason for every choice.
Day 7 — Behavioral answers and a full dry run
- Write a story for the CI/CD, ambiguity, deadline pressure, defense and aerospace interest, in-person and mission questions, each with a decision and a result.
- Prepare a direct, specific answer to the in-person question and your opening outline for a slow conversation.
- Run a full mock: walk your project, answer one design question and one behavioral question aloud, then list two questions to ask the team.
Deliverable: Six written story outlines, a rehearsed project walkthrough and two questions to ask.
Behavioral and alignment preparation
Candidates report that the behavioral stage is a discussion with a founder that builds on your submitted project, and the reported alignment questions cover interest in defense and aerospace, ambiguity, pressure, in-person work and mission. For this role, prepare stories that show you can define work when requirements are unclear, keep security standards while shipping quickly, and commit plainly to the in-office arrangement.
What is your experience with CI/CD pipelines in a regulated industry context?
Medium · Technical and Domain Knowledge
Approach
- Open with one pipeline you actually ran and name its stages in order: pull-request checks (tests, lint, dependency and secret scanning), one build that produces a versioned artifact, promotion of that same artifact through environments, then the deploy step. Naming the order shows you know where each control sits.
- Describe the controls a regulated setting adds: protected branches with required reviews, separation between who writes a change and who approves its release, an audit trail linking each production version to a reviewed change, and secrets pulled from a vault or short-lived federated credentials instead of stored keys.
- Tie it to this role: for desktop agents on Windows, macOS and Ubuntu, add a per-OS build matrix, signing of every binary or package, and staged rollout to rings of machines with a way to halt and roll back. State what you have done and say plainly what you would add.
- If you have not worked under a formal regime, say so, then describe the nearest control you owned (audit logging, approval gates, change tickets) and the evidence it produced. Overclaiming compliance experience is exposed by one question about how evidence was kept.
- Close with a trade-off you handled: a check that slowed merges, and how you sped it up with caching, parallel jobs or running heavy scans only on the main branch instead of removing it.
Follow-up
- How do you ship an urgent hotfix without bypassing the controls?
- How can you prove which commit is running on a given machine or environment?
- What happens to the fleet when a bad release is halfway out?
Why are you interested in the cybersecurity space, specifically regarding the defense and aerospace industries
Medium · Behavioral and Alignment
Why are you interested in the cybersecurity space, specifically regarding the defense and aerospace industries?
Approach
- Lead with a specific, true origin: a project, an incident you handled, a vulnerability you fixed or a course that made security a subject you chose to go deeper on. A concrete moment is stronger than a statement that security matters.
- Connect it to the reported work: compliance software for organisations such as aircraft manufacturers and satellite operators means agents on endpoints, evidence collection and records that can be trusted. Say which part of that engineering interests you and why.
- Show some homework on the domain. Read about what compliance obligations look like for a defense or aerospace supplier and be able to explain one concrete obligation in a sentence. Candidates report that domain curiosity is what separates answers.
- Address the defense side honestly: say what draws you to it, or what you thought through if you had hesitations. A direct answer is stronger than rehearsed enthusiasm.
- End with what you would do to learn the domain in your first weeks, so the interest turns into work.
Follow-up
- What have you read or built that relates to compliance or security?
- Which part of compliance work do you think is hardest to automate, and why?
- What would you want to learn first about your customers' environments?
Can you describe a time you had to work through significant ambiguity to deliver a product?
Medium · Behavioral and Alignment
Approach
- Choose a story where the goal itself was unclear, not only the implementation: conflicting requests, no spec, or a customer problem described loosely. State in a sentence or two what was unknown.
- Spend most of the answer on the mechanism you used to reduce the ambiguity: talking to the people closest to the problem, writing a short problem statement with your assumptions listed, running a short spike to test the riskiest assumption, and making reversible decisions first.
- Show the cut: the smallest slice you shipped first because it would teach you something, what you deliberately left out, and who agreed to that.
- Report the outcome with a number or an observable result, and include one assumption that turned out wrong and how you changed course. A story with no wrong turn sounds edited.
- Avoid stories in which someone else resolved the ambiguity for you, or in which the lesson is only that you worked harder.
Follow-up
- How did you decide you knew enough to start building?
- Which early assumption was wrong, and what did it cost?
- How did you keep the people depending on you informed while scope was moving?
How do you handle working in a high-pressure environment with tight deadlines?
Medium · Behavioral and Alignment
Approach
- Pick a deadline with a real consequence and say what was at stake. Then describe triage: separating what had to ship from what could follow, and writing that split down where the people affected could see it.
- Make the trade-off explicit: scope reduced, a feature flag used, a manual step accepted, each with a plan to repay it. The role pairs speed with security, so name one thing you refused to cut, such as review of authentication or data-handling code.
- Describe communication under pressure: raising the risk early with numbers, offering options instead of just a warning, and giving short status updates to whoever owned the deadline.
- State how you protected your judgment: a short pre-release checklist, a second reviewer on risky changes, a rollback ready. Pressure stories fail when they read as late nights and heroics with no decisions in them.
- Finish with what you changed afterwards so the next deadline was less tight, such as better estimates, added tests or automating the painful step.
Follow-up
- What did you cut, and who agreed to it?
- When have you pushed back on a deadline, and how did it go?
- How do you stop the same crunch from recurring?
Are you prepared for a fully in-person work environment in downtown San Francisco?
Medium · Behavioral and Alignment
Approach
- Answer in the first sentence: yes, or what the constraint is. Candidates describe five days a week in the downtown San Francisco office as part of the requirements, and say candidates who cannot commit or who live far away may not be considered, so a vague answer wastes time on both sides.
- Back a yes with specifics: where you live or when you will relocate, what your commute looks like, and any in-person or hybrid roles you have worked in. A concrete plan is more convincing than saying you are flexible.
- If something limits you, such as a notice period, a relocation date or a family commitment, state it once, factually, with the date it ends. Do not leave it unmentioned for a later stage.
- Show that you see in-person work as useful for this kind of team: the role works closely with the co-founders and customer success, and some debugging goes faster with someone next to you. Keep it to a sentence and do not criticise remote work.
- Ask one question back about how the team works on site, which signals you have thought about the arrangement.
Follow-up
- When could you be working from the office full time?
- Have you worked on site at an early-stage company before, and what did you take from it?
- What, if anything, would make five days a week hard for you?
How do you demonstrate your support for the mission of the US military or critical national infrastructure?
Medium · Behavioral and Alignment
Approach
- Treat this as a values question with a factual core. Say what you would honestly stand behind, then support it with evidence from your work rather than slogans.
- Use evidence of caring about systems that must not fail: reliability or security work, incident handling, careful handling of sensitive data, or time spent on defense, public-sector or infrastructure-adjacent teams. Name what you personally did.
- Link the mission to the engineering: the reported customers include aircraft manufacturers and satellite operators, so compliance tooling has to produce records and agent behaviour that can be trusted. Say which disciplines you bring, such as least privilege, audit logging and honest incident reporting.
- If you have reservations or boundaries, state them calmly and specifically rather than performing agreement. A reasoned answer holds up better than a scripted one, and a vague answer invites more follow-ups.
- Close with how you would keep learning about the domain, so the answer ends in action.
Follow-up
- Tell me about a time you accepted a constraint for security or safety that slowed you down.
- How do you feel about building products whose customers are in the defense sector?
- What have you done so far to learn about this industry?