← Attentive Interview Insights

Attentive·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jul 2026

Summary

System design round at Attentive for a software engineer role, focused entirely on building a broadcast messaging service. Pretty deep dive, they pushed hard on the scheduling and delivery reliability parts.

Questions Asked (6)

Q1

Design a broadcast messaging service that lets companies schedule messages to all their subscribers at a future time, with support for querying by time range and guaranteed eventual delivery.

System DesignAPI & IntegrationsData Modeling
Author's notes

Big open-ended one to kick things off.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, delivery guarantees, message types) and then design a high-level architecture with separate scheduling, storage, and delivery components. Focus on how to handle time-based queries efficiently and ensure eventual delivery through retries and dead-letter queues.

Pro tip: Discuss trade-offs between using a database with time-series indexing versus a dedicated scheduler like Quartz or a distributed cron, and emphasize idempotency and at-least-once delivery to avoid duplicate messages.

1. Clarify Requirements

Ask about scale (number of companies, subscribers, messages per day), delivery guarantees (at-least-once, exactly-once), and query patterns (time range queries for analytics or message status).

2. High-Level Architecture

Propose a system with an API for scheduling, a persistent store for scheduled messages, a scheduler service that triggers at the right time, and a delivery service that sends messages to subscribers.

3. Data Modeling and Storage

Design tables for messages, schedules, and subscribers. Use time-based indexes (e.g., on scheduled_time) to support efficient range queries. Consider partitioning by time for scalability.

4. Scheduling and Delivery

Explain how the scheduler picks up due messages (e.g., polling, priority queue, or distributed cron) and hands them to a delivery queue. Ensure eventual delivery with retries and dead-letter queues.

5. Scalability and Reliability

Address scaling the scheduler (sharding by company or time), handling failures (idempotent consumers, retries), and monitoring (metrics, alerts).

Key Points to Mention

  • Time-based indexing and efficient range queries (e.g., using B-tree indexes or time-series databases)
  • At-least-once delivery with idempotency to avoid duplicates
  • Use of message queues (e.g., Kafka, SQS) for decoupling and buffering
  • Sharding strategies for scaling the scheduler and storage
  • Retry mechanisms and dead-letter queues for failed deliveries
  • Monitoring and alerting for delivery latency and failures

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

Q2

What does the storage schema look like for companies, subscribers, scheduled broadcasts, and delivery state?

Data ModelingSystem Design
Author's notes

I sketched out four tables pretty quickly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the core entities and their relationships, then propose a normalized relational schema with primary and foreign keys. Discuss how delivery state is tracked, including status fields and timestamps, and consider scalability and indexing for high-volume broadcasts.

Pro tip: Mention that delivery state should be stored separately from the broadcast definition to avoid write contention and enable efficient querying of per-subscriber statuses. Also, highlight the importance of idempotency keys for exactly-once delivery.

1. Identify entities and relationships

List the main entities: companies, subscribers, scheduled broadcasts, and delivery state. Clarify that a company has many subscribers and broadcasts, and each broadcast has many delivery states (one per subscriber).

2. Design core tables

Propose tables: companies (id, name, ...), subscribers (id, company_id, email, ...), scheduled_broadcasts (id, company_id, content, scheduled_at, status). Include primary keys and foreign keys.

3. Model delivery state

Create a delivery_state table with broadcast_id, subscriber_id, status (e.g., pending, sent, delivered, failed), timestamps, and error details. Use a composite primary key or unique constraint on (broadcast_id, subscriber_id).

4. Address scalability and indexing

Discuss indexing strategies for frequent queries (e.g., index on broadcast_id and status for delivery state). Consider partitioning or sharding for large volumes, and mention potential use of NoSQL for delivery logs if write-heavy.

5. Discuss trade-offs and extensions

Mention trade-offs between normalization and denormalization, and how to handle updates to broadcast content or subscriber lists. Optionally, discuss audit trails or event sourcing for delivery state changes.

