cswork / libraryOpen practice workspace

Interview guides · Material Security

Material Security Software Engineer Interview Guide

Material Security Software Engineer interview guide: reported rounds, questions and how candidates describe the process.

The 60-second brief

As a Software Engineer at Material Security, you are at the forefront of redefining how organizations protect their most sensitive communications and data. This role is not simply about writing code; it is about building robust, high-trust systems that defend against sophisticated cyber threats. You will contribute to a product suite that secures email environments, manages access, and mitigates the impact of account takeovers, directly impacting the security posture of enterprise-level clients. The environment is fast-paced and requires a deep appreciation for security-first engineering. You will be expected to balance rapid feature development with the architectural rigor necessary for a security product.

This guide is scoped to a Software Engineer candidate at Material Security.

Focus areas

  • In-Memory Data Structures
  • In-Memory File System Design
  • Take-Home Assignments

The Material Security interview process

Material Security candidates report 3 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.

Initial Screening

Discussion with a recruiter or hiring manager about your background.

What to demonstrate

  • Discussion with a recruiter or hiring manager about your background
  • Depth in In-Memory Data Structures

How to prepare

  • Be able to walk your CV end to end in two minutes, and say why this company specifically.
  • Have your salary expectations, notice period and location constraints ready, and ask for the rest of the loop in writing.

Technical Assessment

Completion of a take-home assignment to demonstrate technical skills.

What to demonstrate

  • Completion of a take-home assignment to demonstrate technical skills
  • Depth in In-Memory Data Structures

How to prepare

  • Answer aloud and timed: How do you ensure the security of the APIs or services you build?
  • Answer aloud and timed: Given a set of requirements, how do you decide between building a custom solution versus utilizing an existing library or service?

Deep-Dive Technical Interviews

Multiple interviews focusing on in-depth technical knowledge and problem-solving.

What to demonstrate

  • Multiple interviews focusing on in-depth technical knowledge and problem-solving
  • Depth in In-Memory Data Structures

How to prepare

  • Answer aloud and timed: Walk me through a system you designed. What were the biggest scaling bottlenecks and how did you address them?
  • Answer aloud and timed: How would you architect a system to handle high-frequency data ingestion while maintaining data integrity?

Where candidates lose points

Prepare for the take-home

Be ready to defend every design choice you made in your assignment, including the "why" behind your choice of data structures and algorithms.

Master your resume

Be prepared to discuss any project on your resume in extreme detail, especially those involving complex architectural challenges.

Stay calm under pressure

Some interviews may feel intense or awkward; focus on the technical problem at hand rather than the tone of the interviewer.

Research the product

Understand what Material Security actually does for its customers. Connecting your technical skills to the company's mission will set you apart.

Questions & practice

How would you design an in-memory file system, and what are the trade-offs regarding concurrency and persisten

Medium · Technical Proficiency and Problem Solvin

How would you design an in-memory file system, and what are the trade-offs regarding concurrency and persistence?

Approach

  1. Say what the runtime actually does before reasoning about the code.
  2. Name what is shared across threads and what owns each piece of state.
  3. Identify the window where an invariant is briefly untrue.
  4. Distinguish a value from a reference to it, and say which one you handed out.

Follow-up

  • What happens if two callers reach this at the same time?
  • Where could this allocate more than you expect?

Describe a complex technical challenge you faced. How did you break it down, and what was the final outcome?

Medium · Technical Proficiency and Problem Solvin

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

How do you ensure the security of the APIs or services you build?

Medium · Technical Proficiency and Problem Solvin

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

Given a set of requirements, how do you decide between building a custom solution versus utilizing an existing

Medium · Technical Proficiency and Problem Solvin

Given a set of requirements, how do you decide between building a custom solution versus utilizing an existing library or service?

Approach

  1. Restate the input: its shape, its size, and what is guaranteed about it.
  2. Name the brute-force solution and its complexity before improving on it.
  3. Choose the data structure from the access pattern, not from familiarity.
  4. State the target complexity and say which constraint rules the naive version out.

