SlideShare a Scribd company logo
Perforce Replication
              The Definitive Guide




Sven Erik Knop
Senior Consultant
SOME QUOTES


Deutsch’s Eight Fallacies of Distributed Computing:
•  The network is reliable.
•  Latency is zero.
•  Bandwidth is infinite.
•  The network is secure.
•  Topology doesn't change.
•  There is one administrator.
•  Transport cost is zero.
•  The network is homogeneous.

(Peter Deutsch)
CURRENT PROBLEMS


•  Perforce server benefits from replication
  •  High availability
  •  Disaster recovery
  •  Load sharing (for example for reports and build
     servers)

•  rsync has issues
  •  Cannot handle running Perforce server gracefully
  •  Building file list takes too long
  •  No transactional safety
  •  External dependency and processes
SOLUTION


•  Server-to-Server replication
  •  Directly supported by Perforce “out-of-the-box”
  •  Asynchronous based on journal file
  •  Supports both Metadata-only and full replication
  •  No need for external scripts, complete solution


•  Replica server is running in read-only mode
  •  Requires separate license file (free of charge)
ARCHITECTURE




                     pull                pull -u




                    db.*     state                           db.*




                                                   rdb.lbr
                   journal
 depots                              depots



          Master                      Replica
P4 PULL


 •  Run against the replica server

Command              Effect
p4 pull              Retrieve missing journal entries, then terminate
p4 pull –i <N>       Continuously pull every <N> seconds
p4 pull –u           Retrieve missing file revisions, then terminate
p4 pull –u –i <N> Continuously pull file revisions
p4 pull –l           List missing file revisions or errors

 •  Can be run as background task inside the replica
HOW DOES ‘PULL’ KEEP TRACK?


•  state file
  •  Text file normally located in the replica P4ROOT
     directory
  •  journal#/offset
  •  Allows replication to be interrupted
  •  Master server can rotate journal file
     •  Specify ‘-J prefix’ if master uses journal prefix for
        checkpoints

•  rdb.lbr database
  •  Binary file located in the replica P4ROOT directory
  •  Contains information on missing archive revisions
JOURNAL ROTATION AND PREFIX


•  Master
  •  p4 admin checkpoint/journal [-z] prefix

  •  Do not use –z (compression)!
  •  If you use a prefix, use the same prefix for ‘p4 pull’


•  Replica
  •  p4 pull –J prefix [-i <N>]

  •  Journal will rotated in sync with the master (in
     P4ROOT)
CONFIGURATION


•  ‘p4 pull’ is designed to be a background process
  •  Started from the replica server
  •  One process for retrieving metadata
  •  Several additional processes to retrieve archive data


•  Use the new ‘p4 configure set’
  •  p4 configure set monitor=3
  •  p4 configure set
     repl1#statefile=repl1_state
PREPARE IN THE MASTER


 P4NAME=Master                                    P4NAME=Repl_1


            checkpoint               restore

monitor=1                                      monitor=1
Repl_1#monitor=3                               Repl_1#monitor=3
Repl_1#P4TARGET=master:1666                    Repl_1#P4TARGET=master:1666
Repl_1#P4PORT=repl1:1666                       Repl_1#P4PORT=repl1:1666
Repl_1#P4LOG=repl1_log                         Repl_1#P4LOG=repl1_log
Repl_2#monitor=3                               Repl_2#monitor=3
Repl_2#P4TARGET=master:1666                    Repl_2#P4TARGET=master:1666
Repl_2#P4PORT=repl2:1999                       Repl_2#P4PORT=repl2:1999
Repl_2#P4LOG=repl2_log                         Repl_2#P4LOG=repl2_log




P4NAME determines which configuration is active
CONFIGURATION PARAMETERS


Parameter         Values (examples)
P4PORT            1666
P4TARGET          master:1666
db.replication    readonly
lbr.replication   readonly
serviceUser       service_replica
monitor           1
startup.1         pull –i 1[-J prefix]
startup.2         pull –u –i 1
startup.3         pull –u –i 1
SERVICEUSER


•  Special user for background processes
  •  Type: Service
•  Ignores AUTH_CHECK trigger, local password instead
•  Needs entry in the protection table, typically ‘super’
•  Does not consume a license
•  Can only run a few limited commands
    p4 login         p4 logout     p4 passwd
    p4 info          p4 user

•  Needs to be logged in before replication can start
  •  P4TICKETS
MONITORING


