Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan

Decompose ML Recommendations Monolith

MediumSystem Design00:00
Practice interviewer
In session
5 left
00:00

Your question is Decompose ML Recommendations Monolith. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Product Context

ShopStream is a large ecommerce app whose home feed and product detail recommendations are currently served by a single monolithic service. The company wants to decompose it into microservices while preserving recommendation quality, latency, and operational reliability.

Scale

SignalValue
DAU35M
Peak recommendation QPS180K
Product catalog120M active SKUs
New/updated items per day4M
Avg candidates scored per request2K
End-to-end p99 latency budget180ms

Task

Design the target ML system and service boundaries for a personalized recommendation stack after decomposing the monolith. Your design should address both system architecture and ML lifecycle concerns.

  1. Define the microservices you would create and the APIs or communication patterns between them.
  2. Propose an end-to-end recommendation architecture, including candidate generation, ranking, and re-ranking.
  3. Explain what should run online vs batch, and how features, models, and indexes are produced and served.
  4. Describe how you would evaluate the system offline and online during migration from the monolith.
  5. Identify key failure modes introduced by service decomposition, including feature drift and training-serving skew, and how you would monitor and mitigate them.
  6. Discuss migration strategy, fallbacks, and how to keep the system available if one downstream service is slow or unavailable.

Constraints

  • 25% of traffic comes from anonymous or low-history users.
  • Product freshness matters: inventory, price, and promotions change within minutes.
  • The business requires graceful degradation: if personalization fails, the app must still return recommendations.
  • Infra cost cannot increase by more than 30% versus the monolith during the first migration phase.
  • User-level training data must remain in-region for compliance, so some features/models may be region-specific.