Project

General

Profile

Actions

Feature #39208

closed

Cache global registration script in smart-proxy

Added by Pablo Méndez Hernández 5 months ago. Updated 17 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

GET /register returns the same shell script for all hosts sharing the same registration parameters (org, location, hostgroup, activation keys). Under bulk registration — 100+ hosts hitting the same capsule simultaneously — this endpoint is called once per host, each time proxying to Foreman and waiting for the ERB template to render (~103ms in profiling).

This change caches the rendered script in memory (5-minute TTL) keyed on a canonical form of the request query string, with per-key double-checked locking to prevent thundering herd while allowing concurrent requests for different keys to fetch from Foreman in parallel.

Actions #1

Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/935 added
Actions #2

Updated by Pablo Méndez Hernández 5 months ago

  • Red Hat JIRA set to SAT-43996
Actions #3

Updated by The Foreman Bot 17 days ago

  • Fixed in Releases 5.0.0 added
Actions #4

Updated by Pablo Méndez Hernández 17 days ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF