Upgrade code without stopping traffic
Compare a new build against retained input, then migrate durable state when the build becomes active.
Write application logic that reacts to each event and remembers what came before. Highwater runs it with durable state and elastic compute.
Python SDK available. More language SDKs will follow.
from dataclasses import dataclass, field
from highwater import streaming
from models import recommendation_model
catalog = streaming.versioned("catalog", key="product_id")
@streaming.process(key="user_id")
@dataclass
class ShoppingAssistant:
recent: list[str] = field(default_factory=list)
@streaming.event
async def recommend(self, view, context):
product = await catalog.get(
view.product_id, as_of=context.event_time)
self.recent.append(product.category)
self.recent = self.recent[-5:]
return await recommendation_model.rank(
product=product, recent=self.recent)
The application problem
Highwater supplies per-key ordering, durable state, timers, atomic state and outbox commits, and recovery around your handler.
Compare a new build against retained input, then migrate durable state when the build becomes active.
Move keys from committed state as traffic and model latency change.
Keep agent behavior in Python while each application runs inside a bounded worker.
Resume each key from its committed event, state, timer, and output boundary.
Where it fits
Keep model responses, tool calls, approvals, and timeouts with each session. Durable waits resume without holding compute.
Update a decision from the full history of an account.
Refresh user context as behavior arrives. Batch model calls by latency or size.
Track changing state across long-lived streams.
Event-time progress
A source watermark tells code when event time has advanced past a timestamp. Your policy handles idle sources and late arrivals.
Created at 10:02, paid at 10:06, and an address update for 10:04 arrived late. The source watermark has advanced through 10:12.
@streaming.process(
key="order_id",
wait_until=streaming.complete)event eligibleAdaptive batching
Highwater groups eligible requests for the same batch handler. It dispatches when the batch fills or the oldest request reaches its latency limit.
Your handler chooses the model, version, parameters, and shape. Your model server executes each batch.
Elastic compute
Highwater scales the worker deployment as demand changes. Capacity can run in Highwater Cloud or in your Kubernetes cluster.
Highwater assigns each key to one active worker, records its committed execution, and reassigns it after scaling or failure.
Tiered state
Workers keep hot state on local NVMe. Highwater writes changed blocks to incremental checkpoints and records accepted events in a durable journal.
Highwater creates, restores, and redistributes checkpoints without application coordination.Application upgrades
Replay retained input and versioned state through both builds. Inspect every state and output difference before activating the migration.
In-flight work finishes on its assigned build. Replay comparison writes no state or output. Activation applies declared forward migrations as each key next runs.
Application isolation
Each application build runs in a sandboxed worker pool. Highwater operates the pool in Highwater Cloud or provisions the same profile in your Kubernetes cluster.
Private execution endpoint
Assign · fence · commitApplication operations
Follow accepted work through execution while the worker pool changes around it.
input-03 is holding the event-time frontier.
The controller turns backlog and utilization samples into bounded replica decisions.
Partition leases keep an old worker from committing after reassignment.
Completion records the new state, timers, and emitted output at one boundary.
A replacement owner loads the checkpoint and applies later journal entries.
Reference testing
Keyed throughput, worker reassignment, state migration, and owner-crash recovery.
The representative benchmark sends 100,000 product views across 20,000 shopping sessions and 10,000 products. Each event updates durable session state, performs deterministic ranking work, and periodically emits a recommendation. Eight host workers completed a median 54,452 events per second across three measured runs. Ten hardened container workers completed 45,782 events per second on the same machine.
The live scale test starts one worker over four partitions, publishes while the controller samples backlog, scales to four workers, terminates one, starts its replacement, and reconciles 4,000 transitions across 2,000 keys.
The S3 chaos test terminates a partition owner after a checkpoint, starts a replacement owner, and verifies checkpoint restoration, journal-tail replay, and fencing of stale work.
The sandbox benchmark runs packaged workers as UID 65532 with a read-only root filesystem, dropped capabilities, a no-new-privileges policy, and bounded CPU, memory, and process count. The simpler counter workload exceeds 65,000 completed events per second through that boundary.
Deployment
Choose a fully managed runtime or keep application workers beside your models, services, and private data.
Start with one keyed workload
Review its key, event-time needs, upgrade path, failure contract, and scaling envelope with us.
Define the Process key and stateReplay retained events across two buildsTest scale-out and worker loss