Class FcCommandKeys
java.lang.Object
org.frontcache.resilience.FcCommandKeys
The command keys, in one place.
A command key is not an internal name. It owns a circuit breaker, a bulkhead and a time limiter;
it is the
<key> in resilience.command.<key>.*; it is the name field of a
dashboard frame; and it is the command label on every frontcache_* metric series.
They were string literals scattered across the FC_* classes until 2.9.0 renamed four of
them and found them by grep.
What each one covers
Input-Request- a request from a client. The dashboard's headline traffic figure.Include-Request- an include arriving back through this node's own front door.Warm-Request- the cache warmer's own request, sent to this node's front door. Reads zero except during a warm run, which is the point: warm traffic stays off the headline number and offInput-Request's bulkhead.Cache-Hit- a cache lookup. Every lookup, hit or miss, hence the surrounding command.Cache-Miss- the origin call a cache miss makes.Cache-Bypass- the origin call a request that never consults the cache makes.
Cache-Miss is two pre-2.9.0 keys combined
Cache-Origin-http (a socket to the origin) and Cache-Origin-filter (the filter
chain of the app Frontcache is installed in) named the TRANSPORT, which is a property of how the
node is deployed rather than of what the command does - both are "the origin call behind a cache
miss", and an operator tuning one always wanted the same number in the other. They now share one
key, and therefore one breaker, one bulkhead and one row on the dashboard.
That is a behaviour change on a filter-mode node, and only there. A standalone node only
ever used the http one. A filter-mode node uses the filter chain for the page's own origin call
and HTTP for include fetches (fetchOverHttp is always HTTP, never the chain), so it had
two independent breakers over the same origin and now has one. Sharing is the more correct answer
- it is one origin, and a breaker that sees all of its failures opens on evidence the split
version threw away - but the concurrency permits are now shared too.
The old names still configure the new ones
LEGACY_COMMAND_KEYS maps each new key to the pre-2.9.0 key it inherits settings from when
a resilience.properties says nothing about the new name. Renaming a command key without
this would silently reset that command to the built-in defaults - timeout=1000,
maxConcurrentRequests=10 - on every node whose file predates the rename. For an origin
call tuned to 10 or 20 seconds, that is not a metrics change, it is an outage. See
FcResilienceConfig, which walks the chain.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe origin call for a request that bypasses the cache entirely.static final StringA cache lookup - every lookup, whether it hits or misses.static final StringThe origin call behind a cache miss, whichever transport reaches the origin.static final StringA Frontcache include arriving back through this node's own front door.static final StringA request from a client - what an operator reads as "how much traffic is this node taking".New key -> the pre-2.9.0 key whose settings it falls back on.New thread-pool key -> the pre-2.9.0 key whose settings it falls back on.static final StringThe thread pool every THREAD-isolated origin call runs on -CACHE_MISSandCACHE_BYPASSboth.static final StringThe cache warmer's loopback request - seeorg.frontcache.warmer.WarmRequest. -
Method Summary
-
Field Details
-
INPUT_REQUEST
A request from a client - what an operator reads as "how much traffic is this node taking".- See Also:
-
INCLUDE_REQUEST
A Frontcache include arriving back through this node's own front door.- See Also:
-
WARM_REQUEST
The cache warmer's loopback request - seeorg.frontcache.warmer.WarmRequest. Not a rename, so it has noLEGACY_COMMAND_KEYSentry. It inheritsInput-Request's settings instead (FcResilienceConfig), which is what a warm request would have run under before the key existed - without that an un-edited resilience.properties would give it the built-intimeout=1000, and every page slower than a second would fail to warm.- See Also:
-
CACHE_HIT
A cache lookup - every lookup, whether it hits or misses.- See Also:
-
CACHE_MISS
The origin call behind a cache miss, whichever transport reaches the origin.- See Also:
-
CACHE_BYPASS
The origin call for a request that bypasses the cache entirely.- See Also:
-
ORIGIN_POOL
The thread pool every THREAD-isolated origin call runs on -CACHE_MISSandCACHE_BYPASSboth. Named after what the pool is for rather than after either of the commands that use it: "calls to the origin" is the property those two share, and it is what an operator is sizing when they setcoreSize. CalledOriginHitsPoolthrough 2.8, after the command key that becameCache-Bypass- which was the RARER of the two paths, so the old name pointed at the one that does not fill the pool.- See Also:
-
LEGACY_COMMAND_KEYS
New key -> the pre-2.9.0 key whose settings it falls back on. A LinkedHashMap because the order is the order these are reported in, and a stable order makes the startup line and any test over it deterministic.Cache-Missinherits fromCache-Origin-httprather thanCache-Origin-filterbecause the http one is the key every deployment mode used - a filter-mode node fetches its includes over HTTP. A node that deliberately tuned the two differently is the one case this cannot carry over, and it has to setresilience.command.Cache-Miss.*explicitly.Cache-Hitis the one entry here that is only a spelling change: it wasCache-Hitsbefore 2.9.0, and it was the last key left in the plural once the other renames put the rest in the singular. Nothing about the command moved - it is still every cache lookup - but the key is a config contract all the same, so an un-edited file keeps configuring it through the old name. -
LEGACY_THREAD_POOL_KEYS
New thread-pool key -> the pre-2.9.0 key whose settings it falls back on. The same reasoning asLEGACY_COMMAND_KEYS, and if anything a sharper failure. A pool key that resolves to nothing does not stop at a merely different number:coreSizefalls tothreadpool.default.coreSize, and on a file that never set one, to the built-in 10. A node whose operator had tunedOriginHitsPool.coreSize=200would come up capping every origin call at ten threads, having changed nothing.
-