Content-based routing for event-sourced applications in multi-site deployments
Files
Elliot_Verstraelen_75771700_2024-2025.pdf
Closed access - Adobe PDF
- 1.38 MB
Details
- Supervisors
- Faculty
- Degree label
- Abstract
- Event sourcing captures state changes as immutable events, enabling recovery and auditability. In geographically distributed deployments, however, broadcasting all events to all sites wastes WAN bandwidth and processing, and can raise compliance concerns. Many systems benefit from site specialization, provided the replication layer can forward only the events each site needs. This thesis proposes and evaluates a static, payload-level content-based routing (CBR) layer embedded in the replication path, augmented with a Bloom-filter fast path that cheaply rejects irrelevant events before predicate evaluation. In addition to steady-state filtering, the implementation supports live reconfiguration: shard ownership can be updated at runtime via an atomic configuration swap that rebuilds the allow-list and (if enabled) its Bloom filter. The approach is not latency-aware path selection; routing rules remain content-driven. Built on an open-source Java event store and evaluated in a two-site emulated WAN, the system achieves the following on my local setup. At 50 RPS with a workload fixed at 25% remote demand, static CBR reduces inter-site bytes by ≈ 75%. Simple predicates alone raise tail latency (P95/P99) relative to pass through, whereas adding the Bloom pre-check restores or slightly improves tail latency with negligible CPU overhead. Under load scaling to 250 RPS, the Bloom variant keeps router CPU essentially flat and lowers memory; at 250 RPS RSS is ∼12% below pass-through. During a live shard migration at 200 RPS with a 100ms remove→add gap, success briefly dips to 94.1% and converges within 128ms, with impact confined to the migrating tenant. Contributions: (i) a practical static CBR design with a Bloom fast path for event-sourced replication; (ii) a simple per-event cost model and instrumentation to reason about CPU/latency trade-offs; and (iii) an empirical evaluation that quantifies both steady-state benefits and transient behavior under live shard migration.