Skip to content

Commit 5de9837

Browse files
committed
Adding to proposal to give a quick barebones definition to refactor
1 parent fb9ddaf commit 5de9837

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

docs/proposals/00x-epp-compliance-proposal/README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Gateway API Inference Extension
22

3+
Author(s): @kfswain
34
## Proposal Status
45
***Draft***
56

@@ -41,4 +42,60 @@ This proposal seeks to standardize the implementation of an EPP (End-point Picke
4142

4243
## Proposal
4344

44-
This
45+
This proposal is not proposing any net new features, instead, we are refactoring our current implementation to better handle more devs, more features, etc. At the time of writing this. We are currently at v0.3, and that stronger experimental context (along with external feedback) made clear the need this restructure. The image below give a high level view of how our components work together.
46+
47+
<img src="./images/epp_arch.svg" alt="Scheduling Algorithm" width="1000" />
48+
49+
## Overview
50+
At a quick glance, the EPP is being broken into specific layers. The `Data Layer` is of note, as it is a vertical that will be accessed by all the others. The data layer manages the k8s, data, metric & usage data, as well as processing of the above data to determine resource scarcity regimes.
51+
52+
The other layers are handled in sequential process. Starting with the **Ext-Proc** call. The request is buffered and then sent to the **Routing Layer**, which processes any User defined per-InferenceModel routing rules & request enrichment happening first (at the time of writing that is currently just translating the InferenceModel name to a weight-split actual model). Then _all_ requests pass through the **Flow Controller** to ensure that any request entry to the pool adhereing to the guidelines set by the Priority,Fairness, & Queueing configuration. And finally, the **Scheduling Layer** is the load balancing algorithm that intelligently routes requests based on the current state of the InferencePool.
53+
54+
## Components
55+
56+
To further expand upon these component layers. We will first break them into `extensible` and `non-extensible` layers. `Non-extensible` layers are intended to be static, and handled on behalf of the user, typically implementing low-opinion infrastructure.
57+
58+
The `Extensible` layers are:
59+
- Routing Layer
60+
- Scheduling Layer
61+
- Data Layer
62+
- Flow Controller
63+
64+
The `Non-Extensible` layer(s)s are:
65+
- The Ext-Proc Server
66+
67+
### `Extensible`
68+
69+
#### Routing Layer
70+
71+
The routing layer is likely to be the most opinion heavy section, as the scope of what constitutes a 'Route Rule' is somewhat broad. The current examples we expect would be:
72+
73+
- System Prompt injection
74+
- RAG callout
75+
- Per-InferenceModel request validation (such as saftey/on-topic, etc)
76+
77+
Due to the possibility of this becoming a bit of a dumping ground. The API will keep a _very_ tight scope on which of these route rules are included in the spec. A standard method of extension will be provided if the need to define a custom rule arises.
78+
79+
#### Scheduling Layer
80+
81+
As the Scheduling Layer is the final interface to the entirety of the pool, all configuration will be at the _pool_ level. The default scheduling layer will be an experimentally-backed LB algorithm, with exposed config values.
82+
83+
The Scheduler will define a strong interface API, so that new scheduling algos may be plugged & dark-launched to test in production traffic without impacting said traffic. Extension is expected to adhere to the [Scheduler Subsystem definition](https://github.com/kubernetes-sigs/gateway-api-inference-extension/pull/603)
84+
85+
86+
#### Data Layer
87+
88+
The data layer will consume and store: the InferencePool/InferenceModel config and the pre-defined [Model Server Protocol](../003-model-server-protocol/README.md) metrics. Additionally, the model server metrics will be processed and digested to provide resource scarcity regime hints, and autoscaling reccomendations.
89+
90+
Many extensions to scheduling will require changes to ingested metrics, as such, the data layer will be built to be extended, but extenders accept that the Model Server Protocol will no longer provide guarantees on portability of a model server out of the box.
91+
92+
#### Flow Controller
93+
94+
The flow controller will consume resource regime data, and enforce proper resource sharing between workloads. This will primarily be done through a queuing mechanism [as described here](https://docs.google.com/document/d/1VZL7opFWuwgWquvgiOzLlXAJ633qZ9U-A0ZixGjBgaI/edit?usp=sharing).
95+
96+
### `Non-extensible`
97+
98+
#### Ext-Proc Server
99+
100+
The Ext-Proc Server protocol is very well defined & specific, deviation could cause the EPP to become unusable or unstable. Extension is ill-advised.
101+

0 commit comments

Comments
 (0)