HomePhabricator

Add a "metronome" for spreading service call load

Authored by epriestley on Feb 5 2019, 12:52 AM.

Description

Add a "metronome" for spreading service call load

Summary:
Ref T13244. See D20080. Rather than randomly jittering service calls, we can give each host a "metronome" that ticks every 60 seconds to get load to spread out after one cycle.

For example, web001 ticks (and makes a service call) when the second hand points at 0:17, web002 at 0:43, web003 at 0:04, etc.

For now I'm just planning to seed the metronomes randomly based on hostname, but we could conceivably give each host an assigned offset some day if we want perfectly smooth service call rates.

Test Plan: Ran unit tests.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13244

Differential Revision: https://secure.phabricator.com/D20087

Details

Committed
epriestleyFeb 5 2019, 10:06 PM
Pushed
epriestleyFeb 5 2019, 10:06 PM
Reviewer
amckinley
Differential Revision
D20087: Add a "metronome" for spreading service call load
Parents
rPb8fe991ba28e: Improve description text in the "Create Diff" form
Branches
Unknown
Tags
Unknown
Tasks
T13244: 2019 Week 6 Bonus Content
Build Status
Buildable 21839
Build 29802: Run Core Tests