MATIH Platform is in active MVP development. Documentation reflects current implementation status.
7. Tenant Lifecycle
Resource Management
Overview

Resource Management

The resource management subsystem provides quota enforcement, usage tracking, alerting, and cost analytics for tenants. It enables the platform to enforce per-tier resource limits and provide tenants with visibility into their consumption.


Components

ComponentControllerBase Path
Resource QuotasResourceQuotaController/api/v1/tenants/{tenantId}/quotas
Resource AlertsResourceAlertController/api/v1/tenants/{tenantId}/alerts
Cost AttributionCostAttributionController/api/v1/cost-attribution
Cost DashboardCostDashboardController/api/v1/cost-dashboard

Quota System

Resource quotas enforce per-tier limits on compute, storage, API calls, and other resources. Each quota has:

  • Soft limit: Triggers a warning alert when reached
  • Hard limit: Blocks resource consumption when exceeded (returns 403 Forbidden)
  • Usage tracking: Records consumption over time for trend analysis

Alert System

The alerting subsystem monitors resource consumption and triggers alerts based on configurable rules:

  • Alert Rules: Define thresholds, conditions, and notification channels
  • Alert Lifecycle: Active, Acknowledged, Resolved, Suppressed
  • Resolution Types: Manual, Automatic, Timeout

Cost Management

Cost attribution and dashboards provide visibility into infrastructure spending:

  • Cost Attribution: Allocates shared cluster costs to individual tenants based on resource usage
  • Cost Dashboard: Platform-wide and per-tenant cost visualization with trend analysis and anomaly detection

Source Files

FilePath
Quota Controllercontrol-plane/tenant-service/src/main/java/com/matih/tenant/controller/ResourceQuotaController.java
Alert Controllercontrol-plane/tenant-service/src/main/java/com/matih/tenant/controller/ResourceAlertController.java
Cost Attribution Controllercontrol-plane/tenant-service/src/main/java/com/matih/tenant/controller/CostAttributionController.java
Cost Dashboard Controllercontrol-plane/tenant-service/src/main/java/com/matih/tenant/controller/CostDashboardController.java