Bolstered by the near-meteoric rise of container technology, especially Docker, the term “microservices” is now being used to describe the type of software architecture anointed as the shiny new technology that will deliver software engineering to the Promised Land. The reality is that the principles of microservices go back to the ancient history of software engineering, rooted in the concepts of modularity and separation of concerns. Indeed, software engineers have been studying and debating (and on occasion clarifying and improving) these ideas for most of the past 50 years. So what is all the microservices fuss about?
The characteristics of microservices
Computing systems today are network-based with multiple interacting concurrent processes. Identifying a disciplined approach to building such systems is the problem microservices architecture aims to solve. Microservices architecture exhibits a number of important traits:
- Bigger than a bread box. Unfortunately, there is also no simple set of principles or calculations for normalizing services, like there is for relational database design. In general, it is customary to use the business function as a guide for delimiting the boundaries of a service. A good microservices design calls for services to be as large as they have to be, but no larger. While architects have significant leeway in scoping services, the bias toward smaller services is implied by the name of the architecture.
- Independent in design, and also in evolution. In a microservices-oriented architecture, the team working on a service should be free to version the service and evolve it independently, and may potentially choose to build it with a different programming language or tool chain if that is more likely to meet the design criteria. The minimization of design synchronization is an essential value in a microservices architecture.
- It’s in the API. To support such a high level of independence, successfully using microservices architecture requires a strong API design and evolution capability to manage service interfaces. APIs are the composition language of microservices; API design and management skills are an essential core competency in a microservices initiative.
- Run a well-oiled machine. Reliance on tools and automation is a key enabler for modern microservices architecture. The tech companies that spearheaded microservices architecture have developed a strong development and deployment infrastructure in which a microservices approach can thrive. Fluency in open source and comfort with an open-source model of use and contribution is a core competency that digitally transforming organizations tend to grow rapidly.
- Deliver fast and often. Microservices architecture works best with agile approaches that are built on top of Continuous Integration processes. In fact, it could be argued that without agile and CI/CD, we would have never quite arrived at microservices architecture as we know it. Practices such as small teams, customers as project stakeholders, daily build, and the use of distributed release-management systems are key to delivering on the promise of microservices.
- Support what you build. Microservices requires a DevOps culture. DevOps is effectively about the unification of the service-management team so that a clear point of accountability for service delivery is achieved. In microservices teams, developers support the delivered service end to end, occasionally with deployment and support engineers as separate roles, but fully integrated in the service teams.
An architecture, not a specific technology
It is tempting to add any number of technologies and highlight how essential they are to microservices, but in most cases that is unnecessary and even inappropriate. It is important to recognize, however, that many technologies are enabling modern systems to be built more easily and naturally with microservices architecture. PaaS technology, for example—whether in a public cloud form such as Salesforce’s Heroku or in a private cloud form such as Cloud Foundry—enables the productivity needed to deploy complex microservices architecture. Likewise, IaaS clouds simplify the setup for reliability and availability to a great degree.
(Related: A deeper look at microservices)
Containers do indeed enable services to be structured in a more lightweight fashion, and Docker in particular encourages separation of concerns to a great degree because of its process model. Many other technologies, such as API management, application performance management and analytics, and a whole host of software configuration-management and DevOps tools, play an important supporting role in microservices. But it is important not to lose sight of the big picture that microservices is an architectural approach, not a specific technology.