← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Cloud-Native Patterns

Cloud PHP 5.0+ Intermediate
debt(d7/e7/b7/t5)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints note automated=no, and while tools like docker, kubernetes, and twelve-factor linters can flag specific symptoms (local filesystem writes, config in files not env vars, missing health check endpoints), there is no single tool that comprehensively catches all cloud-native violations. Many issues — like missing SIGTERM handlers or slow startup — only surface under load or during scaling events, making them invisible until runtime.

e7 Effort Remediation debt — work required to fix once spotted

Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix lists multiple simultaneous changes: externalising session/state storage to Redis/DB, switching logging to stdout, migrating all config to env vars, and adding graceful shutdown handling. Each of these touches different layers of the application — session management, logging infrastructure, configuration loading, and process lifecycle — and the common_mistakes confirm these are typically entrenched patterns spread across the codebase rather than isolated issues.

b7 Burden Structural debt — long-term weight of choosing wrong

Closest to 'strong gravitational pull' (e7). The applies_to contexts include both web and cli, giving this choice wide reach. A non-cloud-native PHP app storing state locally or baking config into images shapes almost every future deployment, scaling, and CI/CD decision. As why_it_matters notes, horizontal scaling is blocked until these principles are adopted, meaning every infrastructure and feature decision is constrained by this foundational choice.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The misconception field identifies a documented, commonly held wrong belief: that cloud-native means Kubernetes. Many developers conflate the orchestration platform with the design principles, leading them to either over-engineer (adopting Kubernetes prematurely) or dismiss cloud-native as irrelevant to their ECS/serverless setup. This is a well-documented gotcha rather than a catastrophic behavioural inversion, so t5 is appropriate.

About DEBT scoring →

Also Known As

cloud native 12-factor stateless services

TL;DR

Stateless services, externalised config, health checks, graceful shutdown, and immutable infrastructure — the 12-Factor App extended for containers.

Explanation

Stateless processes (sessions in Redis, files in S3), externalised config (env vars, never baked in images), immutable infrastructure (replace not patch), disposability (fast startup <10s, graceful SIGTERM), health checks (readiness+liveness), structured logging to stdout, horizontal scaling.

Common Misconception

Cloud-native requires Kubernetes — it is a set of design principles; a PHP app on ECS Fargate can be fully cloud-native.

Why It Matters

A PHP application storing sessions on local disk cannot be horizontally scaled — cloud-native stateless design enables auto-scaling.

Common Mistakes

  • Local file storage
  • Config baked into images
  • No graceful SIGTERM handling
  • Slow startup delaying auto-scaling

Code Examples

✗ Vulnerable
$_SESSION['cart'] = $data; file_put_contents('/tmp/cache',$data);
✓ Fixed
ini_set('session.save_handler','redis'); ini_set('session.save_path',getenv('REDIS_URL'));
$s3->putObject(['Bucket'=>getenv('S3_BUCKET'),'Key'=>$path,'Body'=>$data]);

Added 16 Mar 2026
Edited 22 Mar 2026
Views 59
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings W 2 pings T 0 pings F 0 pings S 1 ping S 1 ping M 0 pings T 1 ping W 1 ping T 5 pings F 1 ping S 0 pings S 3 pings M 1 ping T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 1 ping S 1 ping M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Scrapy 11 Amazonbot 9 Perplexity 6 Google 4 Ahrefs 4 SEMrush 3 Unknown AI 2 Claude 2 Bing 2 PetalBot 2 ChatGPT 1 Meta AI 1
crawler 44 crawler_json 3
DEV INTEL Tools & Severity
🟡 Medium ⚙ Fix effort: High
⚡ Quick Fix
PHP apps become cloud-native by: storing state externally (Redis/DB), logging to stdout, reading config from env vars, and handling SIGTERM for graceful shutdown
📦 Applies To
PHP 5.0+ web cli
🔗 Prerequisites
🔍 Detection Hints
PHP writing to local filesystem; config in files not env vars; no SIGTERM handler; health check endpoint missing
Auto-detectable: ✗ No docker kubernetes twelve-factor
⚠ Related Problems
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File


✓ schema.org compliant