Key Points to Mention

  • Normalization to reduce redundancy and maintain data integrity
  • Foreign key constraints to enforce relationships
  • Composite key or unique constraint for delivery state to prevent duplicates
  • Indexing on foreign keys and status columns for query performance
  • Partitioning or sharding strategies for high-volume delivery state
  • Idempotency and exactly-once delivery considerations

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

Q3

Walk me through how the scheduler determines which broadcasts are ready to be sent.

System DesignTechnical Trade-offs
Author's notes

Talked about polling a scheduled_broadcasts table for rows where send_time is in the past and status is pending.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope: assume a scheduler that processes broadcasts for a messaging platform like Attentive. Then walk through the lifecycle from broadcast creation to readiness, focusing on the key conditions (time, audience, content, system state) and how the scheduler evaluates them efficiently. End by discussing trade-offs in polling vs. event-driven design and how you'd handle scale.

Pro tip: Show you understand that 'ready' is a business and technical decision: a broadcast might be ready by schedule but blocked by rate limits or content approval. Mentioning idempotency and exactly-once semantics will signal maturity.

1. Define readiness criteria

List the conditions that must be met for a broadcast to be considered ready: scheduled time reached, audience segment computed, content approved, and no system-level blocks (e.g., rate limits, maintenance).

2. Explain the scheduler's data model

Describe how broadcasts are stored (e.g., in a database with status and next_run_at) and how the scheduler queries for candidates, using indexes and time buckets to avoid full scans.

3. Walk through the evaluation loop

Detail the periodic or event-driven process: fetch due broadcasts, check each readiness condition (time, audience, content, system state), and transition them to a 'ready' queue or mark as blocked with reasons.

4. Handle concurrency and scale

Discuss how to avoid duplicate sends (e.g., distributed locks, idempotency keys) and how to partition work across multiple scheduler instances for high throughput.

5. Discuss trade-offs and failure modes

Compare polling vs. event-driven triggers, and explain how you'd handle missed schedules, retries, and backpressure when downstream systems are slow.

Key Points to Mention

  • Scheduled time vs. actual send time and time zone handling
  • Audience segmentation and dynamic segment evaluation
  • Content approval workflow and personalization readiness
  • Rate limiting and throttling to protect downstream services
  • Idempotency and exactly-once delivery guarantees
  • Monitoring and alerting for stuck or delayed broadcasts

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

Q4

Is a simple polling model acceptable for the scheduler, and how would you improve it at larger scale?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

Said polling is fine to start, then moved to talking about a message queue with delayed delivery or a dedicated scheduling service.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that a simple polling model can be acceptable for small-scale systems, but then discuss its limitations and how to evolve it for larger scale. Focus on trade-offs between simplicity, latency, and resource usage, and propose concrete improvements like event-driven architectures or hierarchical scheduling.

Pro tip: Demonstrate awareness of operational costs: polling at scale can lead to thundering herd problems and wasted resources, so emphasize the importance of backoff strategies and load shedding. Also, relate your answer to Attentive's scale and real-time messaging needs.

1. Clarify requirements and scale

Ask about the expected scale (number of jobs, frequency, latency requirements) and the current system constraints to determine if polling is acceptable.

2. Evaluate polling trade-offs

Discuss pros (simplicity, ease of implementation) and cons (latency, resource waste, scalability bottlenecks) of a polling-based scheduler.

3. Propose improvements for scale

Suggest alternatives like event-driven scheduling, priority queues, distributed schedulers (e.g., using Redis, Kafka), or hierarchical timing wheels.

4. Address implementation details

Explain how to handle failures, ensure exactly-once semantics, and manage concurrency (e.g., using leases, idempotency).

5. Summarize and recommend

Conclude with a recommendation based on scale, emphasizing a hybrid approach if appropriate, and highlight monitoring and metrics.

Key Points to Mention

  • Polling interval trade-off: shorter intervals reduce latency but increase load; longer intervals do the opposite.
  • Thundering herd problem and how to mitigate with jitter and exponential backoff.
  • Event-driven architectures using message queues (e.g., Kafka, RabbitMQ) for scalability.
  • Distributed scheduling with leader election (e.g., using ZooKeeper, etcd) to avoid single point of failure.
  • Use of timing wheels or priority queues for efficient job scheduling.
  • Monitoring and metrics to detect bottlenecks and adjust polling frequency dynamically.

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

