You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: server-side restriction system driven by LicenseHub heartbeat response
The Hub can now return a ServerRestrictions object on each heartbeat response.
Restrictions are non-blocking but create operational friction to enforce ToS/license compliance.
Implemented restrictions:
- OperationDelayMs: artificial delay injected before every gRPC and REST call.
Applied by RestrictionInterceptor (gRPC) and RestrictionMiddleware (REST).
Even 30-50ms is severe at production throughput.
- DisableQueryCache: bypasses the query result cache completely, forcing every
read to hit the storage engine (higher latency + CPU usage).
Applied in QueryCacheService.Enabled.
- WarnBannerMessage: displays a persistent warning banner in the Blazor Studio
UI so the server administrator sees a compliance/license message.
- QueryResultLimit: defined in RestrictionSnapshot for future wiring into
the query execution path (QueryDescriptorExecutor).
Hub side: HeartbeatEndpoints always returns Restrictions with all defaults
(zero delay, no cache bypass, no banner) — no restrictive logic applied yet.
Future: analyze instance telemetry and selectively apply restrictions.
Components:
- RestrictionService: singleton holding the current RestrictionSnapshot
- RestrictionInterceptor: gRPC server interceptor (runs before TelemetryInterceptor)
- RestrictionMiddleware: ASP.NET middleware for REST/Studio delay
- HeartbeatWorker: parses Restrictions from heartbeat response and calls
RestrictionService.Update(); logs a warning when any restriction is active
0 commit comments