KatInterview

Building a Staleness Detection System for Job Postings

System DesignModel answer
HardModel answerSystem Designdistributed-systemsevent-processingstate-machines

Last updated

Design a system to identify and handle outdated job listings through signal aggregation, graduated enforcement, and employer dispute resolution.

Context

Online job platforms face a persistent challenge: employers often forget to close job postings after hiring or canceling positions. These outdated listings frustrate job seekers, clutter search results, and reduce platform quality. Your task is to design a production system that automatically detects and manages stale postings while giving employers a fair chance to correct mistakes.

Your Task

Design an end-to-end staleness management system that:

Core Capabilities

  • Collects diverse freshness indicators: Aggregate signals from multiple sources—job seeker complaints ("this role is filled"), recruiter engagement patterns (login frequency, application reviews), third-party applicant tracking system (ATS) feeds, and automated career page monitoring.
  • Computes staleness with progressive action: Convert raw signals into a staleness metric that drives incremental consequences: Active → Demoted in Rankings → Hidden from Search (but accessible via direct URL) → Archived.
  • Enables instant dispute resolution: When an employer claims "we're still hiring," immediately reverse the demotion with search visibility restored in seconds, not minutes.
  • Maintains complete transparency: Log every decision with full reasoning—which signals triggered what action—so disputes can be investigated and models can be improved.

Scale Constraints

  • Volume: 50 million live job postings; 2 billion in historical archives. Process 150 million daily events from users and systems.
  • Performance: Employer disputes must restore search ranking within 2 seconds. Automated state changes should reach search infrastructure in under 5 minutes.
  • Reliability: Avoid catastrophic false positives—if a monitoring pipeline fails, don't accidentally hide thousands of valid jobs.

What to Cover in Your Design

  1. System Architecture: How signals flow from sources through processing to enforcement. Choose between streaming and batch where appropriate.
  2. Data Structures and State Logic: Define the state transition rules, storage schemas for time-series signals versus current status, and audit trail format.
  3. Key Interfaces: Sketch the critical APIs for signal submission, employer appeals, and administrative review.
  4. Robustness Strategies: Explain how you'll detect and prevent mass false positives, handle contradictory signals, and keep search indexes synchronized.

Hints

Hint 1

Separate signal collection and scoring from enforcement decisions—this isolation lets you test new detection algorithms without accidentally demoting real jobs

Hint 2

Think carefully about what happens when data sources go offline; treating missing recruiter activity as proof of abandonment could cause cascading failures

Hint 3

Implement rate-limiting safeguards that pause bulk demotions when anomaly thresholds are exceeded, requiring human confirmation before proceeding