Skip to main content

WF-119: Resource Quota Management

Workflow ID: WF-119 Category: Resource Management Priority: P2 Last Updated: January 11, 2026


Overview

This workflow manages resource quotas for workstations, storage, and API rate limits, including approaching limit alerts, hard limit enforcement, and upgrade path presentation.


Trigger Events

  • Resource usage crosses threshold (50%, 80%, 95%)
  • Hard limit reached
  • User requests quota increase
  • Automated quota review (monthly)

Sequence Diagram


Quota Types

1. Workstation Resources

ResourceProEnterpriseUnits
CPU cores416vCPUs
RAM832GB
Disk storage50200GB
Concurrent sessions210sessions

2. Storage Quotas

ResourceProEnterpriseUnits
Project storage100500GB
Context database1050GB
Backup retention730days
Artifact storage25100GB

3. API Rate Limits

ResourceProEnterpriseUnits
API requests1,00010,000/hour
Webhook calls1001,000/hour
Export requests10100/day
Bulk operations550/hour

Alert Thresholds

ThresholdActionNotification
50%Log onlyDashboard indicator
80%WarningEmail + Dashboard
95%UrgentEmail + In-app alert
100%EnforceBlock + Upgrade prompt

Process Steps

1. Usage Monitoring

Collection Frequency:

ResourceFrequencyMethod
StorageEvery 5 minDisk usage scan
API callsReal-timeRequest counter
SessionsReal-timeConnection count
CPU/RAMEvery 1 minSystem metrics

Aggregation:

  • Hourly summaries
  • Daily reports
  • Monthly trends

2. Alert Generation

80% Warning Alert:

{
"alert_id": "alert_123",
"user_id": "usr_456",
"resource": "storage",
"current_usage_gb": 82.5,
"quota_gb": 100,
"percentage": 82.5,
"threshold": "warning",
"created_at": "2026-01-11T12:00:00Z"
}

Email Content:

Subject: Storage quota warning - 82% used

Hi [Name],

Your storage is approaching its limit:

Used: 82.5 GB / 100 GB (82%)

At 100%, you won't be able to create new files.

Options:
- Delete unused files
- Upgrade your plan for more storage

Manage storage: [DASHBOARD_URL]
View plans: [PRICING_URL]

3. Hard Limit Enforcement

API Response at Limit:

{
"error": "quota_exceeded",
"code": "STORAGE_QUOTA_EXCEEDED",
"message": "Storage quota exceeded. Delete files or upgrade plan.",
"current_usage_gb": 100.2,
"quota_gb": 100,
"upgrade_url": "/dashboard/billing/upgrade"
}

Blocked Operations:

  • File creation/upload
  • Project cloning
  • Backup creation

Still Allowed:

  • File reading
  • File deletion
  • Dashboard access

4. Upgrade Path

Upgrade Options Displayed:

CurrentUpgrade ToAdditionalPrice
ProEnterprise+100 GB storage+$100/mo
ProStorage Add-on+50 GB+$25/mo
EnterpriseCustomUnlimitedContact sales

One-Click Upgrade Flow:

  1. User clicks "Upgrade" in quota alert
  2. Pre-filled with recommended option
  3. Stripe checkout (if payment change)
  4. Instant quota increase
  5. Confirmation email

5. Quota Increase Request

For Enterprise/Custom:

POST /api/v1/quotas/request-increase
{
"resource": "storage",
"current_quota_gb": 500,
"requested_quota_gb": 1000,
"justification": "New project with large assets",
"timeline": "immediate"
}

Review Process:

  1. Auto-approve if within plan limits
  2. Sales review if custom quota needed
  3. Finance approval for large increases

API Endpoints

EndpointMethodPurpose
/api/v1/quotasGETGet all quota usage
/api/v1/quotas/{resource}GETGet specific quota
/api/v1/quotas/historyGETUsage history
/api/v1/quotas/request-increasePOSTRequest increase
/api/v1/quotas/alertsGETList active alerts

Request: Get Quotas

GET /api/v1/quotas

Response

{
"user_id": "usr_456",
"plan": "pro",
"quotas": {
"storage": {
"used_gb": 82.5,
"quota_gb": 100,
"percentage": 82.5,
"status": "warning"
},
"api_requests": {
"used": 450,
"quota": 1000,
"percentage": 45,
"status": "ok",
"resets_at": "2026-01-11T13:00:00Z"
},
"sessions": {
"active": 1,
"quota": 2,
"percentage": 50,
"status": "ok"
}
},
"alerts": [
{
"resource": "storage",
"threshold": "warning",
"created_at": "2026-01-11T12:00:00Z"
}
],
"upgrade_available": true
}

Dashboard Display

Quota Widget:

+----------------------------------+
| Resource Usage |
+----------------------------------+
| Storage [========--] 82% |
| API Calls [====------] 45% |
| Sessions [=====-----] 50% |
+----------------------------------+
| ! Storage approaching limit |
| [Upgrade Plan] |
+----------------------------------+

Error Messages

ErrorHTTPUser Message
STORAGE_EXCEEDED507"Storage full. Delete files or upgrade."
RATE_LIMITED429"Too many requests. Wait or upgrade."
SESSION_LIMIT403"Max sessions reached. Close one or upgrade."
EXPORT_LIMIT429"Daily export limit reached. Try tomorrow."

Audit Events

EventLogged
quota.threshold_crossedResource, Percentage, Threshold
quota.alert_sentUser, Resource, Channel
quota.limit_enforcedUser, Resource, Operation blocked
quota.increase_requestedUser, Resource, Amount
quota.increase_approvedUser, Resource, New quota
quota.upgrade_completedUser, Old plan, New plan


Last Updated: January 11, 2026