什么是 namespaces
引用一段来自 wiki 的定义:
“Namespaces are a feature of the Linux kernel that partitions kernel resources such that one set of processes sees one set of resources while another set of processes sees a different set of resources.”
简而言之,namespaces
的主要特性就是用来隔离进程资源。当你在一个服务器上跑了许多服务的时候,隔离不同的服务能将发生事故的影响范围控制到最小,并且提高安全性(恶意程序无法探测到其他进程)。隔离服务恰好也契合微服务的架构观念。