A feed ranking component often depends on feature providers, scorers, clocks, loggers, and fallback policies. Interviewers use this question to evaluate whether you can design code that is modular, testable, and resilient.
Design an interface for ranking feed items and explain how you would structure dependency injection, test seams, and error handling.
Your answer should address:
Focus on code-level design rather than large-scale distributed architecture. The interviewer expects clear interfaces, sensible abstractions, examples of injectable dependencies, and practical handling of recoverable vs non-recoverable errors. You should discuss trade-offs, not just list patterns.