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

  1. Load dashboard config (widgets, layout).
  2. Parallel fetch all widget data.
  3. Return combined response to client.

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

Scroll to Top