Overview

Full name
docker.io/zendesk/maxwell
Registry
docker.io
Namespace
zendesk
Repository
maxwell
Cached tags
117
Last synced
07/06/2026, 06:51 PM

Introduction

Maxwell MySQL binlog CDC 守护进程镜像,实时解析变更事件并输出 JSON 至 Kafka/RabbitMQ,用于缓存失效与搜索索引同步。

Details

zendesk/maxwell 伪装为 MySQL replica 读取 binlog,将 insert/update/delete 转为结构化 JSON 流,下游消费实现最终一致。与 Debezium 相比部署更轻、配置更少,但仅支持 MySQL 且功能面较窄。生产需确保 binlog_format=ROW、分配独立 replication slot 用户,并监控 lag;Kafka 主题分区与 maxwell 实例数需协调避免乱序。

快速启动

docker run -d --name maxwell \
  -e MYSQL_HOST=mysql.example.com \
  -e MYSQL_USER=maxwell \
  -e MYSQL_PASSWORD=secret \
  docker.io/zendesk/maxwell:latest

推荐实践

docker run -d --name maxwell \
  --restart unless-stopped \
  -e MYSQL_HOST=mysql.internal \
  -e MYSQL_USER=maxwell \
  -e MYSQL_PASSWORD=secret \
  -e KAFKA_BOOTSTRAP_SERVERS=kafka:9092 \
  -e KAFKA_TOPIC=maxwell \
  -e SCHEMA_DATABASE=maxwell \
  docker.io/zendesk/maxwell:1.41.2

核心参数说明

  • -e MYSQL_HOST/USER/PASSWORD — 源库连接与 replication 账号
  • -e KAFKA_BOOTSTRAP_SERVERS — 变更事件输出 Kafka 集群
  • -e KAFKA_TOPIC — 目标 topic 名称
  • -e SCHEMA_DATABASE — Maxwell 元数据存储库
  • --restart unless-stopped — CDC 链路持续同步
  • 固定 tag — 与 MySQL 8.x binlog 特性对齐

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: maxwell
spec:
  replicas: 1
  selector:
    matchLabels:
      app: maxwell
  template:
    metadata:
      labels:
        app: maxwell
    spec:
      containers:
        - name: maxwell
          image: docker.io/zendesk/maxwell:1.41.2
          env:
            - name: MYSQL_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: maxwell-secrets
                  key: mysql-password
            - name: KAFKA_BOOTSTRAP_SERVERS
              value: kafka.messaging.svc:9092
---
apiVersion: v1
kind: Service
metadata:
  name: maxwell
spec:
  selector:
    app: maxwell
  ports:
    - port: 8080
      targetPort: 8080

Maxwell 建议单副本避免重复消费;MySQL 与 Kafka 凭证经 Secret 注入,监控 binlog lag 指标。

Latest tags (20)

View all 117 tags →
TagArchPushed AtSizeDigestSyncWishAction
docker.io/zendesk/maxwell
:latest
linux/arm64linux/amd64
2025/06/25 20:17476.0 MBsha256:7a9c93eccb2b
docker.io/zendesk/maxwell
:v1.44.0
linux/arm64linux/amd64
2025/06/25 20:17476.0 MBsha256:7a9c93eccb2b
docker.io/zendesk/maxwell
:v1.43.2
linux/arm64linux/amd64
2025/03/13 06:46432.7 MBsha256:a17e30439fbf
docker.io/zendesk/maxwell
:v1.43.1
linux/arm64linux/amd64
2025/03/06 02:59432.7 MBsha256:6789e57f5d1b
docker.io/zendesk/maxwell
:v1.43.0
linux/arm64linux/amd64
2025/02/26 23:11421.8 MBsha256:146251ad5999
docker.io/zendesk/maxwell
:v1.42.3
linux/arm64linux/amd64
2025/01/18 21:41432.4 MBsha256:cf2ab1afff17
docker.io/zendesk/maxwell
:v1.42.2
linux/arm64linux/amd64
2025/01/10 04:16432.4 MBsha256:7226021cf803
docker.io/zendesk/maxwell
:v1.42.1
linux/arm64linux/amd64
2024/12/21 22:28426.2 MBsha256:c6f4df92303d
docker.io/zendesk/maxwell
:v1.42.0
linux/arm64linux/amd64
2024/12/18 04:12426.2 MBsha256:4a15363298a4
docker.io/zendesk/maxwell
:v1.41.2
linux/arm64linux/amd64
2024/06/06 05:41425.1 MBsha256:c8f332735596
docker.io/zendesk/maxwell
:v1.41.1
linux/arm64linux/amd64
2024/03/25 02:34423.0 MBsha256:9c1f194a8a30
docker.io/zendesk/maxwell
:v1.41.0
linux/arm64linux/amd64
2023/11/30 11:58421.4 MBsha256:2e0e03ccc18d
docker.io/zendesk/maxwell
:v1.40.6
linux/arm64linux/amd64
2023/11/05 07:22421.3 MBsha256:71b81388094e
docker.io/zendesk/maxwell
:v1.40.5
linux/arm64linux/amd64
2023/09/10 00:36421.2 MBsha256:96628820277b
docker.io/zendesk/maxwell
:v1.40.4
linux/arm64linux/amd64
2023/09/01 21:29421.2 MBsha256:b5c7c4aa73f0
docker.io/zendesk/maxwell
:v1.40.3
linux/arm64linux/amd64
2023/08/27 13:17421.2 MBsha256:62d20f7310ea
docker.io/zendesk/maxwell
:v1.40.2
linux/arm64linux/amd64
2023/06/11 08:46359.7 MBsha256:0dc8281720f9
docker.io/zendesk/maxwell
:v1.40.1
linux/arm64linux/amd64
2023/06/11 02:51359.7 MBsha256:97d1495bcdce
docker.io/zendesk/maxwell
:v1.40.0
linux/arm64linux/amd64
2023/04/02 10:33359.2 MBsha256:029cec4a3cb3
docker.io/zendesk/maxwell
:v1.39.6
linux/arm64linux/amd64
2023/03/12 01:20352.2 MBsha256:82433a5fbe13