Big Data 9 min read

How to Build a High‑Availability Real‑Time Logistics Dashboard with Flink and ClickHouse

This article details the design and implementation of a high‑availability, real‑time logistics supply‑chain dashboard, covering Flink‑based data pipelines, ClickHouse OLAP storage, metric consistency, stability measures, extensible configuration, and comprehensive monitoring to ensure accurate, scalable performance during major promotions.

JD Cloud Developers
JD Cloud Developers
JD Cloud Developers
How to Build a High‑Availability Real‑Time Logistics Dashboard with Flink and ClickHouse

Overview

In logistics systems, the supply‑chain dashboard is complex, with long data chains and high stability requirements; after two years of iteration it has become mature and stable.

Key Technologies

1. Flink data processing pipeline and OLAP engine

We use real‑time Flink combined with ClickHouse to build the base model, enabling one‑click switching via dual streams and EasyData.

2. Metric consistency

Processing and presentation are separated; atomic warehouse metrics can be rolled up to regional and national levels, ensuring dimensional and temporal consistency, with caching layers for various scenarios.

3. Stability construction

Data link stability

Service fallback

Metric validation mechanisms

Recalculation mechanisms

Various issues have been encountered, such as CK partition blocking, network failures, Flink message loss, checkpoint failures, and complex logic causing back‑pressure.

Background

The supply‑chain dashboard supports real‑time monitoring during major promotions, providing over 170 metrics refreshed every minute from multiple data sources.

Solution

2.1 Data model storage selection

We compared Elasticsearch and ClickHouse; ClickHouse offers superior write and query performance for OLAP workloads, though Elasticsearch may be used when high concurrency or full‑text search is needed.

2.2 Overall architecture

The architecture consists of five layers: model processing, data processing, single‑warehouse metric processing, regional metric processing, and presentation, each with defined responsibilities.

2.3 Metric layering and consistency design

All warehouse‑order metrics share a single processing logic; after the primary task finishes, higher‑level metrics are derived, ensuring data consistency. Caching tables improve query performance for different reports.

2.4 Stability design

We isolate the Flink‑ClickHouse link with dual streams for quick failover. Common failure points include CK partition overload, rename delays, network outages, message loss, checkpoint failures, uneven sharding, missing dimension tables, and complex operator back‑pressure.

2.5 Extensibility design

Configuration‑driven UCC adapts to business needs, covering 4H/24H/28H modes, threshold switches, whitelist for auto‑refresh, historical date selection, and recalculation mechanisms.

{
  "thresholdEnable": "false",
  "upperLimit": "1.6d",
  "lowerLimit": "0.6d",
  "zyShowFlag": true,
  "swShowFlag": true,
  "jjShowFlag": true,
  "wdShowFlag": true,
  "todayTradeCleanRateShowFlag": true,
  "promotionTradeCleanRateShowFlag": true,
  "isDebug": true,
  "isCacheOn": true,
  "isWriteMinuteAndHour": true,
  "isMinuteWrite": true,
  "isHourWrite": true,
  "isMinuteNotice": false,
  "isHourNotice": false
}

Comparison strategy configuration

{
  "sTime": "2023-06-17 00:00:00",
  "eTime": "2023-06-17 19:59:59",
  "tbSTime": "2022-06-17 00:00:00",
  "tbETime": "2022-06-17 19:59:59",
  "hbSTime": "2022-11-10 00:00:00",
  "hbETime": "2022-11-10 19:59:59",
  "showType": "24h",
  "special24hCompDateStr": "2022-06-17",
  "specialCompDateStr": ""
}

2.6 Data monitoring

We combine automated front‑end snapshots, packet capture, minute‑level database logging with Grafana dashboards, and JD Power testing models to verify and troubleshoot data accuracy.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Big Datadata pipelineFlinkClickHousereal-time monitoringDashboard
JD Cloud Developers
Written by

JD Cloud Developers

JD Cloud Developers (Developer of JD Technology) is a JD Technology Group platform offering technical sharing and communication for AI, cloud computing, IoT and related developers. It publishes JD product technical information, industry content, and tech event news. Embrace technology and partner with developers to envision the future.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.