system design

Low Level Design: Dashboard Service

Data Model

Dashboard Table

Dashboard (
  id,
  name,
  owner_id,
  layout JSONB,  -- grid positions
  created_at
)

Widget Table

Widget (
  id,
  dashboard_id,
  type: line_chart | bar_chart | number | table | heatmap,
  query_id,
  title,
  position JSONB,
  refresh_interval_seconds
)

Query Table

Query (
  id,
  metric,
  dimensions,
  filters,
  aggregation,
  time_granularity
)

Dashboard Render

  • Load dashboard config (widgets, layout). This is one read that joins the Dashboard and Widget rows, returning the grid positions and each widget’s query reference — but no metric data yet. Keep config separate from data so the frontend can paint the empty grid immediately, and run the permission check here before any query executes.
  • Parallel fetch all widget data. Fan out one concurrent request per widget instead of fetching serially, so a dashboard with twenty widgets renders in the time of its slowest query rather than the sum of all of them. Give each fetch its own timeout and return partial results — one slow or failing widget should never block the rest of the board.
  • Return combined response to client. Shape the payload as a map of widget_id -> result so the frontend can drop each result into its grid slot without reordering. Include a per-widget status field so a widget that timed out or errored renders an error state while its neighbors render normally.

Data Fetch & Caching

Each widget query hits Redis cache first. On miss, executes against metrics store (TimescaleDB or ClickHouse). Result cached with TTL equal to refresh_interval_seconds.

Real-Time Refresh

Client polls /dashboards/:id/data every N seconds, or WebSocket push is used on metric update for lower latency.

Time Range Selector

Global time range selector applies to all widgets on the dashboard simultaneously.

Drill-Down

Clicking a chart segment applies a filter and reloads only the affected widgets.

Sharing

DashboardShare Table

DashboardShare (
  dashboard_id,
  user_id or team_id,
  permission: view | edit
)

Snapshot Export

Dashboard can be exported as PNG via headless Chrome screenshot.

Template Library

Pre-built dashboard templates per use-case (e.g., SaaS metrics, infrastructure monitoring, sales pipeline).

See also: Databricks Interview Guide 2026: Spark Internals, Delta Lake, and Lakehouse Architecture

See also: Netflix Interview Guide 2026: Streaming Architecture, Recommendation Systems, and Engineering Excellence

See also: Atlassian Interview Guide

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

newsletter

What's actually being asked right now

Interview patterns & comp trends, straight to your inbox.

No spam. Unsubscribe anytime.

1972 Soviet postage stamp commemorating the Mars 2 probe

worth a read

Mars For The Rest of Us — a weekly-or-more deep dive on the technical side of Mars exploration: rocket propulsion, microbiology, mission architecture, and everything in between. Written by Maciej Ceglowski.

Read it on Substack →
Scroll to Top