This question evaluates system design and operational engineering skills in process memory management, runtime configurability, observability, and reliability, and belongs to the System Design domain; it primarily tests practical application with system-level conceptual reasoning.
You are designing an in-process memory guardrail for a backend service. The component monitors current memory consumption and toggles the application between modes to protect availability under memory pressure. It must operate on Linux and macOS, including containerized environments.
Design a memory usage switcher that monitors process memory and flips the application between NORMAL and DEGRADED modes when usage crosses configurable thresholds. Include the API, state logic (with hysteresis), runtime configurability, OS/container integration, multi-tenant budgeting, observability, reliability, and testing.
Login required