跳到正文
arXiv cs.AI· Rajat M. Barot, Arjun S. Borkhatariya·· 1 小时前AI 评分45

在线自适应 Resilience4j 弹性策略何时适得其反:安全探索与度量陷阱研究

When Online Adaptation of Resilience Policies Hurts: Safe Exploration and Measurement Pitfalls in Resilience4j

AI 导读

AdaptR4j 系统在 Spring Boot 3 中通过 contextual bandit 基于 Prometheus 信号动态切换 Resilience4j 的 CircuitBreaker/Retry/Bulkhead 配置,朴素设计在 4 个可赢故障场景中有 3 个输给默认策略。

正文 · 原文

View PDF HTML (experimental)

Abstract:Circuit breaker, retry, and bulkhead settings in Java microservices are tuned once and frozen, although the best setting depends on the fault a dependency is currently showing. We study whether an online learner can pick these settings at runtime. AdaptR4j swaps Resilience4j policies atomically in Spring Boot 3 and lets a contextual bandit choose among complete CircuitBreaker/Retry/Bulkhead configurations from Prometheus signals. Our first, naive design scored worse than keeping the default policy in three of four winnable fault scenarios under the reward it optimised: exploring a menu that contained aggressive circuit breakers rejected most traffic while the learner was still learning. Two safeguards fix this: a safe policy menu (no breaker stricter than the latency SLO) and safe exploration with a bounded reward. With them, AdaptR4j beats the production default in every winnable scenario (p < 0.001, three runs each, run-to-run SD <= 0.03), beats the best fixed policy when the fault changes over time, and cuts user-visible failures up to 3.7x compared with the naive design. A context-free bandit on the same safe menu performs statistically indistinguishably, so the safeguards - not the learner - carry most of the benefit. We also report how an earlier version of our harness produced convincing but wrong results: a unit mismatch made every circuit breaker 100x too strict and rejected calls were invisible to the metrics, so 94% of user requests failed while latency and error metrics looked excellent.
Comments: 4 pages, 2 tables, 1 figure. Code and data: this https URL
Subjects: Cryptography and Security (cs.CR); Artificial Intelligence (cs.AI); Distributed, Parallel, and Cluster Computing (cs.DC); Software Engineering (cs.SE)
Cite as: arXiv:2611.32015 [cs.CR]
  (or arXiv:2611.32015v1 [cs.CR] for this version)
  https://doi.org/10.48550/arXiv.2611.32015

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Rajat Miteshkumar Barot [view email]
[v1] Tue, 24 Nov 2026 05:59:47 UTC (28 KB)

来源:arXiv cs.AI · arxiv.org