Follow-up

  • How does this change if the input no longer fits in memory?
  • What is the worst case, and how likely is it on real data?

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

  1. 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.
  2. 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.
  3. 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.
  4. 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?

Denormalise tenant onto revisions and backfill it live

Hard · denormalisation · online migration · backfill

resource_revision (revision_id, resource_id, version, actor_user_id, change_kind, patch, request_id, created_at) has 400M rows and no tenant column; tenant_id lives only on resource. Two reads need it: a tenant-scoped audit feed ordered by created_at DESC, and an offboarding purge. Both join back to resource today. Justify adding tenant_id to resource_revision against those two reads, name the anomaly the copy introduces and the constraint that prevents it, then give the ordered migration for a live table taking 1.2k writes/second — the lock each step takes, how the backfill is batched, and where each step stops being reversible. PostgreSQL 16.

Approach

  1. Justify from the access path rather than from taste. Without the column, the audit feed either scans resource_revision by created_at and discards other tenants' rows, or resolves the tenant's resource_ids first and probes with them — both proportional to the tenant's whole history rather than to one page. With (tenant_id, created_at DESC, revision_id DESC) it is a seek that stops at 50 rows, and the purge becomes a ranged delete instead of a join.
  2. Name the cost exactly: a second copy of a fact can disagree with the first. Make the disagreement unwritable rather than documented — add UNIQUE (resource_id, tenant_id) on resource so it can serve as a foreign-key target, then FOREIGN KEY (resource_id, tenant_id) REFERENCES resource (resource_id, tenant_id) on the revision table. A revision can then only ever carry its parent's tenant.
  3. Step one, expand: ALTER TABLE resource_revision ADD COLUMN tenant_id BIGINT NULL, with no default, so it is a catalogue change and no rewrite. It still needs ACCESS EXCLUSIVE for an instant, and that instant queues behind the longest open transaction on the table while every later query queues behind it — set lock_timeout to 2s and retry rather than wait.
  4. Step two, dual-write: deploy the writer that populates tenant_id on every new revision while reads still use the join. Reversible by redeploying the previous build, because nothing reads the column yet.

Follow-up

  • The backfill is half finished and a rollback is required. What state is the table in, and what does the previous build do with a half-populated column?
  • How do you verify the backfill actually finished, given rows are still being inserted while it runs?

Walk me through a system you designed. What were the biggest scaling bottlenecks and how did you address them?

Medium · Architectural Thinking

Approach

  1. Clarify what is being asked and what a complete answer contains.
  2. State your assumptions explicitly before working the problem.
  3. Say what you would check first and why it is the highest-information step.
  4. Work from the requirement backwards to the design.

Follow-up

  • What assumption would you test first?
  • How would you know your answer was wrong?

How would you architect a system to handle high-frequency data ingestion while maintaining data integrity?

Medium · Architectural Thinking

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Explain the trade-offs between different database architectures for a high-availability security product.

Medium · Architectural Thinking

Approach

  1. Fix the scope first: who calls this, how often, and what they do when it fails.
  2. Name the read and write paths separately; they rarely have the same bottleneck.
  3. Choose a partition key and say what query it makes expensive.
  4. State the consistency you need, and where you are willing to be stale.

Follow-up

  • What breaks first when traffic grows ten times?
  • How does this behave when that dependency is down for an hour?

Exports duplicate a row range about once a week

Hard · leases · clock skew · idempotency

Roughly once a week an export writes a file containing a duplicated range of rows. The affected job_run rows show attempt = 1, status = succeeded, one started_at, and a lease_owner naming a different host from the one whose logs show the job starting. Leases last 30 seconds and are heartbeated every 10 from inside the handler; lease_expires_at is computed on the worker and compared against the database's now(). Find the mechanism, and give a fix that holds even if you cannot fix the clocks.

