Still remember design patterns in OOD? The gang of four. So what are the patterns in container architectures?

A shared vocabulary can enable us to understand each other quickly.

Similar Posts:

Thanks the following friends for reviewing the post:

Lexies Leon Cruz, Guilherme Virtuoso



Quorum Protocol

Gossip Protocol, Vector Clocks


Horizontal Scaling, Vertical Scaling

Components scale independently

Stateless Services
Distributed Hash Table

Partition Tolerance

DB Rebalancing


Resource Isolation, 

Web-Serving Environments

Auto Service Discovery, Service Brokering

A breaking API Change

Transient Failures


  • The Sidecar Pattern: see more

The sidecar pattern can help to:

  1. Adapt legacy applications where we no longer wanted to make modifications to the original source code.
  2. Create modular utility containers that standardize implementations of common functionality.

e.g: An Example Sidecar: Adding HTTPS to a Legacy Service

A Shared Language When Discussing Architectures

e.g: A sidecar example of managing a dynamic configuration

A Shared Language When Discussing Architectures

e.g: Hands On: Deploying the topz Container

More explanation about sidecar pattern in book:

<Designing Distributed Systems>

  • The Ambassador Pattern: see more

Ambassadors can alter and broker how an application container communicates with the external world.

A Shared Language When Discussing Architectures

e.g: Using an Ambassador to Shard a Service

A Shared Language When Discussing Architectures

e.g: A service broker ambassador creating a MySQL service

When trying to render an application portable across multiple environments, one of the primary challenges is service discovery and configuration.

A Shared Language When Discussing Architectures

  • The Adapter Pattern: see more

The adapter container is used to modify the interface of the application container so that it conforms to some predefined interface that is expected of all applications.

It takes a heterogeneous world of applications and creates a homogeneous world of common interfaces.

A Shared Language When Discussing Architectures

We can use adapter pattern to support monitoring or logging for hybrid modules/components.

e.g, prometheus monitoring, nagios plugins for application monitoring, etc.

e.g, logstash normalizes different logging formats.

  • Microservices

Microservice wins against monolithic service in Reliability, Agility and Scalability.

A Shared Language When Discussing Architectures

Downsides of microservices approach:

  1. More difficult to debug. Debugging in one process is impossible now.
  2. More difficult to design to enable proper services’ coordination.
  3. Performance downgrade: more players get involved in the communication/cooperation.

Common Tech Stacks

  • MVC: models, views and controllers
  • JAVA SSH: struts, spring and hibernate
  • LAMP: Linux + Apache + Mysql + PHP

See more in wikipedia

  • LNMP: Linux + Nginx + Mysql + PHP
  • MEAN: MongoDB + Express.js + AngularJS + Node.js

MEAN is a free and open-source JavaScript software stack for building dynamic web sites and web applications. The MEAN stack is MongoDB, Express.js, AngularJS, and Node.js. See more in wikipedia.

Trouble With Distributed Systems

  • Faults and partial failures
  • Unreliable networks
  • Unreliable clocks
  • Communication and misunderstandings

SOLID Principles:

  • Single responsiblity principles: A class or method should have only one reason to change
  • Open-Closed principle: A class should be open for extension but closed for modification
  • Liskov substituion principle: Classes that implements the same interface or base class can be substitued
  • Interface segregation principle: Interfaces should be specialized but not too special
  • Dependency inversion(Inversion of control): Depend on abstractions not implementations

YAGNI Principle: you are not gonna need it yet

Original URL:

Connect with Denny In LinkedIn Or Slack

Share It, If You Like It.

Leave a Reply

Your email address will not be published. Required fields are marked *