Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Frontend Alarm Management Console

Design a responsive monitoring portal with alarm configuration, live status, bounded log and metric views, and honest reconnect behavior.

Problem statement

For this exercise, assume authenticated operators use a browser console for one authorized workspace. They create, edit or disable several CPU alarms, such as a rule that fires above 90 percent, and inspect current alarm status, recent service metrics and log pages.

The backend already ingests telemetry, evaluates rules and stores authoritative alarm transitions; design the browser application and its API and live-update contracts, rather than the telemetry evaluator.

Each rule has a stable ID and increasing configuration version. Each status carries its rule version, increasing status revision, evaluation time, latest firing time and normal, firing or unknown state. Missing or stale information must appear as unknown or stale, never as proof of health.

Operators must see current firing alarms promptly and distinguish a recently fired alarm that has already resolved. The backend supplies a consistent workspace snapshot with a resume cursor, an ordered replayable change stream and bounded per-alarm transition history.

Repeated deliveries may occur; an expired cursor requires a fresh snapshot. Discuss an equivalent polling design if it meets the same outcome.

For this exercise, use idempotent configuration mutations with optimistic version checks. Results from an older workspace, query or request must not overwrite the active view. Explain component and state ownership, API outcomes, sorting and filtering, bounded rendering, reconnect, overload and measurement.

Live row coalescing may skip intermediate states, but the latest firing marker and authoritative history must remain available. Cross-workspace administration, backend anomaly algorithms and email or mobile-push delivery are outside scope. No particular frontend framework or transport is required.

For this exercise, the backend also supplies an authoritative workspace summary containing current firing count, latest firing time and an increasing firing-sequence marker. Render that summary even when the affected alarm row is outside the loaded page.

The two-second target applies to covering new firing activity in this active foreground workspace projection; a newer rendered marker may cover several transitions without claiming they were individually painted. Full per-alarm transition history remains separately queryable.

On tab activation, show stale/loading state until refresh or replay restores current coverage.

What to build

  1. An authorized operator can create, inspect, edit and disable workspace alarms with explicit pending, conflict and failure outcomes.
  2. Operators can sort and filter alarm rows, page service logs and inspect bounded metric windows without mixing workspaces or query versions.
  3. The console displays current alarm state, freshness and recent firing evidence, resumes after disconnect and exposes gaps or overload honestly.

At scale

  • For this exercise, support 10000 concurrent browser sessions and up to 10000 configured alarms in one workspace; fetch bounded pages and render at most 200 rows at once.
  • For this exercise, handle 100 status changes per second per viewed workspace normally, with short 10000-per-second bursts; prioritize correctness and expose lag or resync when the client cannot keep up.
  • For this exercise, under normal load with healthy connected delivery, in an active foreground console for the selected workspace, reflect 99 percent of newly accepted firing activity within two seconds: a rendered workspace summary or loaded alarm row must carry a firing-sequence marker at least as new as that activity. This measures coverage by the current/recent projection, not a separate painted frame for every transition. Keep routine sorting or filtering below 100 milliseconds on a typical laptop. Background tabs and other workspaces refresh on activation with visible freshness.
  • For this exercise, retain ten minutes of replayable change history and seven days of bounded per-alarm transition history; a cursor outside the replay window returns an explicit resnapshot response.