← Abnormal Security Interview Insights

Abnormal Security·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
May 2026

Summary

System design round at Abnormal Security for a software engineer role. The whole thing was basically one giant question about scaling a deduplication system, and they went pretty deep on every layer of it.

Questions Asked (9)

Q1

How would you scale a duplicate photo detection system to handle tens of millions of files across multiple machines and storage locations?

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This was the whole interview, basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a scalable architecture that uses perceptual hashing for duplicate detection, distributed processing for parallelization, and efficient storage for hash indexes. Discuss trade-offs between accuracy, cost, and latency, and explain how you would handle incremental updates and cross-machine deduplication.

Pro tip: Emphasize the importance of choosing the right hashing algorithm (e.g., pHash) and indexing strategy (e.g., LSH) to balance accuracy and performance, and mention how you would monitor and tune the system over time.

1. Clarify Requirements

Ask about scale (number of files, growth rate), acceptable false positives/negatives, latency requirements, and storage locations (cloud, on-prem).

2. Design Data Pipeline

Outline a distributed pipeline: ingest files, compute perceptual hashes in parallel, and store hashes in a distributed index (e.g., Elasticsearch, Cassandra).

3. Choose Algorithms and Indexing

Select a perceptual hashing algorithm (e.g., pHash) and an indexing technique (e.g., LSH) to efficiently find near-duplicates at scale.

4. Address Distribution and Scalability

Explain how to partition work across machines (e.g., by hash range), handle failures, and ensure consistency across storage locations.

5. Discuss Trade-offs and Optimizations

Compare trade-offs: accuracy vs. speed, cost vs. scalability, and propose optimizations like caching, batching, and incremental updates.

Key Points to Mention

  • Perceptual hashing (e.g., pHash, dHash) for robust duplicate detection
  • Locality-Sensitive Hashing (LSH) for efficient approximate nearest neighbor search
  • Distributed processing frameworks (e.g., Apache Spark, MapReduce) for parallel hash computation
  • Distributed storage and indexing (e.g., Elasticsearch, Cassandra, Redis) for scalability
  • Handling cross-machine and cross-storage deduplication with a global index
  • Trade-offs between accuracy, latency, and cost; monitoring and tuning

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What key schema would you use for the deduplication index, and how would you size memory for it?

System DesignData Modeling
Author's notes

Blanked for a second on the schema part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the deduplication requirements (e.g., exact vs. fuzzy matching, throughput, latency). Then propose a schema that balances memory efficiency and lookup speed, such as a hash-based index with compact keys. Finally, walk through a memory sizing calculation based on expected volume, key size, and overhead.

Pro tip: Mention that you'd use a probabilistic data structure like a Bloom filter for a first-pass check to reduce memory, but keep a exact index for verification. This shows you understand trade-offs between memory and accuracy.

1. Clarify requirements

Ask about the scale (number of items), acceptable false positive rate, and whether deduplication needs to be exact or approximate. This determines the choice of data structure.

2. Propose schema

Suggest a schema like a hash table mapping a fingerprint (e.g., SHA-256 truncated to 128 bits) to a unique ID or metadata. For memory efficiency, consider storing only the fingerprint and a pointer to the full record.

3. Estimate memory

Calculate memory as: number of entries × (key size + value size + overhead). For example, 1 billion entries × 16 bytes per key + 8 bytes per value + 30% overhead ≈ 31 GB. Mention that using a Bloom filter can reduce this significantly.

4. Discuss trade-offs

Compare exact vs. probabilistic structures: Bloom filters use less memory but have false positives; exact indexes use more memory but are precise. Suggest a hybrid approach if needed.

5. Consider scalability

Address how the index scales with data growth: sharding, partitioning, or using a distributed store like Redis or Cassandra. Mention that memory sizing must account for peak load and replication.

Key Points to Mention

  • Hash function choice (e.g., SHA-256, MurmurHash) and collision handling
  • Memory overhead of hash tables (load factor, pointers)
  • Bloom filter parameters (size, number of hash functions) and false positive rate
  • Trade-off between memory and accuracy
  • Sharding or partitioning for scalability
  • Compression techniques for keys (e.g., truncating hashes)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you design the batch pipeline for scanning and hashing files at scale, and what partitioning strategy would you use to maximize data locality?

System DesignTechnical Trade-offs
Author's notes

Talked through a MapReduce-style approach where mappers read and hash files, then reducers group by hash to find duplicates.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: scale (files/day, total volume), file types, and latency expectations. Then propose a distributed batch architecture (e.g., Spark or Flink) that partitions data by a hash of the file path or content to ensure locality, and discuss trade-offs between partitioning strategies.

