diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de153db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +artifacts diff --git a/book/README.md b/book/README.md new file mode 100644 index 0000000..3d07efe --- /dev/null +++ b/book/README.md @@ -0,0 +1,2 @@ +# Introduction + diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 2192485..6b8f4fb 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -1,5 +1,6 @@ # Summary +* [Introduction](README.md) * [Introduction](ch01_intro.md) * [Anchor Theories](ch02_theories.md) * [Practical Frameworks](ch03_frameworks.md) @@ -7,3 +8,4 @@ * [Virtual Resource Deep-Dive](ch05_virtual_resources.md) * [Supply Chain Tooling: From ERPs to Orchestrators](ch07_tooling.md) * [Annotated Bibliography](ch06_bibliography.md) + diff --git a/book/ch02_theories.md b/book/ch02_theories.md index 357a781..a8fbc47 100644 --- a/book/ch02_theories.md +++ b/book/ch02_theories.md @@ -24,8 +24,20 @@ These theories provide the academic and strategic foundation for SCM, offering f - **Asset Specificity & Lock-in:** Occurs when users adopt provider-specific APIs or proprietary formats (e.g., DynamoDB), increasing "switching costs." ## Agency Theory -- **General Purpose:** Examines the relationship between a 'principal' and an 'agent' and the conflicts of interest that arise when goals are misaligned. -- **Application to Virtual Resources:** Relevant in the context of SLAs (Service Level Agreements) and the governance of managed services where the provider (agent) manages resources for the user (principal). +- **General Purpose:** Explores the relationship where a **Principal** delegates authority to an **Agent**. The "Principal-Agent Problem" occurs when interests diverge and the principal cannot perfectly monitor the agent. This is driven by **Information Asymmetry**, leading to: + - **Adverse Selection**: Pre-contractual inability to determine agent competence, where an incompetent agent may misrepresent their capabilities to be selected. + - **Moral Hazard**: Post-contractual behavior where the agent acts in their own interest (e.g., shirking or cutting corners) because their actions are not fully observable to the principal. +- **Traditional SCM Application:** Highly prevalent in outsourcing and supplier relationship management where the buyer (Principal) delegates production to a supplier (Agent). To align interests, parties manage **Agency Costs**: + - **Monitoring Costs**: Expenses incurred by the principal to verify agent behavior (e.g., quality audits, on-site inspections). + - **Bonding Costs**: Expenses incurred by the agent to signal reliability and competence (e.g., performance bonds, ISO certifications). + - **Residual Loss**: The loss in value that occurs because agent decisions still deviate from the principal's ideal choice despite monitoring. +- **Application to Virtual Resources:** The **Cloud Customer (Principal)** and the **Cloud Service Provider (Agent)** relationship. + - **The Virtualization Gap**: The CSP has full visibility into physical hardware health and multi-tenancy, while the customer sees only a virtual abstraction. This creates a severe **Information Asymmetry**. + - **Virtual Moral Hazard**: Because the customer cannot see the "physical truth," the CSP may engage in behaviors maximizing their own profit, such as **aggressive overcommitment** (over-provisioning) or silent **resource throttling**. + - **SLA Governance**: Service Level Agreements (SLAs) serve as the primary mechanism to align incentives, using financial penalties (service credits) to shift the risk of moral hazard back to the provider. +- **Key References:** + - Jensen, M. C., & Meckling, W. H. (1976). *Theory of the firm: Managerial behavior, agency costs and ownership structure*. Journal of Financial Economics. + - Eisenhardt, K. M. (1989). *Agency Theory in Organizational Research*. Academy of Management Review. ## Contingency Theory - **General Purpose:** Suggests there is no single "best way" to manage a supply chain; the optimal approach depends on the internal and external situation. diff --git a/book/ch05_virtual_resources.md b/book/ch05_virtual_resources.md index dfb825c..26f5e0b 100644 --- a/book/ch05_virtual_resources.md +++ b/book/ch05_virtual_resources.md @@ -13,7 +13,62 @@ When content goes viral, the virtual supply chain reacts through: - **Overcommitment:** Providers often "over-sell" virtual resources (e.g., CPU overcommitment), betting that not all tenants will peak simultaneously—a form of virtual inventory speculation. ## Mapping Virtual Services to Physical Resources -The "production" of a virtual service is the mapping of software requirements to physical hardware: -- **Generic Resources:** The primary raw materials are **CPU** and **RAM**. -- **Resource Stranding:** A critical failure in virtual SCM where a physical host has available CPU but is out of RAM, leading to wasted, unusable capacity. -- **Orchestration:** Tools like **Kubernetes** act as the "Supply Chain Manager," performing real-time planning and delivery of resources. +The "production" of a virtual service is the mapping of software requirements to physical hardware. While this is often viewed as a real-time orchestration problem, it is fundamentally an optimization problem: how to allocate finite physical resources to satisfy virtual demand with minimal waste. + +In this framework, tools like **Kubernetes** should be viewed not as the "Supply Chain Manager," but as the *execution arm*. The high-level placement decisions—driven by capacity planning and mathematical optimization—are handed down to the orchestrator to be realized in the physical fleet. + +## Demand Planning for Virtual Resources + +Before a single VM is provisioned, a complex planning process converts uncertain future needs into a hardware procurement strategy. + +### Demand Forecasting +Cloud providers utilize multi-tiered forecasting to ensure capacity is available where and when it is needed: +- **Time-Series Analysis:** Identifying diurnal cycles and weekly peaks using ARIMA or exponential smoothing to establish baseline capacity. +- **ML-Based Forecasting:** Using LSTMs or Transformers to analyze historical telemetry and correlate it with external events (e.g., holidays or major product launches) to predict "bursty" workloads. +- **Predictive Autoscaling:** Transitioning from reactive scaling to proactive "warming" of resources, ensuring the supply chain is ready before the demand spike hits. + +### Demand Intake as a Planning Signal +To reduce uncertainty, providers use "demand intake" mechanisms that serve as high-fidelity signals: +- **Reservations and Committed Use Discounts (CUDs):** These function as "firm orders" in traditional SCM, providing a guaranteed floor of demand that allows for high-confidence hardware commitments. +- **Quotas:** While often seen as restrictions, quota requests act as "leading indicators" of potential growth for specific customers. + +## Supply-Demand Matching (SDM) and Fungibility + +The matching process in virtual environments differs from physical SCM due to the nature of the "goods" being managed. + +### Resource Fungibility +A core concept in virtual planning is **fungibility**: the property where one unit of a resource is interchangeable with another of the same type. +- **Generic vCPUs:** In a homogeneous cluster, any vCPU is effectively the same as any other. This transforms the problem from matching specific items to managing a pool of aggregate capacity. +- **Simplification:** Fungibility removes the need to track "serial numbers" of components, allowing the matching engine to focus on total available "slots" across the fleet. + +However, fungibility is not absolute. Differences in CPU architecture (x86 vs. ARM) or GPU generations (A100 vs. H100) introduce "flavors" of supply, requiring a more nuanced matching matrix. + +## Mathematical Optimization + +When matching demand to supply, simple heuristics (like "First Fit") often lead to inefficiencies. Cloud providers employ **Mixed-Integer Programming (MIP)** to achieve optimal allocation. + +### The Bin Packing Problem at Scale +The fundamental challenge of VM placement is a variation of the **Bin Packing Problem**: the goal is to pack a set of "items" (VMs with specific resource requirements) into the minimum number of "bins" (Physical Servers) while respecting capacity constraints. + +In a MIP formulation, decision variables are typically binary (e.g., $x_{ij} = 1$ if VM $i$ is placed on Server $j$), and the objective function aims to minimize active servers or maximize total utilized capacity. + +### Resource Stranding and Fragmentation +A critical failure in this process is **Resource Stranding**. This occurs when a server has remaining capacity in one dimension (e.g., CPU) but is completely exhausted in another (e.g., RAM). The remaining CPU is "stranded" because it cannot be utilized without accompanying RAM. + +MIP solvers prevent stranding by optimizing the *balance* of resources. Instead of merely packing for density, the model penalizes imbalanced remaining capacity, encouraging the placement of VMs that "complement" the existing resource footprint of the server. + +### Industry Solvers +Solving these combinatorial problems at cloud scale requires high-performance solvers such as **Gurobi**, **CPLEX**, or **Google OR-Tools**, often augmented by ML-driven heuristics to provide "warm starts" for the optimization loop. + +## Conceptual Mapping: Virtual vs. Traditional SCM + +The mathematical approaches used in virtual resource planning are direct analogs to traditional supply chain tools: + +| Virtual Planning Concept | Traditional SCM Analog | Mathematical Tool | +| :--- | :--- | :--- | +| **Demand Forecasting** | Sales & Operations Planning (S&OP) | Time-Series / ML | +| **CUDs / Reservations** | Firm Purchase Orders / Contracts | Demand Signal Analysis | +| **Fungibility** | Commodity Trading (e.g., Oil, Grain) | Aggregate Capacity Planning | +| **Bin Packing / Placement** | Container Loading / Palletization | MIP / Combinatorial Optimization | +| **Resource Stranding** | Dead Inventory / "Lopsided" Kits | Multi-Objective Optimization | +| **Capacity Balancing** | Global Inventory Redistribution | Network Flow Optimization |