معماری چندکسب‌وکاری، تجاری و تجارت الکترونیک · فصل ۱ — Venture Separation، Shared Interface، Resource و Tenant · 222

Resource Broker Metadata

Design broker metadata that separates resource identity from requested quantity, allocatable capacity, capabilities, locality, reservation, tenancy and health, then use those fields to produce explainable candidate and rejection decisions. می‌تواند برای «Resource Broker Metadata» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

Resource Broker Metadata — fa-IR

Lesson summary

Design broker metadata that separates resource identity from requested quantity, allocatable capacity, capabilities, locality, reservation, tenancy and health, then use those fields to produce explainable candidate and rejection decisions.

می‌تواند برای «Resource Broker Metadata» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

This lesson produces

می‌تواند برای «Resource Broker Metadata» یک تصمیم bounded با constraints، cost/risk و stop/pivot condition طراحی کند.

Who it is for

Foundation

Use a field map, one worked scenario and explicit state vocabulary before independent construction.

Repair

Identify the failed evidence dimension, use the smallest mutated fixture and rerun only the affected gate.

Experienced

Compress definitions; require trade-off defense, counterexample analysis and changed-context transfer.

Prerequisites

1. Owned problem

A broker cannot place work defensibly from a resource name, provider label, or green health flag. The real question is whether one resource is eligible and allocatable for this workload, this quantity, this tenant, and this decision time. ARC-003 owns the metadata and rejection evidence for that decision; Versioned Shared Interfaces and Quota/Reservation remain separate outcomes.

2. Deliverable

Build Resource Broker Capability & Allocation Metadata Sheet v1. Keep demand separate from supply and record Resource ID/Type/Provider, Total and Allocatable capacity, Request Quantity and Unit, Capabilities, Locality, Tenant Scope, Reservation, Health, Availability, Cost Basis, Candidate State, Rejection Reason, Observed At, and Provenance.

3. Mental model: demand → gates → rank

Normalize workload demand first. Pass each resource through hard eligibility gates. Only ELIGIBLE candidates enter ranking. The flow is normalized demand → resource metadata → hard eligibility filters → eligible set → ranking → decision + rejection evidence. Cost is an advisory preference after eligibility, not a substitute for it.

4. Evidence contract

request_quantity, capacity_allocatable, and unit must be comparable. Capability, locality, tenant scope, reservation, and health remain independent. observed_at and provenance_ref identify the snapshot behind the decision. If decisive metadata is unknown, weaken the state; never invent fields merely to complete the sheet.

5. Request is not the same as limit

Kubernetes distinguishes requests from limits and uses requests in scheduling decisions. The transferable lesson is that a broker must carry the workload's placement demand explicitly; a resource name or theoretical maximum does not replace the workload request.

6. Total capacity is not allocatable capacity

capacity_total is nominal capacity; capacity_allocatable is the amount usable for the decision snapshot. A resource can be large and healthy while allocatable capacity is below the request. Green health cannot turn that candidate into ELIGIBLE.

7. Capability and unit are hard gates

If the workload needs a GPU/CUDA or another hard feature, a candidate missing that capability is rejected. Quantity without unit is not comparable: “24” without GiB/GB or “1” without a device unit is not defensible. Missing decisive unit or capability metadata produces UNKNOWN, not an invented conversion or label.

8. Worked baseline

The workload needs one GPU, at least 24 GiB memory, locality eu-central or eu-west, and Tenant A. The local CPU node fails capability. The shared GPU worker has enough capacity and is healthy, but it is reserved for Tenant B, so it is INELIGIBLE. The cloud GPU worker exposes two allocatable GPU units, matching capability, allowed locality, and no conflicting reservation; it becomes ELIGIBLE and is selected after ranking.

ResourceTypeProviderTotalAllocatableRequestUnitCapabilitiesLocalityTenant ScopeReservationHealthAvailabilityCost BasisCandidate StateRejection ReasonObserved AtProvenance
cpu-local-01CPUlocal32241GPUcpu,avxeu-centralTENANT-AnoneGREENnow1.0 cost-unitINELIGIBLECAPABILITY_MISMATCH2026-09-15T18:00:00SYN-CPU
gpu-shared-01GPUshared-fleet211GPUgpu,cudaeu-centralTENANT-ATENANT-B:ACTIVEGREENnow1.8 cost-unitINELIGIBLERESERVED_OTHER_TENANT2026-09-15T18:00:00SYN-SHARED
gpu-cloud-01GPUcloud421GPUgpu,cudaeu-centralTENANT-AnoneGREENnow2.8 cost-unitELIGIBLE2026-09-15T18:00:00SYN-CLOUD

