Basit Anlatim (Herkes Icin)
Farkli musteri tipleri icin farkli dagitim modelleri gerekiyor:
🎵
Muzibu Modeli
1 Origin + 2 Edge
Streaming icin CDN
📰
Gazete Modeli
1 Self-Hosted Sunucu
Kendi datacenter
🏥
Hastane Modeli
1 Izole Sunucu
KVKK/Compliance
4 Farkli Dagitim Tipi
Shared
Standart musteriler
Ornek: KOBİ siteleri
Origin + Edge
1 Ana + N Dagitim
Ornek: Muzibu
Self-Hosted
Musteri sunucusu
Ornek: Gazeteler
Compliance
KVKK/HIPAA izole
Ornek: Hastaneler
Senaryo 1: Muzibu - Origin + Edge Model
3 SUNUCUOrigin Server
Ana Sunucu (Istanbul)
MySQL Master
Admin Panel
API
CDN Sync / Replication
Edge Server 1
Avrupa (Frankfurt)
Rol
Stream Dagitim
Cache
Redis Replica
DB
Read Replica
Edge Server 2
Asya (Singapur)
Rol
Stream Dagitim
Cache
Redis Replica
DB
Read Replica
Muzik Dagitimi
- • MP3/FLAC dosyalar S3'te
- • CloudFront CDN cache
- • Geo-based routing
- • HLS streaming
Veri Senkronizasyonu
- • MySQL async replication
- • Origin → Edge (read-only)
- • Write sadece Origin'e
- • 100ms max lag
Kullanici Yonlendirme
- • GeoDNS (Route53)
- • Turkiye → Origin
- • Avrupa → Edge 1
- • Asya → Edge 2
Tenant Konfigurasyon
// tenants tablosu [ 'id' => 1001, 'title' => 'Muzibu', 'deployment_type' => 'origin_edge', 'origin_server' => 'origin.muzibu.internal', 'edge_servers' => [ 'eu' => 'edge-eu.muzibu.internal', 'asia' => 'edge-asia.muzibu.internal' ], 'cdn_provider' => 'cloudfront', 'streaming_enabled' => true ]
Senaryo 2: Gazete - Self-Hosted Model
1 SUNUCUTuufi Central
Lisans & Guncelleme
API Sync
Lisans dogrulama
Kod guncellemeleri
Metrik raporlama
Gazete Sunucusu
gazette.com.tr Datacenter
MySQL
500K+ haber
Storage
2TB+ gorsel
Redis
Local cache
Nginx
10M+ hit/gun
Tam Bagimsiz Calisma:
- • Kendi IP ve domain
- • Kendi SSL sertifikasi
- • Kendi backup politikasi
- • Gazete IT ekibi yonetir
1
Kurulum
installer.php calistir
2
Aktivasyon
License key gir
3
Baglanti
Central'a heartbeat
✓
Calisir
Bagimsiz operasyon
Gazete .env Dosyasi
# Self-Hosted Gazete Konfigurasyonu TUUFI_MODE=self_hosted TUUFI_CENTRAL_URL=https://tuufi.com TUUFI_LICENSE_KEY=gazette_xxxxxxxxxxxx TUUFI_TENANT_ID=5001 # Kendi Kaynaklari DB_HOST=localhost DB_DATABASE=gazette_prod REDIS_HOST=localhost FILESYSTEM_DISK=local # Sync Ayarlari TUUFI_HEARTBEAT_INTERVAL=60 TUUFI_UPDATE_CHECK=daily TUUFI_AUTO_UPDATE=false # IT ekibi manuel yapar
Senaryo 3: Hastane - Compliance Model
IZOLEKVKK / HIPAA Uyumluluk
Hasta verileri Turkiye sinirlarinda, izole network, encrypted at rest, audit logging, merkeze SADECE anonim metrik gonder
DMZ
Firewall
Reverse Proxy
SSL Termination
Application
Laravel App
Redis (isolated)
Queue Worker
Veri Katmani
MySQL (encrypted)
Encrypted Storage
Backup (on-site)
Sadece Outbound Trafik (Central'a)
Heartbeat
Her dakika
Lisans Check
Gunluk
Anonim Metrik
Saatlik
Update Pull
Manuel
Hasta verisi ASLA merkeze gitmez - sadece sistem metrikleri (CPU, memory, request count)
Gerekli Veritabani Degisiklikleri
-- tenants tablosuna yeni alanlar ALTER TABLE tenants ADD COLUMN deployment_type ENUM( 'shared', -- Tip 1: Mevcut sistem 'origin_edge', -- Tip 2: Muzibu modeli 'self_hosted', -- Tip 3: Gazete modeli 'compliance' -- Tip 4: Hastane modeli ) DEFAULT 'shared'; ALTER TABLE tenants ADD COLUMN license_key VARCHAR(64) NULL; ALTER TABLE tenants ADD COLUMN edge_config JSON NULL; ALTER TABLE tenants ADD COLUMN last_heartbeat TIMESTAMP NULL; ALTER TABLE tenants ADD COLUMN installed_version VARCHAR(20) NULL; -- Yeni tablo: Satellite sunucu kayitlari CREATE TABLE tenant_satellites ( id BIGINT PRIMARY KEY AUTO_INCREMENT, tenant_id BIGINT NOT NULL, server_type ENUM('origin', 'edge', 'standalone'), hostname VARCHAR(255), ip_address VARCHAR(45), region VARCHAR(50), is_active BOOLEAN DEFAULT TRUE, last_seen TIMESTAMP, metrics JSON, FOREIGN KEY (tenant_id) REFERENCES tenants(id) );
Model Karsilastirma Matrisi
| Ozellik | Shared KOBİ |
Origin+Edge Muzibu |
Self-Hosted Gazete |
Compliance Hastane |
|---|---|---|---|---|
| Sunucu Sayisi | 0 (paylasilmis) | 1 + N edge | 1 | 1 (izole) |
| Sunucu Lokasyonu | Bizim DC | Bizim + Global CDN | Musteri DC | Musteri IT Room |
| Veri Kontrolu | Bizde | Bizde (origin) | Musteride | %100 Musteride |
| Guncelleme | Otomatik | Otomatik | Pull | Manuel |
| Bakim Sorumlusu | Biz | Biz | Musteri IT | Musteri IT |
| KVKK Uyumu | Tam | |||
| Ornek Musteri | ixtif.com | muzibu.com | gazette.com.tr | hastane.gov.tr |
Hizli Baslangic
1. Hafta - Altyapi
-
tenants tablosuna
deployment_typeekle - License verification API olustur
- Heartbeat endpoint ekle
2. Hafta - Installer
- Self-hosted installer script
- Config generator
- Ilk gazete pilotu