18
1 Forwarding Replica for Remote Site Thandesha VK Principal Engineer Meru Networks Logo area

[India Merge World Tour] Meru Networks

Embed Size (px)

DESCRIPTION

Presentation from Meru Networks at Merge World Tour in India - Meru Networks P4 Conference

Citation preview

Page 1: [India Merge World Tour] Meru Networks

1  

Forwarding Replica for Remote Site

Thandesha VK Principal Engineer Meru Networks

Logo area

Page 2: [India Merge World Tour] Meru Networks

2  

By the Numbers •  Market: Enterprise Wireless LANs •  Founded: January 2002 •  IPO: March 2010 •  Ticker: NASDAQ: MERU •  Headquarters: Silicon Valley, USA •  Offices: 22 countries •  Customers: 7,600+ in 56 countries

Major Verticals

•  Healthcare  –  Hospitals  –  Assisted  Living  

•  Educa-on  –  Higher  Educa8on  –  Primary/Secondary  (K-­‐12)  

•  Hospitality  –  Hotels  –  Conference  Centers  –  Cruise  Lines  –  Airports  –  Stadiums          

Page 3: [India Merge World Tour] Meru Networks

3  

Working from remote site

•  P4D •  P4D and remote Proxy •  Proxy with advance caching

• Replica •  What is replica •  How to setup •  Uses of replica

•  Edge-Commit server

Page 4: [India Merge World Tour] Meru Networks

4  

Remote P4D

•  Connect to remote server •  Fetch Metadata •  Fetch Versioned files

•  Every transaction must contact remote server

Page 5: [India Merge World Tour] Meru Networks

5  

Remote P4D, local P4P

•  Connect via local proxy •  Fetch Metadata •  First user fetch versioned

files from server and rest from local proxy cache.

•  No transfer of file over the network for second time access

P  4  P  

P  4  P  

Page 6: [India Merge World Tour] Meru Networks

6  

Remote P4D, local P4P advance caching

•  Connect to local proxy •  Fetch Metadata •  Let the first person be me

•  Setup a cron that sync frequently used branch/dir/files at regular intervals

P  4  P  

P  4  P  

Page 7: [India Merge World Tour] Meru Networks

7  

Forwarding Replica

Page 8: [India Merge World Tour] Meru Networks

8  

Replication

•  Replication is the duplication of server data from one Perforce Server to another Perforce Server

•  Cache both versioned files and metadata along with some more added intelligence.

Failover?  Read-­‐only?  Forwarding?  Filtered  ?  .  .  .  

Page 9: [India Merge World Tour] Meru Networks

9  

Forwarding Replica

•  From where to replicate? •  To where to replicate? •  Who is replicating? •  What to replicate from server? •  How frequently? •  Ask server to forward

Readable  cache  of  versioned  files  and  metadata,  and  forward  write  command  to  a  central  server  

Page 10: [India Merge World Tour] Meru Networks

10  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. From where? To where?

 Services:  The  services  provided  by  this  server,  one  of:                                      standard:  standard  Perforce  server                                      replica:  read-­‐only  replica  server                                      broker:  p4broker  process                                      proxy:  p4p  caching  proxy                                      forwarding-­‐replica:  replica  which  forwards  update  commands                                      build-­‐server:  replica  which  supports  build  farm  integra8on                                      P4AUTH:  server  which  provides  central  authen8ca8on                                      P4CHANGE:  server  which  provides  central  change  numbers  

Create server identifier for master and replica $p4 server [master_name] ServerID: master Type: server Name: master Services: standard $p4 server [replica_name] ServerID: REPLICA Type: server Name: REPLICA Services: forwarding-replica

Page 11: [India Merge World Tour] Meru Networks

11  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. Connect two servers Tell master about replica

$p4 configure set [replica_name]#P4TARGET=[master_address] $p4 configure set [replica_name]#db.replication=readonly $p4 configure set [replica_name]#lbr.replication=readonly $p4 configure set [replica_name]#P4LOG=replica.log $p4 configure set [replica_name]#P4AUDIT=replica.audit $p4 configure set [replica_name]#server=3 $p4 configure set [replica_name]#monitor=1

Page 12: [India Merge World Tour] Meru Networks

12  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. Who is replicating?

1.  Create a service user for replication

$  p4  user  -­‐f  service  #  A  Perforce  User  Specifica1on.  #    Type:                Either  'service',  'operator',  or  'standard'.  #                                        Default:  'standard'.  Read  only.  User:      service  Type:      service  

2. Set the ticket $p4    -­‐u  service  login  –a  $p4    configure  set  "[replica_name]#P4TICKETS=/home/p4/.p41ckets“  

3. Give it the super power                super  user  service  *  //...  

4. Give it the unlimited timeout                $p4    group  <some-­‐name>  

5. Let this users do the replication            $p4    configure  set  [replica_name]#serviceUser=service  

Page 13: [India Merge World Tour] Meru Networks

13  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. What to replicate? Frequency?

•  Configure meta data pull command (one) to pull every second $p4 configure set "[replica_name]#startup.1=pull -i 1”

•  Configure files pull command (can be more than one) to pull every second

$p4 configure set "[replica_name]#startup.2=pull -u -i 1" $p4 configure set "[replica_name]#startup.3=pull -u -i 1"

Page 14: [India Merge World Tour] Meru Networks

14  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. Ask the server to forward

•  Now tell replica server to forward the request. $p4 configure set [replica_name]#rpl.forward.all=1

Page 15: [India Merge World Tour] Meru Networks

15  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. Set it up. •  Take checkpoint of master server

$p4 admin checkpoint

•  Copy versioned files from master server to replica server node

•  Replay the checkpoint to create replica node (-z if compressed) $p4d -r [replica_root] -jr checkpoint.[xyz]

•  Start the replica node with configured name.

$p4d -r [replica_root] –In [replica_name] -p [replica port] -d -q

Page 16: [India Merge World Tour] Meru Networks

16  

Forwarding Replica - Readable cache of versioned files and metadata, and forward write command to a central server. Keep an eye

•  Keep an eye on replication status $p4 -p <replica-server> pull -l –j

•  Script to monitor replication health http://public.perforce.com:8080/@md=d&cd=//&cdf=//guest/vk_thandesh/bin/p4-watchreplica&c=JM5@//guest/vk_thandesh/bin/p4-watchreplica?ac=64&rev1=1

•  Blog on how to setup forwarding replica http://thandesha.blogspot.in/2013/05/simple-how-to-for-setting-up-perforce.html

Page 17: [India Merge World Tour] Meru Networks

17  

Hooray!! I have productive & happy users

master   replica  

replica8on  

Write  Write  

Write  

Page 18: [India Merge World Tour] Meru Networks

18  

Thinking about it? [email protected]    [email protected]