Pro tip: Emphasize that partitioning by a stable key like file path hash ensures the same file always lands on the same worker, enabling incremental processing and caching. Also mention that you'd monitor partition skew and use techniques like salting to avoid hotspots.

1. Clarify Requirements and Constraints

Ask about data volume, file sizes, required throughput, latency, and whether incremental or full scans are needed. This shapes the choice of batch framework and partitioning.

2. Choose a Distributed Batch Framework

Select a framework like Apache Spark or Flink that supports parallel processing and fault tolerance. Justify based on scale and existing infrastructure.

3. Design the Partitioning Strategy

Partition by a hash of the file path or content to maximize data locality and ensure deterministic assignment. Discuss alternatives like range partitioning and their trade-offs.

4. Address Data Locality and Skew

Explain how partitioning affects locality: co-locate computation with data storage (e.g., HDFS, S3). Mitigate skew with salting or adaptive partitioning.

5. Discuss Trade-offs and Optimizations

Compare partitioning strategies in terms of scalability, fault tolerance, and performance. Mention caching, incremental processing, and monitoring.

Key Points to Mention

  • Use consistent hashing for partitioning to ensure even distribution and minimal reshuffling when scaling.
  • Leverage data locality by scheduling tasks on nodes where data resides (e.g., HDFS block locality).
  • Consider file size and count: small files problem can be mitigated by combining or using a different partitioning key.
  • Incremental processing: track processed files to avoid rehashing and reduce load.
  • Fault tolerance: ensure idempotent operations and checkpointing to handle failures.
  • Monitoring and alerting: track partition sizes, processing times, and skew to detect issues early.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

How do you ensure idempotency and avoid race conditions when multiple workers might process the same file simultaneously?

System DesignTechnical Trade-offs
Author's notes

This was where I felt least confident.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system context and constraints, then propose a layered strategy: use a distributed lock or atomic claim to ensure only one worker processes a file, and make the processing itself idempotent so retries are safe. Discuss trade-offs between locking mechanisms (e.g., Redis, database, ZooKeeper) and idempotency techniques (e.g., idempotency keys, deduplication, upserts).

Pro tip: Emphasize that idempotency is not just about avoiding duplicate work but also about ensuring consistent side effects (e.g., exactly-once semantics in downstream systems). Mention that you'd monitor for lock contention and have a fallback to avoid deadlocks.

1. Clarify requirements and constraints

Ask about the system's scale, file sources, processing guarantees needed (at-least-once vs exactly-once), and existing infrastructure (e.g., message queues, databases).

2. Prevent concurrent processing

Describe a mechanism to ensure only one worker processes a file at a time, such as a distributed lock (e.g., Redis Redlock, ZooKeeper) or an atomic database claim (e.g., UPDATE ... WHERE status = 'pending').

3. Ensure idempotent processing

Explain how to make the processing logic idempotent: use idempotency keys, deduplication tables, upserts, or check-and-set operations so repeated processing yields the same result.

4. Handle failures and retries

Discuss how to handle worker crashes, lock timeouts, and retries without causing duplicate side effects, e.g., by using a two-phase commit or transactional outbox pattern.

5. Monitor and iterate

Mention the importance of monitoring lock contention, duplicate processing attempts, and system performance, and being ready to adjust the strategy based on observed behavior.

Key Points to Mention

  • Distributed locking mechanisms (e.g., Redis, ZooKeeper, etcd) and their trade-offs (performance, reliability, complexity).
  • Atomic operations in databases (e.g., conditional updates, SELECT FOR UPDATE) to claim a file.
  • Idempotency keys and deduplication strategies to make processing safe on retry.
  • Exactly-once semantics and how to achieve them in distributed systems (e.g., transactional outbox, two-phase commit).
  • Handling partial failures and ensuring consistency across multiple services or data stores.
  • Monitoring and alerting for lock contention, deadlocks, and duplicate processing.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Before permanently deleting duplicates, what verification, rollback, and audit mechanisms would you put in place?

System DesignTechnical Trade-offs
Author's notes

Soft deletes plus an audit log was my answer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer around a safe, staged deletion process: first verify duplicates with multiple criteria and dry runs, then implement rollback via soft deletes and backups, and finally ensure auditability with logging and monitoring. Emphasize that deletion is irreversible, so every step should be reversible and traceable.

Pro tip: Propose a 'soft delete first, hard delete later' approach with a configurable grace period, and mention that you'd run the deletion in small batches with real-time monitoring to catch anomalies early.

