2. Which of the following is a common method used in news feed generation to deliver updates efficiently?
easy
A. Manual refresh by users only
B. Push model where updates are sent to users proactively
C. Storing all data in a single database without caching
D. Using FTP to transfer news feed data
Solution
Step 1: Identify common delivery methods in news feed systems
Push model proactively sends updates to users, improving latency and experience.
Step 2: Evaluate other options for efficiency
Manual refresh is user-driven and less efficient; no caching slows performance; FTP is unrelated to real-time feed delivery.
Final Answer:
Push model where updates are sent to users proactively -> Option B
Quick Check:
Push model = efficient update delivery [OK]
Hint: Push model proactively sends updates [OK]
Common Mistakes:
Assuming manual refresh is efficient
Ignoring caching benefits
Confusing FTP with real-time data delivery
3. Consider a news feed system using a pull model where users request their feed on demand. What is a likely outcome when many users request feeds simultaneously?
medium
A. Users receive outdated feeds only
B. Instant delivery with no server load
C. System automatically caches all feeds without delay
D. High latency and increased load on backend servers
Solution
Step 1: Understand pull model behavior under load
Pull model requires backend to generate feeds on request, causing high load if many users request simultaneously.
Step 2: Analyze other options for feasibility
Instant delivery with no load is unrealistic; outdated feeds depend on caching, not pull model alone; automatic caching without delay is ideal but not guaranteed.
Final Answer:
High latency and increased load on backend servers -> Option D
Quick Check:
Pull model + many requests = high load [OK]
Hint: Pull model causes backend load spikes [OK]
Common Mistakes:
Assuming pull model has no latency
Confusing caching with pull model behavior
Believing feeds are always instantly cached
4. A news feed system uses a push model but users report seeing stale content. Which is the most likely cause?
medium
A. Cache not invalidated after new content is pushed
B. Users are not refreshing their browsers
C. Backend servers are down
D. Users have slow internet connections
Solution
Step 1: Identify push model behavior and caching role
Push model sends updates, but if cache is not invalidated, users see old content.
Step 2: Evaluate other options for staleness cause
Browser refresh is less relevant in push; backend down causes no updates; slow internet delays but does not cause stale cached data.
Final Answer:
Cache not invalidated after new content is pushed -> Option A
Quick Check:
Push + stale feed = cache invalidation issue [OK]
Hint: Stale feed often means cache invalidation failed [OK]
Common Mistakes:
Blaming user refresh instead of cache
Ignoring cache invalidation importance
Assuming slow internet causes stale cache
5. You are designing a news feed system for a platform with 100 million users. Which approach best balances scalability and freshness of content?
hard
A. Hybrid model: push important updates and pull less critical content
B. Pure pull model: generate feed on every user request
C. Pure push model: push all updates to all users immediately
D. No caching: always fetch fresh data from database
Solution
Step 1: Analyze scalability and freshness needs for large user base
Pure pull causes high load; pure push is costly and complex; no caching is inefficient.
Step 2: Evaluate hybrid model benefits
Hybrid model pushes critical updates for freshness and uses pull for less urgent content, balancing load and latency.
Final Answer:
Hybrid model: push important updates and pull less critical content -> Option A
Quick Check:
Hybrid model balances scale and freshness [OK]
Hint: Hybrid push-pull balances scale and freshness [OK]