Slide 1

Slide 1 text

Hurdles in Implementing CDC with Aurora during Operation Kazuki Maeda(kzk_maeda) AWS Community Builder

Slide 2

Slide 2 text

Who am I Kazuki Maeda 𝕏 @kzk_maeda SRE/DRE/Enabling/EM @atama plus AWS Community Builders AWS Startup Community Core Member 2

Slide 3

Slide 3 text

Main Topic Consider about architecture and organizational design of the product and data platform Dive Deep and provide my own guidelines, especially in cases where responsibilities and dependencies can be complex. 3

Slide 4

Slide 4 text

Agenda 1. Product and Data Organization 2. Data Platform Architecture and Technology 3. Product System Operation and Data Platform w/ CDC 4. Case Pattern for Architecture & Organization 5. Conclusion 4

Slide 5

Slide 5 text

Product and Data Organization This is sample text. 5

Slide 6

Slide 6 text

Data Platform & Organization User Facing Product Core Value 6 Internal Use Feedback & Analysis Product Platform Data Platform Transfer

Slide 7

Slide 7 text

Roles of Product & Data Organization 7 Including … Product Manager, Developer, Operation SRE Product Platform Data Platform Transfer Including … Data Manager, Data Engineer, Analyst DRE

Slide 8

Slide 8 text

Need for Responsibility Separation 8 Focus on … Delivering Values Maintaining Stability Product Platform Data Platform Transfer Focus on … Gathering Data Managing Data Quality

Slide 9

Slide 9 text

Product Team Organization Pattern Example 9 1. 2. 3. Product Platform Data Platform Transfer SRE / Infrastructure Team SRE / Infra Team Data Team Product Team Embedded SRE Team Data Team

Slide 10

Slide 10 text

Product Team Organization Pattern Example 10 1. 2. 3. Product Platform Data Platform Transfer SRE / Infrastructure Team SRE / Infra Team Data Team Product Team Product Team Data Team Direction of Dependence? Separation of Responsibility?

Slide 11

Slide 11 text

Data Platform Architecture and Technology This is sample text. 11

Slide 12

Slide 12 text

Data Platform Architecture Batch Transfer Architecture 12 Product Platform Data Platform Batch Transfer ● Transfer data in periodically ● For example, data are all sent and full replaced in data platform ● Or, data are sent in chunk periodically

Slide 13

Slide 13 text

Data Transfer Technology Batch Transfer Technology 2 way technologies for Batch Transfer 13 Snapshot Transfer ● Transfer full data via Database snapshot Query Transfer ● Capture changes using SQL via JDBC connection ● Use ETL Service or Broker Service

Slide 14

Slide 14 text

Data Transfer Technology Batch Transfer Technology 14 Amazon Athena Amazon S3 Amazon Aurora Reader AWS Glue Amazon Redshift Amazon MSK Snapshot Snapshot Query chunk data JDBC Connector

Slide 15

Slide 15 text

Dependence / Responsibility Batch Transfer Technology 15 Amazon Athena Amazon S3 Amazon Aurora Reader AWS Glue Amazon Redshift Amazon MSK Data Platform Product Platform Product Platform Data Platform Weak Dependence Little Dependence Snapshot Query chunk data

Slide 16

Slide 16 text

Data Platform Architecture Streaming Transfer Architecture 16 Product Platform Data Platform Streaming Transfer ● Transfer data in streaming ● Data in data platform are updated in near real-time ● Generally, Change data capture (CDC) is used

Slide 17

Slide 17 text

Data Transfer Technology Change Data Capture 17 Amazon Aurora Writer Amazon MSK AWS DMS Amazon Athena Amazon Redshift Debezium Connector Zero-ETL Replication Logs Amazon S3

Slide 18

Slide 18 text

Data Transfer Technology Change Data Capture 18 Amazon Aurora Writer Amazon MSK AWS DMS Amazon Athena Amazon Redshift Debezium Connector Zero-ETL Replication Logs Product Platform Amazon S3 Data Platform Strong Dependence

Slide 19

Slide 19 text

Dependence / Responsibility Why is it so complex? ● Most Database Engine in recent version, it is necessary to gather replication logs from writer instance ● In addition, database user or settings for replication logs should be configured ● So, boundary between both platform is ambiguous 19

Slide 20

Slide 20 text