1. Verification

Define duplicate criteria precisely and run verification queries to confirm duplicates, including edge cases and false positives. Perform a dry run to preview what would be deleted without actually deleting.

2. Rollback Plan

Implement soft deletes (e.g., mark as deleted) or take a full backup before hard deletion. Ensure you can restore data quickly if needed, and consider a grace period before permanent removal.

3. Audit Trail

Log all deletion actions with timestamps, user/system identity, and affected record IDs. Maintain an audit log that is immutable and accessible for compliance and debugging.

4. Execution Safeguards

Delete in small batches with rate limiting to avoid overwhelming the system. Monitor performance and error rates, and have a kill switch to halt the process if issues arise.

5. Post-Deletion Validation

After deletion, verify data integrity and that no critical data was lost. Compare counts and run consistency checks, and be prepared to rollback if validation fails.

Key Points to Mention

  • Soft delete vs. hard delete trade-offs and when to use each
  • Backup and restore strategies (e.g., snapshots, point-in-time recovery)
  • Idempotent and reversible operations to allow safe retries
  • Audit logging with immutable storage for compliance
  • Batch processing with monitoring and alerting
  • Grace period and approval workflows for high-risk deletions

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How would you handle fault tolerance, retries, and backpressure in this pipeline, and what metrics would you monitor?

System DesignAPI & Integrations
Author's notes

Standard stuff: exponential backoff, dead letter queues, circuit breakers.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the pipeline's components and data flow, then address fault tolerance, retries, and backpressure as interconnected concerns. For each, describe specific mechanisms (e.g., idempotency, exponential backoff, queue limits) and tie them to the pipeline's reliability goals. Finally, list key metrics that provide visibility into these mechanisms and overall system health.

Pro tip: Emphasize that retries must be paired with idempotency and backpressure to avoid cascading failures—this shows you understand the systemic trade-offs, not just individual techniques.

1. Clarify the pipeline architecture

Ask questions to understand the pipeline's components, data flow, and critical paths. This ensures your answer is tailored to the specific system.

2. Design for fault tolerance

Explain how to isolate failures (e.g., bulkheads, circuit breakers) and ensure graceful degradation. Mention redundancy and failover strategies.

3. Implement retries with safeguards

Describe retry policies (exponential backoff with jitter, max attempts) and the importance of idempotency to prevent duplicate processing.

4. Apply backpressure mechanisms

Discuss how to signal upstream to slow down (e.g., bounded queues, rate limiting, load shedding) to prevent overload.

5. Define monitoring metrics

List key metrics for each area: error rates, retry counts, queue depths, latency, and saturation. Explain how they inform alerts and tuning.

Key Points to Mention

  • Idempotency keys to make retries safe
  • Exponential backoff with jitter to avoid thundering herd
  • Circuit breakers to prevent cascading failures
  • Bounded queues and rate limiting for backpressure
  • Metrics: error rate, retry count, queue depth, latency percentiles, saturation
  • Dead letter queues for poison messages

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How would you handle incremental runs to process newly added files without re-scanning everything from scratch?

System DesignData Modeling
Author's notes

Proposed tracking a last-processed timestamp or a cursor per storage partition, so incremental jobs only scan files modified after that point.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data source and scale, then propose a stateful incremental processing design using checkpoints or watermarks to track processed files. Emphasize idempotency, fault tolerance, and how you would handle late-arriving or modified files without full rescans.

Pro tip: Mention that you would store file metadata (e.g., path, size, last-modified timestamp, or ETag) in a durable store like a database or a manifest file, and use that to detect new or changed files. This shows you understand the practical trade-offs between polling, event-driven notifications, and cost.

1. Clarify requirements and constraints

Ask about the data source (e.g., S3, HDFS, local filesystem), file arrival patterns, expected volume, and latency requirements. This ensures your solution fits the actual use case.

2. Choose a state-tracking mechanism

Decide between storing processed file identifiers in a database, using a manifest file, or leveraging source-native features like S3 inventory or event notifications. Discuss trade-offs of each.

3. Design the incremental detection logic

Explain how you would list only new or modified files by comparing against stored metadata (e.g., last modified time, size, checksum). Avoid full scans by using sorted listings or event streams.

4. Ensure idempotency and fault tolerance

Describe how you would handle failures, retries, and duplicate processing (e.g., using unique file IDs, transactional updates, or exactly-once semantics). Mention checkpointing to resume from last successful state.

5. Handle edge cases and scaling

