Whenever you're ready, walk me through how you'd approach this.
Tell me about designing a scalable RESTful API for a social media application that supports millions of users and handles high concurrency.
Clarify the API’s core resources, consistency requirements, traffic profile, and latency and availability objectives before proposing an architecture. Explain how you would design request routing, storage, caching, asynchronous processing, observability, security, and any ML-powered stages such as abuse detection or personalized ranking without allowing them to compromise API reliability.
Discuss capacity planning, graceful degradation, and how you would evaluate the system in production.