Page MenuHomePhabricator

Cache generation of the SSH authentication keyfile for sshd
ClosedPublic

Authored by epriestley on Oct 21 2016, 2:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 6:06 PM
Unknown Object (File)
Wed, Mar 27, 5:14 PM
Unknown Object (File)
Tue, Mar 19, 9:12 PM
Unknown Object (File)
Tue, Mar 19, 7:17 PM
Unknown Object (File)
Tue, Mar 19, 7:12 PM
Unknown Object (File)
Tue, Mar 19, 6:53 PM
Unknown Object (File)
Mon, Mar 4, 3:16 PM
Unknown Object (File)
Feb 19 2024, 4:33 PM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
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
src/applications/cache/PhabricatorKeyValueDatabaseCache.php
101

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.