Design a Background Sync Scheduler for the Facebook Mobile App

Last updated: November 29, 2026

Quick Overview

Design the on-device and server components that decide when the Facebook app syncs in the background (prefetching feed, uploading queued posts, refreshing notifications) so content is fresh on open while respecting battery, data plans, and OS background limits.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the on-device and server components that decide when the Facebook app syncs in the background (prefetching feed, uploading queued posts, refreshing notifications) so content is fresh on open while respecting battery, data plans, and OS background limits.

Meta's mobile infrastructure teams care about cold-start freshness on billions of devices, many on slow networks and prepaid data. The interviewer checks job prioritization on the client, cooperation with Android WorkManager and iOS background fetch limits, and server-side jitter to avoid synchronized load spikes.

What the Interviewer Expects
  • Classify background jobs by urgency and constraints
  • Use OS schedulers with constraints instead of custom timers
  • Coalesce work into batches to save radio wakeups
  • Adapt to network type, battery, and data saver mode
  • Add jitter and server hints to prevent thundering herds
Key Topics to Cover
mobile background work
job constraints
batching
jitter
server-driven backoff
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you predict when a user will open the app next?
  • How do you handle an upload that keeps failing on a flaky 2G network?
  • How would the server tell clients to back off during an incident?
  • How do you measure the battery cost of these jobs?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Jobs: (1) user-initiated uploads that failed (post, photo) are high priority; (2) feed prefetch before predicted open; (3) notification and badge refresh; (4) analytics log upload; (5) config and ...

High-Level Design

Client: a job manager in the app wraps Android WorkManager / JobScheduler and iOS BGTaskScheduler. Jobs register with type, constraints, and backoff policy. When the OS grants a window, the manage...


Submit Your Answer
Markdown supported