メインコンテンツまでスキップ

Mô hình Hybrid On-Premise (Linux + Windows)

Môi trường doanh nghiệp thực tế hiếm khi thuần Linux hoặc thuần Windows. Hybrid on-premise là mô hình kết hợp cả hai, nơi Linux đảm nhiệm workload cloud-native và Windows giữ lại legacy apps, identity, và database enterprise.


Tại sao tồn tại môi trường Hybrid?


Kiến trúc toàn cảnh — Hybrid On-Premise


Tích hợp Linux ↔ Windows

Authentication — Linux join AD

Linux server có thể join Active Directory domain để xác thực user bằng SSSD + Kerberos:

Cấu hình SSSD đơn giản:

# /etc/sssd/sssd.conf
[sssd]
domains = corp.local

[domain/corp.local]
id_provider = ad
auth_provider = ad
access_provider = ad
ad_domain = corp.local
krb5_realm = CORP.LOCAL
realmd_tags = manages-system joined-with-adcli

Shared Storage — Samba / NFS

Monitoring thống nhất


Ma trận tích hợp Linux ↔ Windows

Nhu cầuGiải phápGhi chú
Linux user auth bằng ADSSSD + realmd + Kerberosrealm join corp.local
Linux mount Windows sharemount -t cifs //server/sharePackage cifs-utils
Windows mount Linux NFSNFS Client (Windows Feature)Cần bật NFS client role
Samba shared storageSamba server trên LinuxSMB2/3 — Windows & Linux đọc được
Cross-platform automationAnsibleModule win_* cho Windows, apt/yum cho Linux
Centralised logWinlogbeat → ElasticsearchGom Windows Event Log vào ELK
Secret managementHashiCorp VaultAgent injection cho Linux, AppRole cho Windows
DNS nội bộWindows DNS (AD integrated)Linux dùng /etc/resolv.conf → AD DNS
Time syncWindows NTP → Linux chronyKerberos yêu cầu ≤ 5 phút lệch nhau
MonitoringPrometheus (Linux) + Zabbix (Windows) → GrafanaUnified dashboard

Ưu điểm & Nhược điểm

Ưu điểm:

  • Tận dụng đầu tư cũ: Không cần rewrite toàn bộ app — Linux & Windows cùng tồn tại
  • Best of both worlds: Linux cho cloud-native, Windows cho enterprise ecosystem
  • Gradual migration: Chuyển dần từng service sang Linux theo thời gian
  • Active Directory tập trung: SSO cho cả Linux và Windows user

Nhược điểm:

  • Phức tạp vận hành: Đội cần biết cả hai hệ điều hành — tuyển dụng khó hơn
  • Monitoring phức tạp: Cần nhiều agent, nhiều tool — dễ "mù" một bên
  • Troubleshoot networking khó: SMB, NFS, Kerberos đồng thời trên cùng mạng
  • License cost: Windows Server + SQL Server + CAL — tốn kém phần Windows tier
Chiến lược migration thực tế

Không nên migrate toàn bộ cùng lúc. Thứ tự ưu tiên phổ biến:

  1. Bắt đầu với new services → Viết mới 100% trên Linux + container
  2. Migrate stateless .NET apps → .NET 8 chạy trên Linux, không cần Windows
  3. Giữ SQL Server → Migrate cuối cùng sang PostgreSQL (nếu cần), hoặc dùng SQL Server on Linux
  4. Giữ Active Directory → Đây là component khó thay thế nhất — LDAP/AD sẽ tồn tại lâu nhất