Add M10.9a load measurement, governor and overload shedding
Foundation / checks (deploy) (push) Successful in 3m20s
Foundation / checks (ecs) (push) Successful in 1m59s
Foundation / checks (client) (push) Failing after 10m0s
Foundation / checks (network) (push) Successful in 13m9s
Foundation / checks (tsan) (push) Successful in 8m1s
Foundation / checks (checks) (push) Successful in 32m2s
Foundation / checks (postgres) (push) Failing after 26m39s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Foundation / checks (deploy) (push) Successful in 3m20s
Foundation / checks (ecs) (push) Successful in 1m59s
Foundation / checks (client) (push) Failing after 10m0s
Foundation / checks (network) (push) Successful in 13m9s
Foundation / checks (tsan) (push) Successful in 8m1s
Foundation / checks (checks) (push) Successful in 32m2s
Foundation / checks (postgres) (push) Failing after 26m39s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
ADR-0097 (M10.9 load and abuse qualification; only evolution-dev reference-worker runs qualify). evo-server measures each simulated tick's work (host step plus the M10 bridge, with the session layer's share kept separately) and feeds a portable LoadGovernor: grant logins are refused at a 2 s p95 of 15 ms or any tick debt, replication is shed in up to three levels at 20 ms or debt >= 2 (radius cap 7/7/5/3, far updates x1/x2/x2/x4, no fresh baselines, own markers unaffected), and both relax after 5 s of calm. Handoff tickets are still admitted. /metrics gains evo_m10_* gauges when the listener is enabled. Adds the missing ADR index entries for ADR-0094 to ADR-0096. Refreshes the dev session window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,8 @@ struct RegionSessions::Impl {
|
||||
std::vector<Outgoing> outgoing; // Handed off, not yet known committed.
|
||||
Clock::time_point next_ghosts{}, next_overdue{};
|
||||
std::optional<network::SessionInterest> default_interest;
|
||||
bool refuse_logins{}; // Load governor (ADR-0097).
|
||||
std::uint64_t refused_load{}; // Grant logins refused for load.
|
||||
HostFacts facts;
|
||||
std::vector<Connection> connections;
|
||||
std::vector<RegionSessionEvent> events;
|
||||
@@ -216,6 +218,10 @@ struct RegionSessions::Impl {
|
||||
return close(c, SessionCloseReason::rate_limited, now);
|
||||
if (network::looks_like_handoff_ticket(m.grant))
|
||||
return ticket_hello(c, m, now_seconds, now);
|
||||
if (refuse_logins) { // Overload (ADR-0097): before signature work.
|
||||
++refused_load;
|
||||
return close(c, SessionCloseReason::capacity, now);
|
||||
}
|
||||
const auto grant = verifier.verify(m.grant);
|
||||
if (!grant)
|
||||
return close(c, reason_for(grant.error()), now);
|
||||
@@ -774,6 +780,15 @@ std::optional<std::uint64_t> RegionSessions::holder(const network::AccountId& ac
|
||||
return impl_->control.holder(account);
|
||||
}
|
||||
|
||||
void RegionSessions::set_load(bool refuse_logins, std::uint8_t shed) {
|
||||
impl_->refuse_logins = refuse_logins;
|
||||
impl_->replication.set_shed(shed);
|
||||
}
|
||||
|
||||
std::uint64_t RegionSessions::refused_for_load() const noexcept {
|
||||
return impl_->refused_load;
|
||||
}
|
||||
|
||||
std::size_t RegionSessions::sessions() const noexcept {
|
||||
return impl_->control.sessions();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user