Oracle GoldenGate Microservices 架构详解

Oracle GoldenGate Microservices 架构详解

适用版本:Oracle GoldenGate 12.3 / 19c / 21c 文档版本:v1.0 / 2026-07


1. 概述

GoldenGate Microservices 是基于 REST 的现代架构[1]:

详细见:Oracle GoldenGate 全集Oracle GoldenGate 经典架构详解


2. 架构对比

2.1 经典架构

- GGSCI 命令行
- 参数文件
- 集中管理难

2.2 Microservices

- REST API
- Web UI
- 多服务
- 易集成

3. 组件

3.1 Services

- Administration Server:管理 Extract/Replicat
- Distribution Server:传输
- Receiver Server:接收
- Performance Metrics Server:性能
- Alarm Server:告警

3.2 数据库

- Service Manager
- Credentials
- 心跳表

4. 安装

4.1 Service Manager

# 安装
./install.sh ...

# 创建 deployment
./oggca.sh

4.2 端口

- Service Manager: 9000
- Administration: 9001
- Distribution: 9002
- Receiver: 9003
- Metrics: 9004

5. 创建 Deployment

5.1 OGGCA

./oggca.sh
# 选择 Microservices
# 配置端口
# 配置数据库

5.2 命令行

./create_deployment.sh ...

6. Web UI

6.1 访问

https://server:9000

6.2 功能

- 添加 Credentials
- 创建 Extract
- 创建 Replicat
- 监控
- 告警

7. REST API

7.1 认证

curl -u admin:password https://server:9001/services/v2/...

7.2 创建 Extract

curl -X POST -u admin:password \
  https://server:9001/services/v2/extracts/ext1 \
  -d '...'

7.3 状态

curl -u admin:password \
  https://server:9001/services/v2/extracts/ext1/info/status

8. Credentials

8.1 添加

Web UI: Configuration → Credentials → Add

8.2 别名

- src_alias
- tgt_alias
- gg_alias

9. Extract

9.1 创建

Web UI: Overview → Add Extract
- 类型:Integrated Extract
- Trail:本地
- Credentials:src_alias
- 表:scott.*

9.2 配置

EXTRACT ext1
USERIDALIAS src_alias
EXTTRAIL aa
TABLE scott.*;

10. Distribution Path

10.1 创建

Web UI: Distribution Server → Add Path
- Source: 本地 Trail
- Target: 远程 Receiver
- 名称:path1

10.2 配置

Source Trail: ./dirdat/aa
Target: https://target:9003/services/v2/sources/...

11. Replicat

11.1 创建

Web UI: Overview → Add Replicat
- 类型:Integrated Replicat
- Trail:远程
- Credentials:tgt_alias
- 映射

11.2 配置

REPLICAT rep1
USERIDALIAS tgt_alias
MAP scott.*, TARGET scott.*;

12. 监控

12.1 Web UI

- Overview:状态
- Extract/Replicat:详细
- Performance Metrics:性能
- Alarms:告警

12.2 REST

curl -u admin:password \
  https://server:9004/services/v2/metrics/...

13. 告警

13.1 配置

Web UI: Alarm Server → Rules
- Lag 超过阈值
- 进程停止
- 邮件通知

13.2 规则

- Lag > 60 秒
- Process ABENDED
- Trail 满

14. 优势

14.1 易用

- Web UI
- REST API
- 无需 GGSCI

14.2 集成

- REST 与现有系统
- 自动化
- DevOps

14.3 监控

- 实时
- 图形化
- 告警

15. 应用场景

15.1 容灾

- 实时复制
- 自动化监控
- REST 集成

15.2 迁移

- 零停机
- 跨平台
- 易管理

15.3 数据集成

- 多源
- 现代 API
- DevOps

16. 常见坑与排错

16.1 证书

- HTTPS
- 自签名
- 信任

16.2 权限

- Web 用户
- 数据库

16.3 性能

- REST 调用开销
- 监控适度

17. 最佳实践

  1. HTTPS:安全
  2. Credentials:别名
  3. Web UI:管理
  4. REST:自动化
  5. 告警:监控
  6. 性能监控:实时
  7. 证书:可信
  8. 文档:API
  9. 测试:流程
  10. 演练:故障

18. 参考资料

[1] Oracle GoldenGate Microservices Architecture 19c https://docs.oracle.com/en/middleware/goldengate/core/19.1/understand/