🚀 Toonoo-LMS — Interactive Architecture

คลิกที่ component ใดก็ได้เพื่อดูรายละเอียด · ใช้ slider จำลอง traffic

🏗️ Architecture
🔥 Load Simulator
🚀 Upgrade Path

⚙️ CI/CD Flow

Triggergit push master
BuildGitHub Actions
RegistryAmazon ECR
DeploySSH → docker compose
Duration~3–5 นาที

🔷 EC2 Container Stack

Instancet2.micro (1vCPU/1GB)
Nginx1.25-alpine :80
PHP-FPM8.2 · 20 workers
RDSMySQL 8.0
StorageS3 + CloudFront

☁️ File Routing

uploads/* → S3storage_url()
uploads/system/base_url() local
assets/Nginx assets_vol
CDNd25dnr4...cloudfront
Regionap-southeast-7
🎮 จำลอง Traffic — ลาก Slider เพื่อดูผลกระทบแบบ Real-time
👥 Concurrent Users
10
✅ ระบบรองรับได้ปกติ — ทุก component ทำงานได้
RAM Usage
300MB
✓ ปกติ (1GB total)
PHP Workers
3/20
✓ มี capacity เหลือ
DB Connections
5/60
✓ ปกติ
Avg Response
120ms
✓ เร็ว
Flow Pipeline — ขนาดแท่งแสดงแรงกดดัน
🔍 Bottleneck Status

❌ ตอนนี้ (t2.micro)

vCPU
1 core
RAM
1 GB
PHP workers
~8–10 จริง
Concurrent users
~20–30
CPU burst
credit จำกัด
💸 ~$10/เดือน

✅ หลัง Upgrade (t3.medium)

vCPU
2 core
RAM
4 GB
PHP workers
20 ครบ
Concurrent users
~100–200
CPU burst
unlimited
💸 ~$40/เดือน (+$30)
🗺️ Roadmap รองรับผู้ใช้มากขึ้น
20–30
ตอนนี้
t2.micro · MySQL session
1 EC2 · no Redis
⚠️ RAM ไม่พอ
100–200
Upgrade EC2 + Redis
t3.medium · ElastiCache Redis
Session + Cache
🚀 ทำได้เร็ว
300–500
Redis Cache + RDS Upgrade
cache get_settings()
RDS db.t3.medium
db connections เพิ่ม
500+
Auto Scaling + ALB
2–4 EC2 instances
ALB load balance
RDS Multi-AZ
⚡ Action Items — เรียงตาม Priority