Discuss late-arriving files, file modifications, deletions, and how to scale the solution (e.g., partitioning, parallel processing, backpressure).

Key Points to Mention

  • Use of checkpoints or watermarks to track progress
  • Storing file metadata (path, size, last-modified, ETag) for change detection
  • Idempotent processing to avoid duplicates on retries
  • Event-driven vs. polling approaches and their trade-offs
  • Handling late or out-of-order files with a grace period or reprocessing
  • Scalability considerations like partitioning and parallel workers

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

How would you handle multi-tenant isolation and permission checks to make sure users can't delete files they don't own?

System DesignTechnical Trade-offs
Author's notes

Scoped the dedup index by tenant ID so hashes are never compared across tenants.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a defense-in-depth strategy combining tenant isolation at the data layer with explicit ownership checks at the application layer. Emphasize that authorization must be enforced server-side on every request, and discuss trade-offs between different isolation models.

Pro tip: Mention that you would write tests specifically for cross-tenant access attempts and include audit logging for all deletion operations to detect and investigate potential breaches.

1. Clarify Requirements and Constraints

Ask about the expected scale, data sensitivity, compliance needs, and existing infrastructure to tailor the solution appropriately.

2. Choose a Tenant Isolation Model

Evaluate options like shared database with tenant ID, schema-per-tenant, or database-per-tenant, and justify your choice based on trade-offs in cost, complexity, and isolation strength.

3. Enforce Ownership at the Data Layer

Ensure every query includes a tenant ID filter and consider row-level security policies to prevent accidental data leakage.

4. Implement Permission Checks in the Application

Perform explicit authorization checks before any deletion, verifying that the user belongs to the tenant and owns the resource.

5. Add Defense-in-Depth Measures

Include audit logging, rate limiting, and automated tests for cross-tenant access to detect and prevent abuse.

Key Points to Mention

  • Tenant isolation models: shared DB with tenant ID, schema-per-tenant, database-per-tenant, and their trade-offs.
  • Row-level security (RLS) in databases to enforce tenant filtering at the data layer.
  • Server-side authorization checks on every request, never trusting client-side input.
  • Principle of least privilege and role-based access control (RBAC) for permissions.
  • Audit logging and monitoring for deletion operations to detect anomalies.
  • Automated tests that simulate cross-tenant access attempts to ensure isolation.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q9

Can you give rough cost and throughput estimates for this system at tens of millions of files?

System DesignTechnical Trade-offs
Author's notes

I actually enjoy estimation questions so this part was fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Break the problem into storage, compute, and network components, then apply rough per-file or per-GB cost and throughput constants to estimate totals. Use order-of-magnitude reasoning (powers of 10) and state assumptions clearly, focusing on the dominant cost and throughput drivers rather than precise numbers.

Pro tip: Anchor your estimate to a known reference point (e.g., S3 costs ~$0.023/GB-month, a single server handles ~10k IOPS) and show how you'd validate with a small-scale benchmark. This demonstrates practical engineering judgment and awareness of real-world constraints.

1. Clarify scale and assumptions

Confirm the number of files (tens of millions), average file size, access patterns (read/write ratio, frequency), and retention period. State any assumptions explicitly.

2. Estimate storage cost

Calculate total raw storage (files × avg size), add replication/overhead factor (e.g., 3x for durability), and multiply by cost per GB-month for the chosen storage tier (e.g., S3 Standard vs. Infrequent Access).

3. Estimate compute and throughput

Determine required IOPS and bandwidth based on access patterns. Estimate number of servers or instances needed, considering per-instance throughput limits (e.g., 10k IOPS, 1 Gbps network).

4. Estimate network and operational costs

Include data transfer costs (egress, cross-AZ), API request costs (e.g., S3 PUT/GET), and operational overhead (monitoring, backups). Sum to get total monthly cost.

5. Sanity-check and present ranges

Compare your estimate to known benchmarks or back-of-the-envelope calculations. Present a range (e.g., $X–$Y per month) and highlight the biggest cost drivers and potential optimizations.

Key Points to Mention

  • Storage cost dominates for large file counts; use tiered storage (hot vs. cold) to reduce costs.
  • Throughput requirements depend on access patterns: random small reads vs. sequential large reads.
  • Use replication and erasure coding for durability, but factor in the cost multiplier.
  • Network egress and API request costs can be significant at scale; consider batching and compression.
  • Estimate compute needs by dividing total IOPS by per-instance IOPS, then add redundancy.
  • Validate estimates with a small-scale benchmark or reference architecture (e.g., AWS S3 pricing calculator).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.