•  p4 monitor show –a (on replica)
  •  695 R service          72:22:23 pull -i 1
  •  696 R service          72:22:23 pull -u -i 1
  •  697 R service          72:22:23 pull -u -i 1

•  p4 logtail (on master, with server=1..3)
  •  rmt-Journal
  •  rmt-FileFetch

•  p4 pull –l
  •  Reports pending archive file transfers

•  p4 verify
CONNECT TO THE REPLICA


•  Replica is read-only
•  ‘p4 login’ requires database change for ticket

•  Solution:
  •  Replica forwards request to Master
  •  ‘p4 pull’ retrieves ticket from Master


•  ‘p4 login’ can experience delay

•  Alternative: P4AUTH pointing to master server
  •  Faster in LAN, but slower in WAN
COMMANDS ON THE REPLICA


•  Only read-only commands are allowed
  •  ‘p4 sync –p’, ‘p4 print’, but not ‘p4 sync’


•  Clients used against the replica must be created on
   the master server
  •  Will be replicated across


•  Timestamps do not get updated
USE CASES: HIGH AVAILABILITY


•  Recommended: identical hardware to master
•  Asynchronous solution:
   •  Replica can be a few seconds behind master
   •  HA server usually within the same LAN
•  Failover procedure:
   •  Stop replica
   •  Restart with P4NAME set to master name
   •  è Replica becomes the master

•  Currently no fallback to former master
   •  Need to build a new replica
   •  Do not automate failover!
USE CASES
USE CASES: DISASTER RECOVERY


•  Hardware requirements typically less than HA
  •  DR Server is not expected to handle the same load


•  DR replica can be several minutes behind master
  •  DR server needs to be physically separated from
     master
  •  RPO (recovery point objective) depends on bandwidth


•  Failover scenarios similar to HA
USE CASES: BUILD SERVER


•  Usable for full builds
  •  No incremental file update of the workspace
  •  Need to use ‘p4 sync –p’ or ‘p4 print’ to retrieve files
  •  Use long-lasting ticket or P4AUTH to avoid delay waiting for ‘p4
     login’


•  Can use P4Broker to redirect read-only commands
   to replica (http://kb.perforce.com/article/1354)

•  Alternative to P4Proxy for builds
USE CASES: REPORTING


•  Reporting does not require access to archive files

•  Reporting replica:
  •  lbr.replication=none
  •  No ‘p4 pull –u’ background tasks

•  Can also be used with P4Broker

•  Use ‘p4 replicate’ instead of ‘p4 pull’ to filter
  •  No background task, needs to be run separately
THE FUTURE


•  Backup using replica server
  •  Missing link between replica checkpoint and
     master journal

•  Federated servers
  •  Advanced proxy with some Metadata

•  Better reporting and recovery options
QUESTIONS?

More Related Content

What's hot

SREConEurope15 - The evolution of the DHCP infrastructure at Facebook
SREConEurope15 - The evolution of the DHCP infrastructure at FacebookSREConEurope15 - The evolution of the DHCP infrastructure at Facebook
SREConEurope15 - The evolution of the DHCP infrastructure at Facebook
Angelo Failla
 
Measuring directly from cpu hardware performance counters
Measuring directly from cpu  hardware performance countersMeasuring directly from cpu  hardware performance counters
Measuring directly from cpu hardware performance counters
Jean-Philippe BEMPEL
 
Bypassing ASLR Exploiting CVE 2015-7545
Bypassing ASLR Exploiting CVE 2015-7545Bypassing ASLR Exploiting CVE 2015-7545
Bypassing ASLR Exploiting CVE 2015-7545
Kernel TLV
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
Brendan Gregg
 
Transferring Changes Between Perforce Servers
Transferring Changes Between Perforce ServersTransferring Changes Between Perforce Servers
Transferring Changes Between Perforce Servers
Perforce
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC Offload
Open-NFP
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
lcplcp1
 
5 Vampir Configuration At Iu
5 Vampir Configuration At Iu5 Vampir Configuration At Iu
5 Vampir Configuration At IuRobertHenschel
 
Linux Kernel Debugging
Linux Kernel DebuggingLinux Kernel Debugging
Linux Kernel Debugging
GlobalLogic Ukraine
 
White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...
Perforce
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)Wei Shan Ang
 
Ebpf ovsconf-2016
Ebpf ovsconf-2016Ebpf ovsconf-2016
Ebpf ovsconf-2016
Cheng-Chun William Tu
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
Wei Shan Ang
 
