Page MenuHomePhabricator

Cache generation of the SSH authentication keyfile for sshd

Authored by epriestley on Oct 21 2016, 2:27 PM.
Referenced Files
Unknown Object (File)
Thu, Nov 30, 4:49 AM
Unknown Object (File)
Fri, Nov 24, 8:39 PM
Unknown Object (File)
Fri, Nov 17, 5:53 PM
Unknown Object (File)
Mon, Nov 13, 7:41 PM
Unknown Object (File)
Oct 30 2023, 2:58 PM
Unknown Object (File)
Oct 27 2023, 4:43 PM
Unknown Object (File)
Oct 25 2023, 12:07 AM
Unknown Object (File)
Oct 24 2023, 11:27 AM



Ref T11469. This isn't directly related, but has been on my radar for a while: building SSH keyfiles (particular for installs with a lot of keys, like ours) can be fairly slow.

At least one cluster instance is making multiple clone requests per second. While that should probably be rate limited separately, caching this should mitigate the impact of these requests.

This is pretty straightforward to cache since it's exactly the same every time, and only changes when users modify SSH keys (which is rare).

Test Plan
  • Ran bin/auth-ssh, saw authfile generate.
  • Ran it again, saw it read from cache.
  • Changed an SSH key.
  • Ran it again, saw it regenerate.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Cache generation of the SSH authentication keyfile for sshd.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 21 2016, 2:28 PM

This was just a bug, but we mostly don't interact with database caches today since we have relatively little data like this.

This revision was automatically updated to reflect the committed changes.