9. Why green health is not enough

A tempting shortcut treats health_state=GREEN as availability. In the mutation, the cloud GPU remains GREEN but capacity_allocatable=0.5 GPU while the request is 1 GPU. It must be INELIGIBLE. Health is one gate; it does not erase capacity, reservation, tenant, or locality constraints.

10. Reservation and tenant scope

A resource can be shared while an active reservation belongs to another tenant. Physical capacity exists, but the resource is not eligible for the current request. If reservation ownership and broker ownership evidence conflict, DISPUTED is stronger than guessing an owner.

11. Locality and availability window

Locality must satisfy the workload constraint, not merely name a region. Availability windows can also exclude a candidate temporarily. A locality or reservation change after ranking is a material change; do not copy the old decision. Keep it PARTIAL until recomputed.

12. Staleness, provenance, and non-success states

Resource metadata changes quickly. Old decisive evidence for a scarce resource can become STALE. Missing quantity/unit/capability can be UNKNOWN. Ownership conflict is DISPUTED, an explicit policy prohibition is BLOCKED, and an unrecomputed material change is PARTIAL. These states prevent overclaiming.

13. Transfer: healthy GPU, changed reservation and locality

In the transfer case, the same shared GPU remains healthy, its Tenant B reservation is released, and locality changes from eu-central to eu-west; the workload already allows both localities. With the same request, eligibility is recomputed. The shared GPU is now ELIGIBLE and, with a lower cost basis than the cloud worker, can become the new selected candidate. The baseline decision is not reused as an oracle.

14. Lab execution

Open lab/ARC-003-LAB1/learner/ and run python run_checks.py offline. Eight fixtures cover baseline, green-but-under-capacity, missing unit, tenant-scope change, stale evidence, reservation conflict, missing capability, and transfer. Do not memorize verdicts; explain the first controlling hard gate or evidence state.

15. Assessment, freshness, and claim boundary

Assessment covers boundary retrieval, baseline sheet construction, shortcut diagnosis, and transfer. Kubernetes documentation bounds FACT semantics for requests, capacity, and extended-resource scheduling. The schema, state vocabulary, and ranking policy remain MAKNOW DESIGN. Material source or broker-policy changes require a newly qualified package version rather than silent mutation of this Golden.

Assessment

There is no answer key in this lesson pack; answer it yourself and mark honestly. "Needs review" sends the lesson to your review queue.

ARC-003-S1 retrieval

State the owned decision boundary of Resource Broker Metadata and name one adjacent outcome that remains out of scope.

lesson ✗AI ✗notes ✗

ARC-003-S2 application

Build Resource Broker Capability & Allocation Metadata Sheet v1 for the baseline fixture and explain the selected candidate plus each rejection.

lesson ✗AI ✗notes ✗

ARC-003-S3 diagnosis

A resource is GREEN but allocatable capacity is below the request. Which state and reason should change, and why?

lesson ✗AI ✗notes ✗

ARC-003-S4 transfer

The shared GPU remains healthy, its reservation is released, and locality changes to another allowed locality. Recompute eligibility and ranking without changing workload demand.

lesson ✗AI ✗notes ✗
Assessment rubric

Critical dimensions: boundary correctness, exact demand/supply evidence binding, negative evidence, bounded candidate decision, and changed-context transfer. A positive result is insufficient if quantity/unit, capability, tenant/reservation, locality, timestamp, or provenance is unsupported. Typed uncertainty must remain visible.

References & freshness

Resource Management for Pods and Containers
·
Resource requests, limits, scheduling fit, allocatable capacity and extended-resource quantity semantics only.

Case studies

Lab files

دستور python run_checks.py را Offline اجرا کنید. در هشت Fixture اولین فیلد Demand/Supply، Hard Gate یا Evidence State کنترل‌کننده را توضیح دهید. Health سبز هیچ‌وقت Capacity، Unit، Capability، Locality، Tenant Scope، Reservation، Timestamp یا Provenance را override نمی‌کند.