Multi-Site Perforce at NetApp
Multi-Site Perforce at NetAppMulti-Site Perforce at NetApp
Multi-Site Perforce at NetApp
Perforce
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
Brendan Gregg
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
SaltStack
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
lpgauth
 
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructureDevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
Angelo Failla
 
Final_Report_new (1)
Final_Report_new (1)Final_Report_new (1)
Final_Report_new (1)Adarsh Burma
 
Cilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDPCilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDP
Thomas Graf
 

What's hot (20)

SREConEurope15 - The evolution of the DHCP infrastructure at Facebook
SREConEurope15 - The evolution of the DHCP infrastructure at FacebookSREConEurope15 - The evolution of the DHCP infrastructure at Facebook
SREConEurope15 - The evolution of the DHCP infrastructure at Facebook
 
Measuring directly from cpu hardware performance counters
Measuring directly from cpu  hardware performance countersMeasuring directly from cpu  hardware performance counters
Measuring directly from cpu hardware performance counters
 
Bypassing ASLR Exploiting CVE 2015-7545
Bypassing ASLR Exploiting CVE 2015-7545Bypassing ASLR Exploiting CVE 2015-7545
Bypassing ASLR Exploiting CVE 2015-7545
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
Transferring Changes Between Perforce Servers
Transferring Changes Between Perforce ServersTransferring Changes Between Perforce Servers
Transferring Changes Between Perforce Servers
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC Offload
 
Performance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux KernelPerformance Analysis Tools for Linux Kernel
Performance Analysis Tools for Linux Kernel
 
5 Vampir Configuration At Iu
5 Vampir Configuration At Iu5 Vampir Configuration At Iu
5 Vampir Configuration At Iu
 
Linux Kernel Debugging
Linux Kernel DebuggingLinux Kernel Debugging
Linux Kernel Debugging
 
White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...White Paper: Perforce Administration Optimization, Scalability, Availability ...
White Paper: Perforce Administration Optimization, Scalability, Availability ...
 
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)
 
Ebpf ovsconf-2016
Ebpf ovsconf-2016Ebpf ovsconf-2016
Ebpf ovsconf-2016
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
Multi-Site Perforce at NetApp
Multi-Site Perforce at NetAppMulti-Site Perforce at NetApp
Multi-Site Perforce at NetApp
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
 
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructureDevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
DevopsItalia2015 - DHCP at Facebook - Evolution of an infrastructure
 
Final_Report_new (1)
Final_Report_new (1)Final_Report_new (1)
Final_Report_new (1)
 
Cilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDPCilium - Fast IPv6 Container Networking with BPF and XDP
Cilium - Fast IPv6 Container Networking with BPF and XDP
 

Similar to Replication

LAB - Perforce Large Scale & Multi-Site Implementations
LAB - Perforce Large Scale & Multi-Site ImplementationsLAB - Perforce Large Scale & Multi-Site Implementations
LAB - Perforce Large Scale & Multi-Site Implementations
Perforce
 
[India Merge World Tour] Meru Networks
[India Merge World Tour] Meru Networks[India Merge World Tour] Meru Networks
[India Merge World Tour] Meru Networks
Perforce
 
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
Perforce
 
Tips for Administering Complex Distributed Perforce Environments
Tips for Administering Complex Distributed Perforce EnvironmentsTips for Administering Complex Distributed Perforce Environments
Tips for Administering Complex Distributed Perforce Environments
Perforce
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
Emanuel Calvo
 
Scaling Servers and Storage for Film Assets
Scaling Servers and Storage for Film Assets  Scaling Servers and Storage for Film Assets
Scaling Servers and Storage for Film Assets
Perforce
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
Flink Forward
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
Chris Westin
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning InfrastructurePerforce
 
Reorder buf
Reorder bufReorder buf
Reorder bufAarsh Ps
 
Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset
M Malai
 
Magento Imagine 2015 - Aspirin For Your MySQL Headaches
Magento Imagine 2015 - Aspirin For Your MySQL HeadachesMagento Imagine 2015 - Aspirin For Your MySQL Headaches
Magento Imagine 2015 - Aspirin For Your MySQL Headaches
Nexcess.net LLC
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance Tools
Kernel TLV
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)
altistory
 
Deep Dive In To Redis Replication: Vishy Kasar
Deep Dive In To Redis Replication: Vishy KasarDeep Dive In To Redis Replication: Vishy Kasar
Deep Dive In To Redis Replication: Vishy Kasar
Redis Labs
 
