Cell-Based Architecture — Architecture Pattern
Cell Based Architecture

Cell-Based Architecture — Architecture Pattern

Cell-based architecture in computing involves designing systems that consist of?interconnected cells, each cell capable of executing tasks independently. Like the cells in a biological organism, these computing cells have their own processing units, memory, and communication capabilities. They operate in parallel, exchanging information and collaborating to solve complex problems efficiently.

Critical Elements of Cell-Based Architecture

  1. Cell: A cell is the fundamental building block of this architecture. Each cell can enclose a logically connected set of services/microservices along with their dependencies like database, message-bus etc and forms a cohesive, individually deployable entity. Each cell operates autonomously, executing tasks assigned to it and interacting with other cells as needed. Each service within a cell can interact with any other service or component within a cell.
  2. Interfaces: Cells communicate with each other through well-defined interfaces. Both Egress and Ingress interface for a cell need to be well defined. This ensures that cells can be developed and maintained independently of each other.
  3. Inter-Cell Components: While cells are isolated components which can encompass multiple connected microservices, we need inter-cell components like Routers/Load Balancers/Message Bus to handle actions that span multiple cells.

No alt text provided for this image
Cell-Based Architecture

Advantages of Cell-Based Architecture

  1. Scalability: Cell-based architecture is highly scalable. As the demand for a system increases, new cells can be added to the system without affecting the existing cells. This makes it possible to easily scale a system to meet changing demands.
  2. Performance: Cell-based architecture can improve the performance of an application by distributing the load of processing requests across multiple cells. This can be especially helpful for applications that experience a high volume of traffic.
  3. Resilience: Cell-based architecture is also highly resilient to failures. If a cell fails, the other cells can continue to operate without interruption. This makes it possible to minimize the impact of failures on a system.
  4. Security: Cell-based architecture can be used to improve the security of a system. By isolating each cell from the others, it is possible to prevent unauthorized access to sensitive data.

Disadvantages of Cell-Based Architecture

  1. Complexity: Cell-based architecture can be complex to implement and manage. This is because each cell must be designed and configured independently. The involvement of inter-cell components for routing etc makes the system more complex to debug.
  2. Overhead: Cell-based architecture can add some overhead to a system. This is because each cell requires its own resources, such as memory and processing power. Also, you need things like health check monitoring to be present at an intra-cell as well as an inter-cell level.

How to:

Achieve Isolation(Make Cells Isolated):

There are a number of ways to achieve isolation between cells in a cell-based architecture. Some common approaches include:

  • Physical isolation:?This approach involves physically separating the cells from each other. This can be done by using different servers, different networks, or different data centres.
  • Virtual isolation:?This approach involves using virtualization technology to create isolated virtual machines for each cell. This allows the cells to run on the same physical hardware, but they will be isolated from each other.
  • Process isolation:?This approach involves using operating system features to isolate the cells from each other. This can be done by using different processes, different user accounts, or different permissions.
  • Network isolation:?This approach involves using network security features to isolate the cells from each other. This can be done by using firewalls, VLANs, or IPSec.

Manage State:

There are a few different ways to manage the state in CBA. Here are some of the most common approaches:

  • Global state:?Global state is a single repository of states that is shared by all cells in the CBA. This approach is simple to implement, but it can be difficult to scale and manage.
  • Cell-local state:?Cell-local state is a separate repository of state for each cell in the CBA. This approach is more scalable and manageable than the global state, but it can be more difficult to coordinate changes to states across cells.

Ideally, you’d want to use mostly Cell-local state and only in rare scenarios would you want to go into a global state.


This brings us to the end of this article. We talked about the Cell-Based Architecture which is a microservice architecture pattern for bundling all functional components grouped together in an independently deployable, monitored entity. We covered the advantages and disadvantages and also delved into some implementation considerations while using CBA. There’s still a lot more that can be covered on CBA like how high availability looks like in CBA, and design considerations into whether databases should be a separate cell or in the same cell. Please post comments if you want me to cover these in another article.


Thank you for reading! I’ll be posting weekly content on distributed systems & patterns, so please like, share and subscribe to this?newsletter ?for notifications of new posts.

Please comment on the post with your feedback, will help me improve! :)

Until next time, Keep asking questions & Keep learning!

Wesley Oliveira Santos

Staff Software Engineer | 3x AWS Certified | Azure Certified | FinOps Certified | LPI Linux Essentials | GitHub Foundations

3 个月
回复
Amin Hosseini

Software Engineer - Java Developer

7 个月

what is the main??differences between?????????-?????????? ???????????????????????? and Actor Model

回复
回复
Marcin Por?bski

Magician Architect with Midas touch

1 年

Pratik, is this something which is present at Booking com? Did you try/evaluate implementing this at some level? Thanks

Great article, Pratik As the author of Cell-based Architecture (CBA), here's the official spec for those interested in diving deeper: https://github.com/wso2/reference-architecture/blob/master/reference-architecture-cell-based.md. It's under CC BY 4.0, so contributions, comments, and constructive criticism are highly encouraged.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了