Kubernetes在官網的標題是Production-Grade Container Orchestration。那麼Nomad是一個flexible workload orchestrator, 因為Nomad除了可以統一管理部屬容器化的服務外,Nomad也提供非容器化的應用程序部屬,例如: jar, batch, Podman 等等,有支援的application可以參考Task Drivers。Nomad與Kubernetes的比較,官網幫大家整理好了一篇文章,我自己兩個都有維運,相較於Kubernetes, Nomad安裝設定門檻我覺得簡單非常多的,但是Kubernetes周邊支援的工具比較豐富,常常有很多現成的可以馬上用。
Deploy Containers and Legacy Applications: 除了可以部屬容器外,非容器化的部分應用程式也支援。
Simple & Reliable: 簡單高可靠性。
Device Plugins & GPU Support: 支援GPU, FPGAs, and TPUs的workload.
Federation for Multi-Region: 可跨region, 跨雲供應商。
Proven Scalability: 可擴展到10000+ nodes的clusters.
HashiCorp Ecosystem: 與Terraform,Consul,Vault完美整合。
Nomad 是client-server的架構。Nomad Server是控制中心,通常會建置3或5台來確保高可用性,使用Consensus Protocol來確保一致性,Nomad Server之間會選出一個Leader, Follower會跟Leader做replication;Nomad Client會部屬在node上,client與server之間溝通用使用Gossip Protocol來管理;想更進一步瞭解這兩個protocol可以參考官方文件說明。
Size | CPU | Memory | Disk | Typical Cloud Instance Types |
---|---|---|---|---|
Small | 2 core | 8-16 GB RAM | 50GB | AWS: m5.large, m5.xlarge |
Azure: Standard_D2_v3, Standard_D4_v3 | ||||
GCP: n1-standard-8, n1-standard-16 | ||||
Large | 4-8 core | 32-64 GB RAM | 100GB | AWS: m5.2xlarge, m5.4xlarge |
Azure: Standard_D4_v3, Standard_D8_v3 | ||||
GCP: n1-standard-16, n1-standard-32 |
如同Kubernetes 的 worker node, 想要放更多的container, 資源越大越好。
Use | Default Ports |
---|---|
HTTP API: This is used by clients and servers to serve the HTTP API. TCP only. | 4646 |
RPC: This is used for internal RPC communication between client agents and servers, and for inter-server traffic. TCP only. | 4647 |
Serf WAN: This is used by servers to gossip both over the LAN and WAN to other servers. It isn't required that Nomad clients can reach this address. TCP and UDP. | 4648 |