Replication, Durability, and Disaster Recovery
Replication, Durability, and Disaster RecoveryReplication, Durability, and Disaster Recovery
Replication, Durability, and Disaster Recovery
Steven Francia
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale
Perforce
 
Supporting Android-based Platform Development in Samsung
Supporting Android-based Platform Development in SamsungSupporting Android-based Platform Development in Samsung
Supporting Android-based Platform Development in Samsung
Perforce
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
Mydbops
 
Drop the Pressure on your Production Server
Drop the Pressure on your Production ServerDrop the Pressure on your Production Server
Drop the Pressure on your Production Server
Microsoft TechNet - Belgium and Luxembourg
 

Similar to Replication (20)

LAB - Perforce Large Scale & Multi-Site Implementations
LAB - Perforce Large Scale & Multi-Site ImplementationsLAB - Perforce Large Scale & Multi-Site Implementations
LAB - Perforce Large Scale & Multi-Site Implementations
 
[India Merge World Tour] Meru Networks
[India Merge World Tour] Meru Networks[India Merge World Tour] Meru Networks
[India Merge World Tour] Meru Networks
 
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
[Perforce] Replication - Read Only Installs to Fully Filtered Forwarding
 
Tips for Administering Complex Distributed Perforce Environments
Tips for Administering Complex Distributed Perforce EnvironmentsTips for Administering Complex Distributed Perforce Environments
Tips for Administering Complex Distributed Perforce Environments
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
 
Scaling Servers and Storage for Film Assets
Scaling Servers and Storage for Film Assets  Scaling Servers and Storage for Film Assets
Scaling Servers and Storage for Film Assets
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
Replication and replica sets
Replication and replica setsReplication and replica sets
Replication and replica sets
 
