1.6 Microservices
Microservices是由軟體大師Martin Flower所提出的一種系統架構風格(architectural style), 他是這樣說的:
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery.
就是說以組合式的服務來開發整套的應用系統, 而每個微服務都各自為一個單獨的程式, 並透過輕量級的HTTP API作為彼此間溝通的機制, 然後這些微服務可以各自藉由自動化的佈署機制獨立的進行佈署.
我想, 微服務想要體現的就是單一職責(single responsibility)與關注點分離(separation of concern), 且是獨立的開發、測試、部署與升級單元. 微服務可以獨立的演變, 且cost of change比較小, 整體架構相較monolithic也更為靈活.
Last updated