@@ -35,6 +35,23 @@ public class WorkerSettings
3535 /// </summary>
3636 public bool IgnoreSkuProfiles { get ; set ; }
3737
38+ /// <summary>
39+ /// A second SkuProfiles matrix, selected when the env var named by <see cref="SkuProfilesAltEnv"/> is
40+ /// present (set to a non-empty value); otherwise <see cref="SkuProfiles"/> is used. Lets a deployment
41+ /// ship one config with two sizings — e.g. a smaller per-instance matrix for instances packed onto a
42+ /// shared App Service Plan — and pick between them with a single env var. Same matching rules as
43+ /// <see cref="SkuProfiles"/>. Ignored (falls back to <see cref="SkuProfiles"/>) when empty.
44+ /// </summary>
45+ public List < SkuProfile > SkuProfilesAlt { get ; set ; } = [ ] ;
46+
47+ /// <summary>
48+ /// Name of the env var whose presence selects <see cref="SkuProfilesAlt"/> instead of
49+ /// <see cref="SkuProfiles"/> (e.g. "CIPP_HOSTED"). Null/empty = the second matrix is never used.
50+ /// Only presence matters — set the var (to any non-empty value) on the instances that should use the
51+ /// second matrix, and leave it unset on the rest. Configurable so each app picks its own flag.
52+ /// </summary>
53+ public string ? SkuProfilesAltEnv { get ; set ; }
54+
3855 /// <summary>
3956 /// Minimum .NET thread-pool worker/completion threads. <b>0 (default) = derive from the pool
4057 /// sizes</b>, which is almost always what you want; set a number only to pin it.
@@ -75,6 +92,29 @@ public class WorkerSettings
7592 /// </summary>
7693 public int BgTimeoutSeconds { get ; set ; }
7794
95+ /// <summary>
96+ /// How long an incoming HTTP request waits for a free PowerShell runspace when every worker in the
97+ /// HTTP pool is already busy, before it is shed with <c>503 "Server busy, please retry"</c>.
98+ ///
99+ /// <para>
100+ /// This is a load-shedding bound, NOT a capacity or execution knob. It does not add throughput —
101+ /// under sustained saturation it only changes how long callers wait before the 503 (longer waits
102+ /// hold connections and lengthen the tail). Its value is in absorbing <b>brief</b> bursts: a
103+ /// request that would have got a worker a few seconds later completes instead of failing spuriously.
104+ /// When 503s appear under steady load the levers are <see cref="HttpPoolSize"/> /
105+ /// <see cref="MinThreads"/> / a larger host, not this.
106+ /// </para>
107+ ///
108+ /// <para>
109+ /// Distinct from <see cref="HttpTimeoutSeconds"/> (which bounds how long a request may <i>execute</i>
110+ /// once it holds a worker). 0 or negative = the built-in default of 30 seconds.
111+ /// </para>
112+ ///
113+ /// Env override: <c>CRAFT_HTTP_QUEUE_TIMEOUT</c> (seconds), which wins over this setting.
114+ /// Resolved by <c>CraftHostBuilderExtensions.ResolveHttpQueueTimeout</c>.
115+ /// </summary>
116+ public int HttpQueueTimeoutSeconds { get ; set ; }
117+
78118 /// <summary>
79119 /// Environment variables to inject into every PowerShell runspace.
80120 /// Use "{ApiBasePath}" as a placeholder — it will be replaced with the resolved API directory at startup.
0 commit comments