Data Platform Architecture Lambda Architecture 20 Product Platform Data Platform Streaming Transfer ● Transfer data using both of batch and streaming ● Benefit from both the certainty data of batch transfers and the near real-time data of streaming transfers ● Use in carefully because of its complexity Batch Transfer

Slide 21

Slide 21 text

Product System Operation and Data Platform w/ CDC This is sample text. 21

Slide 22

Slide 22 text

Product System Operation Product operation cases or issues affecting Data Platform ● Manual Table Maintenance β—‹ In general, operating with manual failover or service maintenance ● Suddenly Failover β—‹ Hard to predict ● Database Upgrade Operation β—‹ Recently, operating with Aurora Blue/Green Deployment is recommended to avoid service down. 22

Slide 23

Slide 23 text

Product System Operation Product operation cases or issues affecting Data Platform ● Manual Table Maintenance β—‹ In general, operating with manual failover or service maintenance ● Suddenly Failover β—‹ Hard to predict ● Database Upgrade Operation β—‹ Recently, operating with Aurora Blue/Green Deployment is recommended to avoid service down. 23 Dive Deep into this pattern

Slide 24

Slide 24 text

Amazon Aurora Cluster Case Architecture Change Data Capture using DMS to Redshift serverless 24 Amazon Redshift Serverless binlog Writer instance AWS DMS anecdote: Oh no, using DMS Serverless transferring to Redshift Serverless is not supported!! v5.7 Operation Case: We’d like to upgrade Database Engine version to MySQL 8.0 using Aurora Blue / Green Deployment

Slide 25

Slide 25 text

Operation affected to Data Platform Database Upgrade Operation using Blue/Green Deploy 25 Amazon Aurora Cluster (blue) Amazon Redshift Serverless binlog Writer instance AWS DMS Amazon Aurora Cluster (green) Writer instance binlog v5.7 v8.0 binlog 2 binlogs with different offset values

Slide 26

Slide 26 text

Operation affected to Data Platform Database Upgrade Operation using Blue/Green Deploy 26 Amazon Aurora Cluster (blue) Amazon Redshift Serverless binlog Writer instance AWS DMS Amazon Aurora Cluster (green) Writer instance binlog v5.7 v8.0 binlog Switch Cannot follow binlog with different offset

Slide 27

Slide 27 text

Operation affected to Data Platform Database Upgrade Operation using Blue/Green Deploy 27 Amazon Aurora Cluster (blue) Amazon Redshift Serverless binlog Writer instance AWS DMS Amazon Aurora Cluster (green) Writer instance binlog v5.7 v8.0 binlog Switch Cannot follow binlog with different offset

Slide 28

Slide 28 text

Considering Point for above Problem Team Collaboration ● If product team and data team are different, it is necessary to address those problems during operation ● Direct Communication, maintain runbook, and so on Direction of Dependence and Separation of Responsibility ● If team collaboration is difficult, it is important to design well direction of dependence and separation of responsibility 28

Slide 29

Slide 29 text

Case Pattern for Architecture & Organization This is sample text. 29

Slide 30

Slide 30 text

Case pattern Small amount of data and small team size ● Choose simple data platform and technology ● Operate both platform by the same team 30 Amazon Aurora Cluster Writer instance Reader instance Amazon Athena Amazon S3 Cluster Snapshot (parquet file) Product and Data Platform Team

Slide 31

Slide 31 text

Case pattern Medium amount of data and medium team size ● If data freshness is important, create CDC platform using simple managed, serverless services ● Collaborate with product and data team 31 Amazon Redshift Serverless replication log AWS DMS Amazon Aurora Cluster Writer instance Reader instance Product Platform Team Data Platform Team Dependence

Slide 32

Slide 32 text

Case pattern Large amount of data, several products, large team size ● Design dependency direction that data platform refers to the product platform 32 Amazon Redshift Serverless Amazon Aurora Cluster Writer instance Reader instance Amazon MSK JDBC Connector Product Platform Team Data Platform Team Dependence SQL

Slide 33

Slide 33 text

Conclusion This is sample text. 33

Slide 34

Slide 34 text

Conclusion Proper solution depend on the several factors; ● Characteristics of product ● Size and capability of team ● Technology stack that can be adopt It is important to; ● design the team and the platform together ● be aware of the separation of responsibilities and the direction of dependencies. 34

Slide 35

Slide 35 text

Thank you! LinkedIn 35 X