Big Data Architecture Explained: Layers, Components & Real-Time Pipeline
This article explains big data technology architecture by tracing a real-time sales dashboard pipeline, detailing each layer—data sources, ingestion, messaging, storage, compute, query, visualization—and cross-cutting concerns like scheduling, metadata, quality, and resource management, while comparing offline, real-time, lakehouse, and cloud-native architectures and distinguishing technical layers from data warehouse layers.
Reading font
Complete Data Pipeline: Real-Time Sales Dashboard Example
The article opens with a concrete scenario: building a real-time sales dashboard for an e-commerce company. When a user places an order, the business system writes it to MySQL. Operations staff want to see real-time order count, sales amount, and product rankings on a dashboard. A typical processing pipeline is:
MySQL : source of order data.
Flink CDC : captures order changes in real time.
Kafka : buffers and transports high-volume order events.
Flink : computes order count and sales amount.
Doris : provides fast analytical queries.
Superset : visualizes results for operations.
Note: this is one common combination; real projects may not use Kafka or every component listed.
Architecture Overview
For clarity, the big data stack is divided into layers by technical responsibility. The first seven layers cover the main data processing flow; the last five provide cross-cutting support. This layering is a learning aid, not a strict standard—components often play multiple roles, and data does not have to pass through every layer sequentially.
Data Source Layer
Data sources are the starting point, generating or providing raw data. Common sources include:
Business databases : MySQL, PostgreSQL, Oracle (e.g., order tables, user tables).
NoSQL databases : MongoDB, Redis (e.g., user profiles, cached data).
Log data : application logs, Nginx logs, error logs.
File data : CSV, JSON, Excel, Parquet.
Business events : user browsing, clicks, orders, payments.
External data : third-party platforms, REST APIs.
Example: after a user places an order on an e-commerce platform, the order is first saved in the business database; the big data platform later syncs it for analysis.
Data Ingestion & Synchronization Layer
Enterprise data is scattered across systems (orders in MySQL, products in PostgreSQL, user behavior in logs, external data via APIs). This layer ingests dispersed data into the target system.
Common Components
DataX : scheduled batch data synchronization.
SeaTunnel : connects diverse sources, supports batch and streaming integration.
Flink CDC : captures database changes, builds real-time sync pipelines.
Debezium : captures database change events.
Canal : subscribes to MySQL-compatible database changes.
Airbyte, Apache NiFi : multi-source integration and data flow management.
Kafka Connect : connects Kafka with external data systems.
Fluent Bit, Filebeat, Logstash : log collection, processing, and forwarding.
Key Concepts
Full vs. Incremental Sync
Assume an order table already has 1 million rows:
Full sync : reads and syncs all 1 million rows.
Incremental sync : syncs only newly added or changed rows thereafter.
Real projects often do an initial full sync followed by continuous incremental sync.
What is CDC?
CDC (Change Data Capture) captures data changes in a database. For example, when inserts, updates, or deletes occur in an order table, CDC tools capture those changes and send them downstream.
MySQL order changes
↓
CDC captures changes
↓
Sync to Kafka, data lake, or analytical databaseETL vs. ELT
ETL : Extract → Transform → Load.
ELT : Extract → Load → Transform (using target system for transformation).
Messaging Transport Layer
When upstream systems produce data faster than downstream can consume, a messaging layer acts as a buffer, decoupling producers and consumers.
Common Components
Kafka : widely used for logs, CDC, high-throughput real-time pipelines.
Pulsar : supports messaging and event streaming with multi-tenancy.
RocketMQ : often used for business messaging, async decoupling.
Typical scenario: Order system → Kafka (buffers order events) → Flink (consumes and computes) → real-time sales metrics.
Kafka handles storage, transport, and subscription; Flink handles joins, aggregations, and other computations. They complement each other but have distinct responsibilities.
Data Storage & Data Lake Layer
After ingestion, data needs a place to live. This layer is often confusing because HDFS, S3, Parquet, Iceberg appear together but solve different problems.
Illustrative Stack
S3 + Parquet + Iceberg + Spark
S3: where data files are stored
Parquet: internal file format
Iceberg: organizes files into tables and manages versions
Spark: reads and processes the dataDistributed & Object Storage
HDFS : distributed file system for storing massive files.
Amazon S3 : object storage for cloud data lake storage.
Alibaba Cloud OSS : object storage for cloud data storage.
Azure Blob Storage, Google Cloud Storage : object storage for cloud data storage.
MinIO : S3-compatible object storage for self-hosted object storage.
Data File & Exchange Formats
Parquet : columnar format, ideal for analytical compute.
ORC : columnar format, common in Hive ecosystem.
Avro : used for serialization and data exchange.
Apache Arrow : in-memory columnar format and cross-system data exchange.
Example: an order table has many columns, but an analytical query only needs "order amount" and "order time". Columnar formats let the engine skip irrelevant columns, reducing I/O.
Lake Table Formats
When a data lake contains many files, how do we know which files belong to which table? How to manage versions after updates? Lake table formats solve this.
Apache Iceberg
Apache Paimon
Apache Hudi
Delta Lake
They provide table metadata management, data updates, version control, etc. Example flow:
Business data
↓
Parquet files
↓
Stored in S3
↓
Iceberg manages tables and files
↓
Spark, Trino, etc. read and analyzeIn short: storage systems hold files, file formats organize file content, lake table formats manage tables and files.
Other Distributed Databases
HBase : low-latency random read/write at massive scale.
Cassandra : distributed wide-column store, high availability scenarios.
They differ from HDFS/S3 in access patterns; choose based on business access needs.
Data Compute & Processing Layer
Raw data is rarely ready for direct analysis. For instance, order data may contain test orders, duplicates, missing fields, or require joins with product and user info. This layer cleans, filters, joins, and aggregates.
Common Components
Spark : large-scale batch processing, SQL, data processing; also supports streaming.
Flink : stateful stream processing; also handles bounded data.
Hive : data warehouse SQL and table management.
MapReduce : traditional distributed batch processing; seen in legacy systems.
Kafka Streams : stream processing library within Kafka ecosystem.
dbt : SQL-based data transformation, modeling, and testing.
Batch vs. Stream Processing
To compute sales amount, two approaches exist:
Batch processing : accumulate data over a period, then compute centrally.
Every midnight
↓
Read yesterday's orders
↓
Compute yesterday's sales
↓
Generate daily reportStream processing : data continuously produced, system continuously processes.
Orders keep arriving
↓
Continuous ingestion and computation
↓
Continuously update real-time salesBatch suits daily reports, historical analysis; stream suits real-time dashboards, real-time risk control.
Understanding Spark and Flink
Spark : widely used for large-scale batch and SQL analytics; also supports streaming. Example: daily midnight calculation of yesterday's revenue using Spark SQL.
Flink : excels at stateful stream processing; can also process bounded data. Example: continuously updating per-minute revenue using Flink SQL.
They are not mutually exclusive; choice depends on latency requirements, data volume, team expertise, and existing architecture.
Common Compute Concepts
DAG : dependency graph of tasks or computation steps.
Task : concrete computation unit.
Parallelism : degree to which tasks can run in parallel.
Shuffle : redistributing data across machines for exchange.
State : saved computation state (e.g., cumulative count of a product sold).
Checkpoint : consistent state snapshot for fault recovery.
Watermark : mechanism representing event-time progress in stream processing.
Data Query & Service Layer
After processing, business users, reporting systems, or applications need convenient querying—e.g., hourly order counts today, top-10 products by sales, a user's operation logs, cross-source analysis.
Common Components
Analytical Databases : Doris, StarRocks, ClickHouse — multi-dimensional analysis and aggregation queries.
Distributed SQL Engines : Trino, PrestoDB, Impala — interactive SQL queries.
Search & Analytics : Elasticsearch, OpenSearch — full-text search, log search and analysis.
Embedded Analytics : DuckDB — local or embedded SQL analysis.
OLTP vs. OLAP
MySQL can query data, so why Doris/ClickHouse? They target different access patterns:
OLTP (Online Transaction Processing): business transactions—create order, update order status, query a user's orders.
OLAP (Online Analytical Processing): analytical processing—e.g., aggregate sales by region and category over the past year.
Example:
MySQL: query order #1001
Doris: aggregate today's sales by city, rank by sales descendingDoris vs. Trino
Doris, StarRocks, ClickHouse : analytical databases with both storage and query capabilities.
Trino : primarily provides distributed SQL query capability, accessing multiple external data sources.
Example: data resides in MySQL, Hive, and object storage; Trino can query across them.
Data Application & Visualization Layer
After collection, storage, and computation, data is queryable, but business users don't want to write SQL daily. They want to see: today's sales, best-selling product, order growth vs. yesterday, fastest-growing region.
This layer turns query results into reports, dashboards, and analytical applications. Common tools:
Apache Superset
Metabase
Power BI
Tableau
FineBI
Looker
BI tools help organize queries, interactive analysis, and presentation; underlying data storage and processing are not necessarily handled by the BI tool itself.
Cross-Cutting Concerns
The main data flow is not enough for production; we also need workflow scheduling, metadata governance, security, resource management, and monitoring.
Workflow Scheduling
Example daily pipeline:
Sync order data
↓
Clean order data
↓
Compute sales metrics
↓
Generate daily reportWith dependencies between steps, a workflow scheduler coordinates execution. Common tools: DolphinScheduler, Airflow, Dagster, Prefect.
Scheduler responsibilities: time-based triggering, dependency management, execution tracking, retry on failure, historical backfill.
Example: DolphinScheduler launches a DataX sync task; upon success, it triggers a Spark compute task.
Note: scheduler arranges tasks; actual data computation is done by Spark, Flink, etc.
Metadata & Data Governance
If a "today's sales" metric on the dashboard looks wrong, we need to answer: which source table? which compute tasks? which fields? who owns it? Metadata and data lineage provide this.
Common tools: DataHub, OpenMetadata, Apache Atlas; OpenLineage for lineage collection.
Core Concepts
Metadata : data about data—table names, column names, types.
Data Catalog : helps users discover and understand data assets.
Data Lineage : records flow from source to result.
Data Ownership : clarifies who is responsible for data.
Example lineage: MySQL order table → Spark cleaning job → Doris sales detail table → sales metric → ops dashboard. With lineage, upstream issues can be traced to downstream impact.
Data Quality & Security
Queryable data isn't necessarily correct: duplicate order IDs, null amounts, inconsistent metrics across reports, sensitive phone numbers exposed.
Tools:
Great Expectations, Soda, dbt tests : data quality checks and testing.
Apache Ranger : policy-based access control.
Kerberos : authentication.
Cloud IAM : cloud resource identity and access management.
Common quality checks: completeness, uniqueness, consistency, accuracy. Security: authentication, authorization, sensitive data masking.
Resource Management & Operations
Spark, Flink jobs run on machines consuming CPU, memory, disk, network. This layer addresses:
Which machine runs the job?
How much CPU/memory allocated?
Recovery after machine failure?
Observing job and cluster health?
Common components:
YARN : Hadoop ecosystem resource manager.
Kubernetes : container orchestration for containerized workloads.
Docker : application packaging and container runtime.
ZooKeeper, etcd : distributed coordination.
Prometheus : metrics collection and storage.
Grafana : dashboard visualization.
OpenTelemetry : observability data collection (metrics, logs, traces).
Distinguish two scheduling types:
Resource scheduling : allocates machines, CPU, memory to applications.
Task-internal scheduling : how compute engines distribute concrete tasks.
They operate at different levels and must work together.
AI & Machine Learning
Beyond reporting, big data feeds ML/AI—e.g., training recommendation models from historical orders and user behavior. Common components: Spark MLlib, Ray, PyTorch, TensorFlow, MLflow, Kubeflow. This is an extension capability, not required for every data warehouse.
Four Mainstream Data Architectures
After understanding layer responsibilities, we examine typical combinations in real projects.
Offline Data Warehouse Architecture
Suitable for daily order statistics, T+1 reports, historical analysis. T+1 means viewing yesterday's data today. Not pursuing second-level real-time, but handles large scheduled batches well.
Real-Time Data Architecture
Suitable for real-time sales, real-time order stats, user behavior analysis, risk monitoring. Continuously processes data but must handle out-of-order events, state management, consistency, and fault recovery.
Lakehouse Architecture
Lake table formats manage tables and data files; underlying files stored in S3, OSS, or HDFS; engines like Spark, Flink, Trino read/process as needed. Suits multi-engine data sharing, massive historical analysis, batch and stream processing.
Cloud-Native Data Warehouse Architecture
Uses more managed services, reducing infrastructure ops, but requires attention to service costs, capability boundaries, and vendor lock-in.
These are typical patterns; actual projects adjust per business needs—no single architecture fits all.
Data Warehouse Layering vs. Technical Architecture Layering
In big data learning, ODS, DWD, DWS, ADS are also called "layers", but they differ from technical architecture layers:
Technical architecture layering : focuses on component responsibilities—ingestion, storage, compute, query.
Data warehouse layering : focuses on data processing stage and business-oriented organization.
Common Data Warehouse Layers
ODS : receive and retain source system data (e.g., store synced raw orders).
DWD : clean, standardize, form detail data (e.g., remove invalid data, create standard order details).
DWS : aggregate by theme, form common metrics (e.g., aggregate order count and sales by date, shop).
ADS : organize data for specific applications (e.g., generate product ranking for ops dashboard).
DIM : manage dimension data (e.g., manage product, shop, region dimensions).
Real enterprises may use different names (STG, DWM, DM) and rules; follow your team's modeling standards.
Conclusion
This article covered the major layers of big data technical architecture—ingestion, transport, storage, compute, query, application—and cross-cutting capabilities like scheduling, governance, quality, security, resource management, and AI. It also introduced four common architecture patterns (offline, real-time, lakehouse, cloud-native) and clarified the distinction between technical architecture layers and data warehouse layers. The goal is to help readers build a holistic understanding of how big data components relate and work together.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.