Q5

How do you handle idempotency, retries, duplicate prevention, and failures in the delivery pipeline?

System DesignTechnical Trade-offs
Author's notes

This is where I blanked for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the delivery pipeline context (e.g., message queue, event-driven system) and then systematically address idempotency, retries, duplicate prevention, and failure handling. Emphasize trade-offs between consistency, latency, and complexity, and give concrete examples of patterns like idempotency keys, exponential backoff, and dead-letter queues.

Pro tip: Demonstrate maturity by discussing how you monitor and alert on duplicate rates and retry exhaustion, and how you balance idempotency with performance—e.g., using lightweight deduplication windows instead of full transactional guarantees when appropriate.

1. Clarify the pipeline and requirements

Ask about the delivery guarantees needed (at-least-once, at-most-once, exactly-once) and the system components (producers, queues, consumers). This shows you tailor solutions to context.

2. Design for idempotency

Explain how you make operations idempotent, such as using idempotency keys, unique constraints, or upserts. Mention that idempotency is key to safe retries.

3. Implement retries with backoff and jitter

Describe retry strategies: exponential backoff with jitter to avoid thundering herd, and max retry limits. Discuss when to retry vs. fail fast.

4. Prevent duplicates

Cover deduplication techniques: idempotency keys, message deduplication IDs, or stateful deduplication stores. Mention trade-offs like storage cost vs. accuracy.

5. Handle failures gracefully

Explain failure handling: dead-letter queues, alerting, compensating transactions, and manual intervention. Emphasize observability and recovery.

Key Points to Mention

  • Idempotency keys and their role in preventing duplicate processing
  • Exponential backoff with jitter for retries
  • Dead-letter queues for poison messages
  • Deduplication strategies (e.g., Redis, database unique constraints)
  • Trade-offs between exactly-once semantics and system complexity
  • Monitoring and alerting on retry rates and duplicate detection

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

Q6

Should the recipient list be evaluated at schedule time or at the time the message is actually sent?

Technical Trade-offsProduct Sense & Ideation
Author's notes

Actually enjoyed this one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Acknowledge that the answer depends on product requirements and system constraints, then compare the trade-offs of evaluating at schedule time versus send time. Recommend a hybrid approach or a configurable design that balances consistency, freshness, and performance, and tie it back to Attentive's use case of personalized messaging.

Pro tip: Show that you understand the business impact: evaluating at send time enables real-time personalization but risks inconsistency if the audience changes, while schedule-time evaluation ensures predictability but may miss recent updates. Mention that the right choice often depends on whether the message is transactional or promotional.

1. Clarify requirements

Ask about the message type, expected audience size, tolerance for stale data, and whether personalization or compliance requires up-to-date recipient info.

2. Evaluate schedule-time pros and cons

Discuss benefits like predictable load, simpler debugging, and consistent snapshots, versus drawbacks like stale lists and missed real-time changes.

3. Evaluate send-time pros and cons

Highlight benefits like freshness, dynamic segmentation, and compliance with opt-outs, versus drawbacks like higher latency, complex concurrency, and potential inconsistency across a large send.

4. Propose a hybrid or configurable solution

Suggest evaluating at schedule time for the base list but re-validating critical attributes (e.g., opt-outs, suppression lists) at send time, or making the behavior configurable per campaign.

5. Summarize recommendation and trade-offs

Conclude with a clear recommendation based on the clarified requirements, and restate the key trade-offs and how they align with business goals.

Key Points to Mention

  • Consistency vs. freshness of recipient data
  • Performance and scalability implications (e.g., database load, latency)
  • Compliance and opt-out handling (e.g., CAN-SPAM, GDPR)
  • User experience and personalization accuracy
  • Idempotency and error handling for send-time evaluation
  • Cost and complexity of maintaining real-time recipient resolution

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