Skip to content

dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI#45842

Draft
agrawroh wants to merge 1 commit into
envoyproxy:mainfrom
agrawroh:dec-1
Draft

dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI#45842
agrawroh wants to merge 1 commit into
envoyproxy:mainfrom
agrawroh:dec-1

Conversation

@agrawroh

@agrawroh agrawroh commented Jun 25, 2026

Copy link
Copy Markdown
Member

Description

This PR adds an opt-in persistent backing for a cluster's cross-priority host map. A dynamic modules cluster can call the new envoy_dynamic_module_callback_cluster_use_persistent_host_map callback during cluster init
to replace the default flat copy-on-write map with an immer persistent map, turning each membership update from an O(N) copy into an O(delta) update.

The map is published through a new HostLookupTable interface so the backing is swappable without changing consumers. The flat map stays the default and membership behavior is identical under either backing.


Commit Message: dynamic_modules: per-cluster persistent cross-priority host map via cluster ABI
Risk Level: Low
Testing: Added Tests
Docs Changes: Added
Release Notes: Added

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45842 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the dec-1 branch 2 times, most recently from 19b7af8 to d16991e Compare June 26, 2026 01:17
…luster ABI

The cross-priority host map rebuilds itself with a full O(N) make_shared<HostMap>
copy on every membership delta. MainPrioritySetImpl can now back it with an immer
persistent map so a delta is applied in O(delta), selected per cluster via
setUsePersistentCrossPriorityHostMap(). crossPriorityHostMap() returns an abstract
HostLookupTable backed by either the legacy flat map (the default, preserving the
exact prior behavior) or the immer map, and updateDynamicHostList takes a
host-lookup functor so it stays backing-agnostic.

Dynamic-modules clusters opt in through the new
envoy_dynamic_module_callback_cluster_use_persistent_host_map ABI callback (the
DynamicModuleCluster::setUsePersistentHostMap forwarder) and the Rust SDK
EnvoyCluster::set_use_persistent_host_map method. Membership behavior is identical
under either backing.

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant