So, your organization has committed to a microservices architecture to create applications for a large scale? You'll find plenty of benefits to a microservices design, provided the design is properly executed.
Here are four of the big ones:
- Onboard personnel faster
- Promote independent revision
- Support polyglot development
- Create a flexible release schedule
A well-designed microservices-oriented architecture should be well encapsulated, support a distinct context boundary and carry its own data. Thus, companies can assign a dedicated team to design, develop, test, deploy and support the architecture's different elements.
However, many companies consider a given microservice component to be a standalone product and limit the scope of their activity to just that lone microservice. That's like the difference between knowing how to make coffee and knowing how to make a complete breakfast. Making coffee is the microservice while making breakfast is the microservices-oriented architecture.
As a result, new developers won't need to know a lot to start working on the application. If they focus on one microservice component at a time they can slowly work their way up to more elements of the overall architecture. Hence, getting new programmers up to speed takes less time than before, rather than if they learn the complete architecture to start.
A microservice is an independent unit that carries its own data and acts independently of other microservices. When designed properly, because a microservice is well encapsulated, it can be revised independently from other services.
This benefit of a microservices architecture works in exactly the opposite way of a monolithic application. Older monolithic applications depend on the revision cycles of all the constituent services. Thus, a monolithic application can never be released faster than the component that is slowest to revise.
On the other hand, microservices are independent and thus can revise on their own schedule if their public interface remains intact.
Polyglot development support
Polyglot development is another benefit of a microservices architecture that offers programmers a choice. A developer can use the best tool or process that's best suited for one microservice component, independent of how other microservices are used.
For example, because microservices are well-encapsulated, independent of one another and use standard data formats for inter-service communication, a developer can build a microservice in a variety of programming languages. This means that it's entirely possible for a developer to program one service in C++ while programming another one in Golang.
The same is also true for data storage. For example, one microservice component can store data in MongoDB, while another component stores data in Redis. The type of database used by the microservice depends on its purpose. If the job is analytics, then a database such as Cassandra can fit the bill. However, if a microservice handles financial work, a relational database such as MySQL is a good choice.
Release schedule flexibility
Another benefit of a microservices architecture also hinges on the independent operation of the microservice components. This layout offers a good deal of flexibility around the release schedule for a given microservice. If the public interface for a microservice goes unchanged or additions to an interface don't affect existing entry points, the microservice in question can be revised and released at its own pace.
Some microservices might be able to enjoy short release cycles. More complex microservices might take longer to revise. By its nature, a microservices-oriented architecture supports a flexible release schedule among constituent microservices, again, if the new releases don't break existing interfaces.
Dig Deeper on JSRs and APIs
Related Q&A from Bob Reselman
The Kubernetes command-line tool, kubectl lets you control your Kubernetes clusters. But two of its operations -- apply and create -- can often be ... Continue Reading
Both Docker and Vagrant are important parts of a cloud-native stack, but they have very different roles when it comes to supporting containers and ... Continue Reading
Some DevOps professionals shun industry certifications. But in the cloud-native world, Docker and Kubernetes certifications make prospective job ... Continue Reading