Trino architecture
A Trino cluster contains one coordinator and one or more workers that together plan queries, read data from the data sources, and return results in parallel.
A Trino Virtual Warehouse in Cloudera Data Warehouse is a cluster made up of two
types of nodes:
- Coordinator
- The coordinator is the node that the client connects to. It reads the SQL query, plans the work, and divides the work into smaller tasks for the workers. When the workers finish, the coordinator joins their results and returns the final result to the client. Each cluster has one coordinator.
- Workers
- The workers do the actual work. Each worker runs the tasks it receives, reads data from the data sources, and shares results with the other workers. In Cloudera Data Warehouse, the number of workers can increase or decrease automatically based on how busy the warehouse is.
The following diagram shows how a query moves from the client to the coordinator, to the workers, and then to the data sources through connectors:
+---------------------------------------------+
Client --SQL-->| COORDINATOR |
(Trino CLI / BI) | reads query, plans the work, |
| and assigns tasks to workers |
+----------+--------------+--------------+----+
| tasks |
+----------v---+ +-------v------+ +---v----------+
| WORKER 1 | | WORKER 2 | | WORKER 3 |
| runs tasks, |<->| shares |<->| runs tasks, |
| reads data | | results | | reads data |
+-------+------+ +--------------+ +------+-------+
| |
+-------v---------------- CONNECTORS --------v-------+
| Hive Iceberg PostgreSQL Kafka MongoDB ... |
+------------------- data sources -------------------+
