Performance & SLA Guidelines
This page defines what “good performance” means for this system and how it is enforced.
These are design targets, not just technical limits.
1. Key Principle
User-facing performance matters more than technical limits.
A request that “eventually succeeds” but keeps a user waiting is still a failure.
2. Web Request SLA (User-Facing)
Target Response Times
| Request Type | Ideal | Acceptable Max | Notes |
|---|---|---|---|
| Public pages | 200ms – 2s | ≤ 10s | Cache wherever possible |
| APIs | < 1s | ≤ 5s | Strict timeouts required |
| Forms / Auth | < 2s | ≤ 10–15s | DB + validation only |
| Admin actions | < 5s | ≤ 30s | Rare, controlled usage |
❌ Anything approaching 120s is a failure and must be redesigned.
3. Server Safety Caps (Not SLA Targets)
These exist only to protect the system from runaway code:
| Setting | Cap |
|---|---|
| PHP-FPM request timeout | 120s |
| PHP max execution time | 120s |
| PHP memory per request | 256MB |
Hitting these caps means the design is incorrect.
4. Queue & Background Job SLA
Heavy work must run outside HTTP requests.
| Job Type | Typical Runtime | Notes |
|---|---|---|
| Reports / Exports | 30–120s | Split if >120s |
| Bulk processing | 60–300s | Chunk data |
| Image / video processing | 60–300s | Never inline |
Queue workers run with:
bash
php artisan queue:work --timeout=120 --memory=256
Campus On Click