[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure[MathWorks] Versioning Infrastructure
[MathWorks] Versioning Infrastructure
 
Reorder buf
Reorder bufReorder buf
Reorder buf
 
Evolution Of MongoDB Replicaset
Evolution Of MongoDB ReplicasetEvolution Of MongoDB Replicaset
Evolution Of MongoDB Replicaset
 
Magento Imagine 2015 - Aspirin For Your MySQL Headaches
Magento Imagine 2015 - Aspirin For Your MySQL HeadachesMagento Imagine 2015 - Aspirin For Your MySQL Headaches
Magento Imagine 2015 - Aspirin For Your MySQL Headaches
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance Tools
 
[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)[Altibase] 12 replication part5 (optimization and monitoring)
[Altibase] 12 replication part5 (optimization and monitoring)
 
Deep Dive In To Redis Replication: Vishy Kasar
Deep Dive In To Redis Replication: Vishy KasarDeep Dive In To Redis Replication: Vishy Kasar
Deep Dive In To Redis Replication: Vishy Kasar
 
Replication, Durability, and Disaster Recovery
Replication, Durability, and Disaster RecoveryReplication, Durability, and Disaster Recovery
Replication, Durability, and Disaster Recovery
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale
 
Supporting Android-based Platform Development in Samsung
Supporting Android-based Platform Development in SamsungSupporting Android-based Platform Development in Samsung
Supporting Android-based Platform Development in Samsung
 
Evolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best PracticesEvolution of MongoDB Replicaset and Its Best Practices
Evolution of MongoDB Replicaset and Its Best Practices
 
Drop the Pressure on your Production Server
Drop the Pressure on your Production ServerDrop the Pressure on your Production Server
Drop the Pressure on your Production Server
 

More from Perforce

How to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning NeedsHow to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning Needs
Perforce
 
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
Perforce
 
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Perforce
 
Understanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPsUnderstanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPs
Perforce
 
Branching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development ProcessBranching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development Process
Perforce
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOps
Perforce
 
How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog
Perforce
 
Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team
Perforce
 
Shift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New WorkflowShift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New Workflow
Perforce
 
Hybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated WorldHybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated World
Perforce
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Perforce
 
Easier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALMEasier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALM
Perforce
 
How To Master Your Mega Backlog
How To Master Your Mega Backlog How To Master Your Mega Backlog
How To Master Your Mega Backlog
Perforce
 
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Perforce
 
How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure
Perforce
 
Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2
Perforce
 
Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?
Perforce
 
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Perforce
 
What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4
Perforce
 
Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison
Perforce
 

More from Perforce (20)

How to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning NeedsHow to Organize Game Developers With Different Planning Needs
How to Organize Game Developers With Different Planning Needs
 
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...Regulatory Traceability:  How to Maintain Compliance, Quality, and Cost Effic...
Regulatory Traceability: How to Maintain Compliance, Quality, and Cost Effic...
 
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...Efficient Security Development and Testing Using Dynamic and Static Code Anal...
Efficient Security Development and Testing Using Dynamic and Static Code Anal...
 
Understanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPsUnderstanding Compliant Workflow Enforcement SOPs
Understanding Compliant Workflow Enforcement SOPs
 
Branching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development ProcessBranching Out: How To Automate Your Development Process
Branching Out: How To Automate Your Development Process
 
How to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOpsHow to Do Code Reviews at Massive Scale For DevOps
How to Do Code Reviews at Massive Scale For DevOps
 
How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog How to Spark Joy In Your Product Backlog
How to Spark Joy In Your Product Backlog
 
Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team Going Remote: Build Up Your Game Dev Team
Going Remote: Build Up Your Game Dev Team
 
Shift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New WorkflowShift to Remote: How to Manage Your New Workflow
Shift to Remote: How to Manage Your New Workflow
 
Hybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated WorldHybrid Development Methodology in a Regulated World
Hybrid Development Methodology in a Regulated World
 
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the EnterpriseBetter, Faster, Easier: How to Make Git Really Work in the Enterprise
Better, Faster, Easier: How to Make Git Really Work in the Enterprise
 
Easier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALMEasier Requirements Management Using Diagrams In Helix ALM
Easier Requirements Management Using Diagrams In Helix ALM
 
How To Master Your Mega Backlog
How To Master Your Mega Backlog How To Master Your Mega Backlog
How To Master Your Mega Backlog
 
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
Achieving Software Safety, Security, and Reliability Part 3: What Does the Fu...
 
How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure How to Scale With Helix Core and Microsoft Azure
How to Scale With Helix Core and Microsoft Azure
 
Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2Achieving Software Safety, Security, and Reliability Part 2
Achieving Software Safety, Security, and Reliability Part 2
 
Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?Should You Break Up With Your Monolith?
Should You Break Up With Your Monolith?
 
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
Achieving Software Safety, Security, and Reliability Part 1: Common Industry ...
 
What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4What's New in Helix ALM 2019.4
What's New in Helix ALM 2019.4
 
Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison Free Yourself From the MS Office Prison
Free Yourself From the MS Office Prison
 

Recently uploaded

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

Replication

  • 1. Perforce Replication The Definitive Guide Sven Erik Knop Senior Consultant
  • 2. SOME QUOTES Deutsch’s Eight Fallacies of Distributed Computing: •  The network is reliable. •  Latency is zero. •  Bandwidth is infinite. •  The network is secure. •  Topology doesn't change. •  There is one administrator. •  Transport cost is zero. •  The network is homogeneous. (Peter Deutsch)
  • 3. CURRENT PROBLEMS •  Perforce server benefits from replication •  High availability •  Disaster recovery •  Load sharing (for example for reports and build servers) •  rsync has issues •  Cannot handle running Perforce server gracefully •  Building file list takes too long •  No transactional safety •  External dependency and processes
  • 4. SOLUTION •  Server-to-Server replication •  Directly supported by Perforce “out-of-the-box” •  Asynchronous based on journal file •  Supports both Metadata-only and full replication •  No need for external scripts, complete solution •  Replica server is running in read-only mode •  Requires separate license file (free of charge)
  • 5. ARCHITECTURE pull pull -u db.* state db.* rdb.lbr journal depots depots Master Replica
  • 6. P4 PULL •  Run against the replica server Command Effect p4 pull Retrieve missing journal entries, then terminate p4 pull –i <N> Continuously pull every <N> seconds p4 pull –u Retrieve missing file revisions, then terminate p4 pull –u –i <N> Continuously pull file revisions p4 pull –l List missing file revisions or errors •  Can be run as background task inside the replica
  • 7. HOW DOES ‘PULL’ KEEP TRACK? •  state file •  Text file normally located in the replica P4ROOT directory •  journal#/offset •  Allows replication to be interrupted •  Master server can rotate journal file •  Specify ‘-J prefix’ if master uses journal prefix for checkpoints •  rdb.lbr database •  Binary file located in the replica P4ROOT directory •  Contains information on missing archive revisions
  • 8. JOURNAL ROTATION AND PREFIX •  Master •  p4 admin checkpoint/journal [-z] prefix •  Do not use –z (compression)! •  If you use a prefix, use the same prefix for ‘p4 pull’ •  Replica •  p4 pull –J prefix [-i <N>] •  Journal will rotated in sync with the master (in P4ROOT)
  • 9. CONFIGURATION •  ‘p4 pull’ is designed to be a background process •  Started from the replica server •  One process for retrieving metadata •  Several additional processes to retrieve archive data •  Use the new ‘p4 configure set’ •  p4 configure set monitor=3 •  p4 configure set repl1#statefile=repl1_state
  • 10. PREPARE IN THE MASTER P4NAME=Master P4NAME=Repl_1 checkpoint restore monitor=1 monitor=1 Repl_1#monitor=3 Repl_1#monitor=3 Repl_1#P4TARGET=master:1666 Repl_1#P4TARGET=master:1666 Repl_1#P4PORT=repl1:1666 Repl_1#P4PORT=repl1:1666 Repl_1#P4LOG=repl1_log Repl_1#P4LOG=repl1_log Repl_2#monitor=3 Repl_2#monitor=3 Repl_2#P4TARGET=master:1666 Repl_2#P4TARGET=master:1666 Repl_2#P4PORT=repl2:1999 Repl_2#P4PORT=repl2:1999 Repl_2#P4LOG=repl2_log Repl_2#P4LOG=repl2_log P4NAME determines which configuration is active
  • 11. CONFIGURATION PARAMETERS Parameter Values (examples) P4PORT 1666 P4TARGET master:1666 db.replication readonly lbr.replication readonly serviceUser service_replica monitor 1 startup.1 pull –i 1[-J prefix] startup.2 pull –u –i 1 startup.3 pull –u –i 1
  • 12. SERVICEUSER •  Special user for background processes •  Type: Service •  Ignores AUTH_CHECK trigger, local password instead •  Needs entry in the protection table, typically ‘super’ •  Does not consume a license •  Can only run a few limited commands p4 login p4 logout p4 passwd p4 info p4 user •  Needs to be logged in before replication can start •  P4TICKETS
  • 13. MONITORING •  p4 monitor show –a (on replica) •  695 R service 72:22:23 pull -i 1 •  696 R service 72:22:23 pull -u -i 1 •  697 R service 72:22:23 pull -u -i 1 •  p4 logtail (on master, with server=1..3) •  rmt-Journal •  rmt-FileFetch •  p4 pull –l •  Reports pending archive file transfers •  p4 verify
  • 14. CONNECT TO THE REPLICA •  Replica is read-only •  ‘p4 login’ requires database change for ticket •  Solution: •  Replica forwards request to Master •  ‘p4 pull’ retrieves ticket from Master •  ‘p4 login’ can experience delay •  Alternative: P4AUTH pointing to master server •  Faster in LAN, but slower in WAN
  • 15. COMMANDS ON THE REPLICA •  Only read-only commands are allowed •  ‘p4 sync –p’, ‘p4 print’, but not ‘p4 sync’ •  Clients used against the replica must be created on the master server •  Will be replicated across •  Timestamps do not get updated
  • 16. USE CASES: HIGH AVAILABILITY •  Recommended: identical hardware to master •  Asynchronous solution: •  Replica can be a few seconds behind master •  HA server usually within the same LAN •  Failover procedure: •  Stop replica •  Restart with P4NAME set to master name •  è Replica becomes the master •  Currently no fallback to former master •  Need to build a new replica •  Do not automate failover!
  • 18. USE CASES: DISASTER RECOVERY •  Hardware requirements typically less than HA •  DR Server is not expected to handle the same load •  DR replica can be several minutes behind master •  DR server needs to be physically separated from master •  RPO (recovery point objective) depends on bandwidth •  Failover scenarios similar to HA
  • 19. USE CASES: BUILD SERVER •  Usable for full builds •  No incremental file update of the workspace •  Need to use ‘p4 sync –p’ or ‘p4 print’ to retrieve files •  Use long-lasting ticket or P4AUTH to avoid delay waiting for ‘p4 login’ •  Can use P4Broker to redirect read-only commands to replica (http://kb.perforce.com/article/1354) •  Alternative to P4Proxy for builds
  • 20. USE CASES: REPORTING •  Reporting does not require access to archive files •  Reporting replica: •  lbr.replication=none •  No ‘p4 pull –u’ background tasks •  Can also be used with P4Broker •  Use ‘p4 replicate’ instead of ‘p4 pull’ to filter •  No background task, needs to be run separately
  • 21. THE FUTURE •  Backup using replica server •  Missing link between replica checkpoint and master journal •  Federated servers •  Advanced proxy with some Metadata •  Better reporting and recovery options