SlideShare a Scribd company logo
1 of 19
Database Replication in
ManageIQ
Introduction
Nick Carboni
Software Engineer at Red Hat
Appliance and database for ManageIQ (Platform Team)
Replication in ManageIQ
Multiple databases can be used for far away environments
Database replication allows for easy reporting and visibility
Database 1 Database 2
Global Database
Replication!
rubyrep
http://www.rubyrep.org
https://github.com/rubyrep/rubyrep
Last commit in 2011
rubyrep
Ruby + ActiveRecord
Triggers = Developer headaches
SQL
Configuration is … hardelsif commands.include? command
status = commands[command][:command].run(args.slice(1, 1_000_000))
rubyrep in ManageIQ
We use our own fork
https://github.com/ManageIQ/rubyrep
Mainly support for new versions of ActiveRecord
rubyrep in ManageIQ
PR to add support for Rails 4.2
March 27, 2015
“Yup. It's basically dead. Our changes are also SOOO crazy
different, that this is like a Frankenstein project now. I wonder
if we should just write something different from scratch given
our experience...or perhaps we should rethink replication
altogether and come up with a plan.”
-
@Fryguy
rubyrep in ManageIQ
Worker process
Database Synchronization role
Worker will run on the server with the role
Passive global database
pglogical
http://2ndquadrant.com/en-us/resources/pglogical/
https://github.com/2ndQuadrant/pglogical/
Inclusion into PostgreSQL core in progress
9.7+??
pglogical
PostgreSQL extension
Process runs on database server
Managed by PostgreSQL service
SQL stored procedure API
postgresql.conf configuration
pglogical
PostgreSQL logical decoding
https://www.postgresql.org/docs/9.4/static/logicaldecoding.html
Output plugin
pglogical_output
Consumer extension
pglogical
Replication slots
https://www.postgresql.org/docs/9.4/static/warm-
pglogical in ManageIQ
AR connection adapter extension
Exposes a ruby method per pglogical stored procedure
Configure “subscriptions” to remote regions through global
region UI
Exclude table configuration unchanged
“Advanced Settings” tab in remote region UI
Global Region Configuration
Performance testing
How long does it take to replicate a “backlog” of data?
Vary amount of data and artificial network latency
Measure time until “backlog” is zero
rubyrep - number of rows in rr_pending_changes table
pglogical - transaction log location compared to flush location
SELECT pg_xlog_location_diff(pg_current_xlog_location(), flush_location) AS lag_bytes
FROM pg_stat_replication;
Insert Performance
Rows pglogical rubyrep
1,000 0.158 (σ = 0.006) 0.189 (σ = 0.011)
10,000 1.499 (σ = 0.095) 1.84 (σ = 0.093)
100,000 16.105 (σ = 0.296) 18.042 (σ = 0.320)
1,000,000 147.508 (σ = 3.557) 195.399 (σ = 18.317)
Sample size = 10
No Latency
25ms Latency (50ms ping time)
100ms Latency (200ms ping time)
Q&A

More Related Content

What's hot

What's hot (20)

Ceilometer Updates - Kilo Edition
Ceilometer Updates - Kilo EditionCeilometer Updates - Kilo Edition
Ceilometer Updates - Kilo Edition
 
Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, P...
Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, P...Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, P...
Demystifying Event-Driven Architectures with Apache Kafka | Bogdan Sucaciu, P...
 
CDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaCCDK Meetup: Rule the World through IaC
CDK Meetup: Rule the World through IaC
 
