3 Keys to Efficient Enterprise Microservices Governance

DZone 's Guide to

3 Keys to Efficient Enterprise Microservices Governance

Here are three best practices that define how microservices governance should be implemented for your microservices architectures.

· Microservices Zone ·
Free Resource

An enterprise normally has a few thousand microservices, having autonomy for each team in selecting its own choice of the technology stack. Therefore, it’s inevitable that an enterprise should have a microservices governance mechanism to avoid building an unmanageable and unstable architecture.

Any centralized governance goes against the core principle of microservices architectures i.e. “provide autonomy and agility to the team.” But that also doesn’t mean that we should not have a centralized policy, standards, and best practices that each team should follow. With an enterprise-scale of integrations with multiple systems and complex operations, the question is, “How do we effectively provide decentralized governance?”

We need to have a paradigm shift in our thinking while implementing a microservices governance strategy. The governance strategy should align with core microservices principles – independent and self-contained services, single responsibility, and cross-functional teams aligning with the business as well as policies and best practices. We should look at governance from 3 key principles – domain-based, product-centric, and platform thinking. With those 3 principles, we would be able to provide a governance platform for the enterprise that aligns with microservices' principles as well as enables the enterprise to automate the incorporation of global policies, standards, and guidelines.

The 3 Keys of Microservices Governance

Let us now consider the 3 key principles – domain-based, product-centric, and platform thinking


One of the key principles of microservices architectures is to follow domain-driven design (DDD). Having said that, our governance strategy should consider the domain as a first-class citizen wherein business or domain experts should define the information model following the DDD. The business should also be able to define the business capabilities for each of the domains from the information model.


The business should be able to easily define products from existing information models and business capabilities as well as be able to define business KPIs for products. Governance should also take care of providing a holistic view of existing products, APIs, services, and actual KPIs to the business. This will help the business to align business capabilities with end customers, quickly identify new and innovative products and measure their effectiveness.


With platform-thinking, the enterprise should provide a self-service governance platform for both business as well as IT, wherein both can collaborate and align. The enterprise should be able to define global policies, standards, and guidelines through templates. Teams can build developer templates based on the tools and technologies that they have identified for their domain. The technical artifacts should be auto-generated through templates and deployed to respective run-time environments through a CI/CD pipeline, thereby automating the implementation of policies, standards, and guidelines.

The following diagram depicts the business architecture of a self-service platform with governance embedded in the life cycle.


fig (1) – “ Business Architecture for the self-service platform

As shown in fig (1), the business can define or upload an existing information model, build business capabilities, and quickly define new products and the expected business KPIs. Teams design and create API definitions, define consumer-driven contracts for microservices and business events, and non-functional requirements to realize the products defined by the business. They should be able to define policies, best practices, access rules and the data quality rules, and upload the meta-data information about legacy assets, data sources, and integration points. This helps teams to define an end-to-end lineage at design time starting from consumers to business capabilities to APIs, microservices, legacy assets like SOAP services — even to data sources.

One of my enterprise clients has 4,000 to 5,000 microservices and even has 10 to 20 versions of the same microservices mapped to different consumers. The challenge they are facing is that they must depend on run-time metrics to identify the versions that are being used by the consumers and are making a lot of effort in conducting impact analysis for making changes, drastically impacting agility. A self-service platform like the one above could have helped them in providing an end-to-end lineage.

Another important capability for the platform to have is to empower teams to define developer templates that could be mapped to the governed meta-data values (ex: API definitions, consumer-driven contracts, integration points, policies, access rules, data quality rules, etc.). The template should be versioned through source control management (SCM) and integrated with the CI/CD pipeline to automatically generate technical artifacts as shown below in fig (2) below. The technical artifacts include API proxies, the skeletons for microservices and business events, the mapping between layers, unit test cases and integration test cases with stubs from consumer-driven contracts, API documentation, etc. This helps the enterprise produce consistent output based on governed metadata values and allows teams to focus on business logic and empower IT to continuously deliver business value. We should also identify and “bring our pain forward” and automate the pain away, as explained by Neal Ford’s paper on evolutionary architecture. Examples could be data quality rules, security, and policies that are automatically governed. Testing, security and certifications should be built into the CI/CD process rather than being a pain in the process.

The templates with CI/CD pipelines and the meta-data on lineage across integration points allows us to centralize integration logic in the pipeline that can be controlled and updated independently. This supports federated development and further enhances our “speed to market”.


fig (2) – “ Automatic generation of technical artifacts through templates

Like the management thinker Peter Drucker has said, “We can’t improve and manage what we don’t measure.” Measuring  performance is another critical piece. As shown in fig(2), we should also feed the metrics from run-time environments back to the platform for calculating the actual KPIs and NFRs, helping businesses and teams compare the planned vs. actual and enabling them to make the right decisions for the changes at the earliest.


Some of the challenges faced by enterprises due to the lack of a strong microservices governance strategy are:

  • The business does not have any proper mechanism to monitor and measure the performance of the existing products, hindering the innovation of new products
  • It doesn't have a proper platform where business gets a holistic view and can collaborate with IT for the planning and design
  • Most documentation is outdated, which impacts agility
  • Enterprises are not able to follow federated development principles due to a lack of a platform wherein autonomous teams/systems can interoperate and collaborate, impacting agility

This mandates enterprises to have an efficient mechanism to implement microservices governance and the way ahead is through a self-service governance platform with domain-based and product-centric models. Domain-based and product-centric models are required to align the governance approach with microservices principles and enable the business to quickly innovate new products.

The self-service platform gives a common podium for both business and IT to collaborate and align. It helps individual teams concentrate on delivering business values. The imposition of policies, standards, and guidelines should be handled through a governed template that generates repeatable technical output.

This approach realizes both design time and runtime independence and enables federated development as well as accelerates the constant evolution of the architecture without compromising on governance.

ddd ,domain-driven design ,microservices ,microservices architecture ,microservices governance

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}