ordering

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

Eviction Priority-Then-Time Ordering Plugin

Type: eviction-priority-then-time-ordering

An eviction ordering policy that selects which queued request to evict when the system is overloaded. It prioritizes evicting the lowest-priority request first. When two requests share the same priority, the most recently dispatched one is evicted first, minimizing wasted KV-cache investment.

Eviction ordering:

  1. Lowest priority first — requests with more negative priority are evicted before those with less negative or zero priority.
  2. Newest dispatch time first (tie-breaker) — among equal-priority requests, the one dispatched most recently is evicted, as it has the least sunk cost in KV-cache memory.

Parameters: None.


Documentation

Index

Constants

View Source
const PriorityThenTimeOrderingType = "priority-then-time-eviction-order-policy"

PriorityThenTimeOrderingType evicts the lowest priority request first, breaking ties by newest dispatch time (least KV-cache investment).

Variables

This section is empty.

Functions

func PriorityThenTimeOrderingFactory

func PriorityThenTimeOrderingFactory(name string, _ *json.Decoder, _ plugin.Handle) (plugin.Plugin, error)

PriorityThenTimeOrderingFactory creates a PriorityThenTimeOrdering plugin.

Types

type PriorityThenTimeOrdering

type PriorityThenTimeOrdering struct {
	// contains filtered or unexported fields
}

PriorityThenTimeOrdering evicts the lowest priority request first. When priorities are equal, the newest dispatched request is evicted first to minimize wasted KV-cache investment.

func (*PriorityThenTimeOrdering) Less

func (*PriorityThenTimeOrdering) TypedName

func (p *PriorityThenTimeOrdering) TypedName() plugin.TypedName

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL