# Principle and Architecture of TiDB Binlog

__*TiDB Binlog Principle*__
__*TiDB Binlog Features*__

+ High availability
+ performance
+ Downstream data formats

![right](./student-guide/diagram/TiDBBinlogPI_aa_001_20220624.png)
-------------------------------------------------------------
The figure shows the architecture diagram of TiDB Binlog. From left to right, we can see that from left to right, the Binlog generated by the data modify of the TiDB database is written to the Pump component cluster of the TiDB Binlog. The Pump component is responsible for storing and sorting the Binlogs it receives, and then each Pump forms Binlogs are sorted by the Drainer component in transaction order and written to the rightmost target. Each Drainer can correspond to a TiDB database, MySQL, or Apache Kafka.
Therefore, we see that the core components that make up TiDB Binlog are: Pump Cluster and Drainer. At the same time, TiDB Binlog also provides an operation and administer tool, binlogctl. Let's introduce them separately below.