Page MenuHomePhabricator

Synchronize (hosted, clustered, Git) repositories over Conduit + HTTP

Authored by epriestley on Apr 19 2016, 5:02 PM.



Ref T4292. We currently synchronize hosted, clustered, Git repositories when we receive an SSH pull or push.


  • Synchronize before HTTP reads and writes.
  • Synchronize reads before Conduit requests.

We could relax Conduit eventually and allow Diffusion to say "it's OK to give me stale data".

We could also redirect some set of these actions to just go to the up-to-date host instead of connecting to a random host and synchronizing it. However, this potentially won't work as well at scale: if you have a larger number of servers, it sends all of the traffic to the leader immediately following a write. That can cause "thundering herd" issues, and isn't efficient if replicas are in different geographical regions and the write just went to the east coast but most clients are on the west coast. In large-scale cases, it's better to go to the local replica, wait for an update, then serve traffic from it -- particularly given that writes are relatively rare. But we can finesse this later once things are solid.

Test Plan
  • Pushed and pulled a Git repository over HTTP.
  • Browsed a Git repository from the web UI.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 37968.Apr 19 2016, 5:02 PM
epriestley retitled this revision from to Synchronize (hosted, clustered, Git) repositories over Conduit + HTTP.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad accepted this revision.Apr 19 2016, 7:46 PM
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 19 2016, 7:46 PM
This revision was automatically updated to reflect the committed changes.