The Kubernetes Operator Pattern - ContainerConf Nov 2017
The Kubernetes Operator Pattern - ContainerConf Nov 2017The Kubernetes Operator Pattern - ContainerConf Nov 2017
The Kubernetes Operator Pattern - ContainerConf Nov 2017
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 
Kafka Excellence at Scale – Cloud, Kubernetes, Infrastructure as Code (Vik Wa...
Kafka Excellence at Scale – Cloud, Kubernetes, Infrastructure as Code (Vik Wa...Kafka Excellence at Scale – Cloud, Kubernetes, Infrastructure as Code (Vik Wa...
Kafka Excellence at Scale – Cloud, Kubernetes, Infrastructure as Code (Vik Wa...
 
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
How Confluent Completes the Event Streaming Platform (Addison Huddy & Dan Ros...
 
Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators Kubernetes extensibility: crd & operators
Kubernetes extensibility: crd & operators
 
Crafting Kubernetes Operators
Crafting Kubernetes OperatorsCrafting Kubernetes Operators
Crafting Kubernetes Operators
 
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
 
5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:5 - Hands-on Kubernetes Workshop:
5 - Hands-on Kubernetes Workshop:
 
Spark day 2017 - Spark on Kubernetes
Spark day 2017 - Spark on KubernetesSpark day 2017 - Spark on Kubernetes
Spark day 2017 - Spark on Kubernetes
 
[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API[Lakmal] Automate Microservice to API
[Lakmal] Automate Microservice to API
 
Data Engineer's Lunch #47: Airflow on Kubernetes
Data Engineer's Lunch #47:  Airflow on KubernetesData Engineer's Lunch #47:  Airflow on Kubernetes
Data Engineer's Lunch #47: Airflow on Kubernetes
 
Openshift Container Platform on Azure
Openshift Container Platform on Azure Openshift Container Platform on Azure
Openshift Container Platform on Azure
 
7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
 
[Spark Summit 2017 NA] Apache Spark on Kubernetes
[Spark Summit 2017 NA] Apache Spark on Kubernetes[Spark Summit 2017 NA] Apache Spark on Kubernetes
[Spark Summit 2017 NA] Apache Spark on Kubernetes
 
Azure Labs: Confluent on Azure Container Services & Real-time Search with Red...
Azure Labs: Confluent on Azure Container Services & Real-time Search with Red...Azure Labs: Confluent on Azure Container Services & Real-time Search with Red...
Azure Labs: Confluent on Azure Container Services & Real-time Search with Red...
 
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, QlikKeeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
Keeping Analytics Data Fresh in a Streaming Architecture | John Neal, Qlik
 
From airflow to google cloud composer
From airflow to google cloud composerFrom airflow to google cloud composer
From airflow to google cloud composer
 

Viewers also liked

OpenNMS Reporting - Enhancement
OpenNMS Reporting - EnhancementOpenNMS Reporting - Enhancement
OpenNMS Reporting - Enhancement
Ronny
 
OpenStack Hybrid Cloud Management and Orchestration - James Bond
OpenStack Hybrid Cloud Management and Orchestration - James BondOpenStack Hybrid Cloud Management and Orchestration - James Bond
OpenStack Hybrid Cloud Management and Orchestration - James Bond
scoopnewsgroup
 

Viewers also liked (20)

Managed Services - Mike Hulsman - ManageIQ Design Summit 2016
Managed Services - Mike Hulsman - ManageIQ Design Summit 2016Managed Services - Mike Hulsman - ManageIQ Design Summit 2016
Managed Services - Mike Hulsman - ManageIQ Design Summit 2016
 
New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016
New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016
New Chargeback - Sergio Ocon - ManageIQ Design Summit 2016
 
Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016
Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016
Automate - Madhu Kanoor, Greg McCullough - ManageIQ Design Summit 2016
 
Sprint 55
Sprint 55Sprint 55
Sprint 55
 
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin PovolnyDesign Summit - UI Roadmap - Dan Clarizio, Martin Povolny
Design Summit - UI Roadmap - Dan Clarizio, Martin Povolny
 
Samsung presentation
Samsung presentationSamsung presentation
Samsung presentation
 
Sebastien goasguen cloud stack and docker
Sebastien goasguen   cloud stack and dockerSebastien goasguen   cloud stack and docker
Sebastien goasguen cloud stack and docker
 
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a CloudOpenCloudConf: It takes an (Open Source) Village to Build a Cloud
OpenCloudConf: It takes an (Open Source) Village to Build a Cloud
 
Satellite 6 - Pupet Introduction
Satellite 6 - Pupet IntroductionSatellite 6 - Pupet Introduction
Satellite 6 - Pupet Introduction
 
Apache CXF New Directions in Integration
Apache CXF New Directions in IntegrationApache CXF New Directions in Integration
Apache CXF New Directions in Integration
 
OpenNMS Reporting - Enhancement
OpenNMS Reporting - EnhancementOpenNMS Reporting - Enhancement
OpenNMS Reporting - Enhancement
 
OpenStack and CloudForms Do's and Dont's
OpenStack and CloudForms Do's and Dont'sOpenStack and CloudForms Do's and Dont's
OpenStack and CloudForms Do's and Dont's
 
DevOps, A path to Enterprises to Adopt [Decoding DevOps Conference - InfoSep...
DevOps, A path to Enterprises to Adopt  [Decoding DevOps Conference - InfoSep...DevOps, A path to Enterprises to Adopt  [Decoding DevOps Conference - InfoSep...
DevOps, A path to Enterprises to Adopt [Decoding DevOps Conference - InfoSep...
 
Intro to-puppet
Intro to-puppetIntro to-puppet
Intro to-puppet
 
OpenStack Hybrid Cloud Management and Orchestration - James Bond
OpenStack Hybrid Cloud Management and Orchestration - James BondOpenStack Hybrid Cloud Management and Orchestration - James Bond
OpenStack Hybrid Cloud Management and Orchestration - James Bond
 
Building Enterprise Clouds - Key Considerations and Strategies - RED HAT
Building Enterprise Clouds - Key Considerations and Strategies - RED HATBuilding Enterprise Clouds - Key Considerations and Strategies - RED HAT
Building Enterprise Clouds - Key Considerations and Strategies - RED HAT
 
Introduction to OpenNMS
Introduction to OpenNMSIntroduction to OpenNMS
Introduction to OpenNMS
 
UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016
UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016
UI Improvements - Dan Clarizio, Eric Winchell - ManageIQ Design Summit 2016
 
Chef - Configuration Management for the Cloud
Chef - Configuration Management for the CloudChef - Configuration Management for the Cloud
Chef - Configuration Management for the Cloud
 
Meetup
MeetupMeetup
Meetup
 

Similar to Replication - Nick Carboni - ManageIQ Design Summit 2016

Sumit_Gupta_8.8yrs(DBA)
Sumit_Gupta_8.8yrs(DBA)Sumit_Gupta_8.8yrs(DBA)
Sumit_Gupta_8.8yrs(DBA)
Sumit Gupta
 
Small Overview of Skype Database Tools
Small Overview of Skype Database ToolsSmall Overview of Skype Database Tools
Small Overview of Skype Database Tools
elliando dias
 
Database Tools by Skype
Database Tools by SkypeDatabase Tools by Skype
Database Tools by Skype
elliando dias
 
Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)
Sumit Gupta
 
Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)
Sumit Gupta
 
plProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancerplProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancer
elliando dias
 

Similar to Replication - Nick Carboni - ManageIQ Design Summit 2016 (20)

Sumit_Gupta_8.8yrs(DBA)
Sumit_Gupta_8.8yrs(DBA)Sumit_Gupta_8.8yrs(DBA)
Sumit_Gupta_8.8yrs(DBA)
 
Small Overview of Skype Database Tools
Small Overview of Skype Database ToolsSmall Overview of Skype Database Tools
Small Overview of Skype Database Tools
 
Database Tools by Skype
Database Tools by SkypeDatabase Tools by Skype
Database Tools by Skype
 
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
Keynote #Tech - Google : aperçu de la gestion des services distribués chez Go...
 
What's new in Airflow 2.3?
What's new in Airflow 2.3?What's new in Airflow 2.3?
What's new in Airflow 2.3?
 
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-MallaKerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
Kerberizing Spark: Spark Summit East talk by Abel Rincon and Jorge Lopez-Malla
 
Hadoop Summit Dublin 2016: Hadoop Platform at Yahoo - A Year in Review
Hadoop Summit Dublin 2016: Hadoop Platform at Yahoo - A Year in Review Hadoop Summit Dublin 2016: Hadoop Platform at Yahoo - A Year in Review
Hadoop Summit Dublin 2016: Hadoop Platform at Yahoo - A Year in Review
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level InterfacesKubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
 
Oracle API Gateway Installation
Oracle API Gateway InstallationOracle API Gateway Installation
Oracle API Gateway Installation
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
Hadoop Platform at Yahoo
Hadoop Platform at YahooHadoop Platform at Yahoo
Hadoop Platform at Yahoo
 
Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)
 
Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)Sumit_Gupta_9.4yrs(DBA)
Sumit_Gupta_9.4yrs(DBA)
 
Real time web app integration with hadoop on docker
Real time web app integration with hadoop on dockerReal time web app integration with hadoop on docker
Real time web app integration with hadoop on docker
 
Why Airflow? & What's new in Airflow 2.3?
Why Airflow? & What's new in Airflow 2.3?Why Airflow? & What's new in Airflow 2.3?
Why Airflow? & What's new in Airflow 2.3?
 
RUCK 2017 R에 날개 달기 - Microsoft R과 클라우드 머신러닝 소개
RUCK 2017 R에 날개 달기 - Microsoft R과 클라우드 머신러닝 소개RUCK 2017 R에 날개 달기 - Microsoft R과 클라우드 머신러닝 소개
RUCK 2017 R에 날개 달기 - Microsoft R과 클라우드 머신러닝 소개
 
Sprint 78
Sprint 78Sprint 78
Sprint 78
 
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow MeetupWhat's coming in Airflow 2.0? - NYC Apache Airflow Meetup
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
 
plProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancerplProxy, pgBouncer, pgBalancer
plProxy, pgBouncer, pgBalancer
 

More from ManageIQ

More from ManageIQ (20)

ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
ManageIQ - Sprint 235 Review - Slide Deck
ManageIQ - Sprint 235 Review - Slide DeckManageIQ - Sprint 235 Review - Slide Deck
ManageIQ - Sprint 235 Review - Slide Deck
 
ManageIQ - Sprint 234 Review - Slide Deck
ManageIQ - Sprint 234 Review - Slide DeckManageIQ - Sprint 234 Review - Slide Deck
ManageIQ - Sprint 234 Review - Slide Deck
 
ManageIQ - Sprint 233 Review - Slide Deck
ManageIQ - Sprint 233 Review - Slide DeckManageIQ - Sprint 233 Review - Slide Deck
ManageIQ - Sprint 233 Review - Slide Deck
 
ManageIQ - Sprint 232 Review - Slide Deck
ManageIQ - Sprint 232 Review - Slide DeckManageIQ - Sprint 232 Review - Slide Deck
ManageIQ - Sprint 232 Review - Slide Deck
 
ManageIQ - Sprint 231 Review - Slide Deck
ManageIQ - Sprint 231 Review - Slide DeckManageIQ - Sprint 231 Review - Slide Deck
ManageIQ - Sprint 231 Review - Slide Deck
 
ManageIQ - Sprint 230 Review - Slide Deck
ManageIQ - Sprint 230 Review - Slide DeckManageIQ - Sprint 230 Review - Slide Deck
ManageIQ - Sprint 230 Review - Slide Deck
 
ManageIQ - Sprint 229 Review - Slide Deck
ManageIQ - Sprint 229 Review - Slide DeckManageIQ - Sprint 229 Review - Slide Deck
ManageIQ - Sprint 229 Review - Slide Deck
 
ManageIQ - Sprint 228 Review - Slide Deck
ManageIQ - Sprint 228 Review - Slide DeckManageIQ - Sprint 228 Review - Slide Deck
ManageIQ - Sprint 228 Review - Slide Deck
 
Sprint 227
Sprint 227Sprint 227
Sprint 227
 
Sprint 226
Sprint 226Sprint 226
Sprint 226
 
Sprint 225
Sprint 225Sprint 225
Sprint 225
 
Sprint 224
Sprint 224Sprint 224
Sprint 224
 
Sprint 223
Sprint 223Sprint 223
Sprint 223
 
Sprint 222
Sprint 222Sprint 222
Sprint 222
 
Sprint 221
Sprint 221Sprint 221
Sprint 221
 
Sprint 220
Sprint 220Sprint 220
Sprint 220
 
Sprint 219
Sprint 219Sprint 219
Sprint 219
 
Sprint 218
Sprint 218Sprint 218
Sprint 218
 
Sprint 217
Sprint 217Sprint 217
Sprint 217
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Replication - Nick Carboni - ManageIQ Design Summit 2016

Editor's Notes

  1. Replication as a feature, not for failover - that’s Brett’s talk next Better local performance (using the product normally) by keeping the database close to the provider / other infrastructure it is managing No one wants multiple reports because of performance concerns Replicate the data to the “global” database and report there
  2. The ruby rep website is even older - 2009
  3. Typically just doing more than it probably needs to. Used active record so it could support more than just postgresql Renamed tables cause issues with triggers We don’t have a standard interface to adding / removing them when we change things Not everyone that is making a database change is also thinking about replication Talk about even streams table - Table was renamed Had to remember that replication was a thing, Had to rename all the existing rows in the pending changes and the state table Forgot about the triggers The old trigger stayed around and we got a change entry for both table names every time something happened SQL as opposed to … Was trying to track down how the configuration worked Our config file was a two line ruby script that was passed as an argument to a rubyrep gem method (run) That config file called out to a class which set config options from within the gem
  4. Found the PR to our fork for adding support for Rails 4.2 while looking back in the repo Found a comment We also added support for rails 5
  5. Don’t want worker running on a server that has a bad connection to both databases. Extra worker takes up memory on the appliance We have to monitor when replication is running (heartbeat) Additional process outside of our worker actually runs the replication Upside - passive global Replication is just another database connection writing data
  6. 9.7 estimate from a contributor on the project I spoke with Still not looking likely, but the extension is fine
  7. Starts and stops with the database once it is configured No worrying about roles Will always run on the database server Stored procs are a lot nicer to deal with than a separate process or changing that config
  8. Logical decoding is a way to capture more detailed data from the WAL logs Needs an output plugin to present the data Replication slots track when changes have been consumed and retain WAL logs accordingly Before replication slots users had to come up with a WAL archiving strategy to make sure the logs were still there when they needed to be replicated.
  9. The user now configures the credentials in one place (global)
  10. Latency achieved with `tc` command to inject a delay before network traffic is queued
  11. (standard deviation) Triggers have some overhead on insert
  12. rows pglogical rubyrep Pgl-stddev Rr-stddev 1000 0.2s 8.769s 0 0.0959687449 10000 0.76s 18.524s 0.0843274043 0.5560015987 100000 5.88s 114.736s (2min) 0.267498702 3.5969128739 1000000 69.087s 1281.661s (21min) 11.417237504 239.7990555745
  13. Rows pglogical rubyrep Pgl-stddev Rr-stddev 1000 0.62s 70.294s 0.0632455532 6.4325823396 10000 1.67s 592.32s (~10 min) 0.6535373831 76.2543952832 100000 6.841s 5530.42s (1hr 30 min) 0.5028463428 360.8224483039 1000000 62.69s 8.1968882985
  14. Rows pglogical rubyrep Pgl-stddev Rr-stddev 1,000 2.05s 233.655s (3min 52s) 0.2065591118 4.6881179593 10,000 3.011s 2058.525s (34min) 0.2521221045 4.2779960262 100,000 11.739s 20506.11s (5h 40min) 7.7121526754 1,000,000 118.233s (2min) 6.5350627813