Cell-Based Architecture and Federated Microservices

Cell-Based Architecture and Federated Microservices

Hand in glove?

·

2 min read

Fundamentally, cell-based architecture (think biology not telephony) is a strategy for combining components together in order to reduce the number of deployment units in the system — something that is critical for the management of microservices. Apart from the fact that it is a tech-neutral, conceptual-level blueprint, not an implementation or tool, the main difference between it and federation is that federation attempts to reduce, not the number of deployment units, but the overall deployment footprint, by providing the same non-functional qualities (like deployment independence) only using far less compute (and human) resources. That said, both approaches are based on the same general principle: consolidation of assets. In the case of federation, it’s about decreasing distribution and increasing workload density. In CBA, it’s about decreasing operational complexity by organizing components into fewer, more manageable, deployment units.

Like federation, CBA also prescribes structural rigor to set clear and useful boundaries and relations between components in order to promote cohesion, prevent coupling and pave the way for organic evolution. In addition to component relations, it also outlines the connection between humans and technology, assigning ownership at the cell level.

Cohesion and dependence are the operative factors in the creation of a cell. As a general rule, if a change to one component means a concomitant change to another, either they need to be decoupled or consolidated into a single deployment unit. In addition to functional requirements, like the bounded context, this non-functional constraint drives component consolidation and simplifies deployment.

By comparison, federation does not require components to relinquish their deployment independence (whether it’s needed or not) or to be administered by any particular team (although it might be a great idea); but like CBA, it does require an assessment of component cohesion. This is where CBA and federation closely align. Which components go together in a cell and which run together in a federated application instance, is effectively the same question, apart from the constraint just mentioned. Figuring this out is half the battle.

In a subsequent article, we’ll look at some other details and synergies between federation and CBA, like component communication, which has interesting parallels. Overall, both approaches, one very general and infrastructure-based, the other more technologically opinionated and software-based, have the same goals and similar attributes. A federated application has many of the same qualities of a cell.

An image from martinfowler.com updated to include federated applicationsAn image from martinfowler.com updated to include federated applications