Approach

  1. Start from the fact that eliminates the obvious answer. attempt = 1 means no retry was recorded, so this is not a re-run after failure; two workers ran the same row concurrently and the takeover path never touched the counter. lease_owner naming a host other than the one that started the job is the same statement from the other side.
  2. Enumerate the mechanisms that cause a premature takeover, then find the signal that separates them. Either the lease genuinely expired because the heartbeat did not fire, which is what happens when the heartbeat runs on the handler's own thread and the handler makes a long blocking call, or it only appeared expired because two clocks disagree, since lease_expires_at is written from the worker's clock and evaluated against the database's. The discriminator is the distribution: incidents clustered on the longest exports indict the heartbeat, incidents clustered on one host indict skew. Measure both, and measure each host's offset against the database directly.
  3. Read the reclaim query precisely. In PostgreSQL now() is transaction start time, not statement time, so a reclaimer holding a long transaction compares against an older timestamp than expected; clock_timestamp() is the statement-time function. This is worth ruling in or out before you redesign anything, because it changes which rows look expired.
  4. Remove the second clock rather than trying to synchronise it. Issue and extend the lease in the database, with lease_expires_at = now() + interval '30 seconds' in both the claim and the heartbeat, so exactly one clock is ever compared and worker skew stops mattering to this predicate.

Follow-up

  • The displaced worker has already streamed half the file to object storage. What makes that side effect safe to repeat?
  • You now count takeovers. What alert fires on that counter, and at what threshold?

Suggested practice checklist

Built from the rounds and topics Material Security candidates report.

Day 1 — Map the Material Security loop

  • Write out the reported sequence: Initial Screening, Technical Assessment, Deep-Dive Technical Interviews.
  • For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.

Deliverable: A one-page map of the 3 reported rounds, with the weakest marked.

Day 2 — Work In-Memory Data Structures

  • Spend the session on In-Memory Data Structures, which Material Security candidates report being tested on.
  • Write one worked example in In-Memory Data Structures and time yourself on it.

Deliverable: One timed worked example in In-Memory Data Structures.

Day 3 — Work In-Memory File System Design

  • Spend the session on In-Memory File System Design, which Material Security candidates report being tested on.
  • Write one worked example in In-Memory File System Design and time yourself on it.

Deliverable: One timed worked example in In-Memory File System Design.

Day 4 — Work Take-Home Assignments

  • Spend the session on Take-Home Assignments, which Material Security candidates report being tested on.
  • Write one worked example in Take-Home Assignments and time yourself on it.

Deliverable: One timed worked example in Take-Home Assignments.

Day 5 — Answer out loud: Technical Proficiency and Problem Solving

  • Answer aloud, timed: How would you design an in-memory file system, and what are the trade-offs regarding concurrency and persistence?
  • Answer aloud, timed: Describe a complex technical challenge you faced. How did you break it down, and what was the final outcome?

Deliverable: Spoken answers to 2 reported Technical Proficiency and Problem Solving question(s), under time.

Day 6 — Answer out loud: Architectural Thinking

  • Answer aloud, timed: Walk me through a system you designed. What were the biggest scaling bottlenecks and how did you address them?
  • Answer aloud, timed: How would you architect a system to handle high-frequency data ingestion while maintaining data integrity?

Deliverable: Spoken answers to 2 reported Architectural Thinking question(s), under time.

Day 7 — Answer out loud: Behavioral and Role Alignment

  • Answer aloud, timed: Why are you interested in the security space specifically, and why Material Security?
  • Answer aloud, timed: Tell me about a time you had to pivot your approach due to shifting product requirements.

Deliverable: Spoken answers to 2 reported Behavioral and Role Alignment question(s), under time.

Behavioural preparation

Behavioural rounds judge the decision you made and what it cost.

Why are you interested in the security space specifically, and why Material Security?

Medium · Behavioral and Role Alignment

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

Tell me about a time you had to pivot your approach due to shifting product requirements.

Medium · Behavioral and Role Alignment

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?

How do you handle situations where you disagree with a technical direction proposed by a manager or peer?

Medium · Behavioral and Role Alignment

Approach

  1. Pick a story where you made the decision, not one where you watched it.
  2. State the situation in two sentences and spend the rest on the reasoning.
  3. Give the blast radius: what could have broken, and what you measured.
  4. Name the disagreement and how you resolved it with evidence.

Follow-up

  • What would you do differently if you ran that again?
  • How did you know your change caused the improvement?