从业界的讨论来看,微服务自己并无一个严格的定义。不过,ThoughtWorks的首席科学家(Martin Flowler)的描述更加通俗易懂:html
微服务架构是一种架构模式,它提倡将单一应用程序划分红一组小的服务,服务之间互相协调、互相配合,为用户提供最终价值。每一个服务运行在其独立的进程中,服务与服务间采用轻量级的通讯机制互相沟通(一般是基于HTTP的RESTful API)。每一个服务都围绕着具体业务进行构建,而且可以被独立地部署到生产环境、类生产环境等。另外,应尽可能避免统一的、集中式的服务管理机制,对具体的一个服务而言,应根据业务上下
文,选择合适的语言、工具对其进行构建。web
原文以下:架构
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. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.app
– James Lewis and Martin Fowlerwebapp
微服务的本质特征一般包括以下几个部分:分布式
微服务是一种全新的互联网架构,它的基本理念是将一个肥大的系统拆分红若干小的服务组件,组件之间的通信采用轻量的协议完成,譬如REST API。微服务本质上是SOA (Serviceoriented Architecture) 的扩展延伸。相对来讲,微服务的可操做性更强,能够逐步安排合理资源,对一个大的系统进行分解,或是至少中止让它继续臃肿下去。ide
微服务具备以下优势:svg
通俗地讲,“单体应用(monolith application)”就是将应用程序的全部功能都打包成一个独立的单元,能够是JAR、WAR、EAR或其它归档格式。单体应用有以下优势:模块化
可是,无论如何模块化,单体应用最终都会由于团队壮大、接入应用愈来愈多等出现问题。主要体如今以下方面:微服务
1.Microservices by Martin Fowler
2.Microservices Resource Guide
3.Microservices: Decomposing Applications for Deployability and Scalability