Feedback

Chat Icon

Cloud-Native Microservices With Kubernetes - 2nd Edition

A Comprehensive Guide to Building, Scaling, Deploying, Observing, and Managing Highly-Available Microservices in Kubernetes

Cloud Native Microservices: How and Why
7%

Unix/Linux Philosophy

If you look closely, you will find that the twelve-factor app methodology is heavily inspired by the Unix/Linux philosophy. How could it not? After all, Linux is the most widely used operating system for servers and cloud infrastructure. According to EnterpriseAppsToday, Linux powers over 96% of the top million web servers in the world. This dominance is no accident. Its stability, resilience, and scalability stem directly from its underlying design principles and philosophy—a set of ideas that have shaped the entire field of software engineering and system architecture.

This philosophy is not just about how to build operating systems; it's a blueprint for building modular, maintainable, and composable systems — the same principles that later inspired not only the Twelve-Factor App methodology but also microservices, DevOps, distributed systems, and cloud-native architectures.

For anyone working in software engineering, understanding this philosophy, in my opinion, is a must - including its principles, history, and culture. I highly recommend reading The Art of Unix Programming by Eric S. Raymond.

The following 10 points summarize the core principles of this philosophy:

Do one thing, and do it well.

A tool should have one job. No distractions. No side quests. Do that job better than anyone else. This idea shaped the Single Responsibility Principle - and later, the rise of microservices.

ℹ️ The Single Responsibility Principle is one of the five SOLID principles of object-oriented design. It states that a class should have only one reason to change — that is, a single responsibility or axis of change.

Example:

grep searches text. That’s it. It doesn’t edit, move, or copy files.
ping checks connectivity. Nothing more.

Linux developers are able to create a command-line tool that addresses all the networking needs of a system, but they don't do that for a good reason. Instead, they built small, focused tools like ifconfig, ping, and traceroute that each handle a specific aspect of networking.

In modern systems, a microservice that only handles authentication follows the same rule—one job, done right.

Build small, modular tools that can be combined

Linux builds like Lego. Small pieces. Tight fits. Each part is simple alone, but powerful together. That spirit lives in modular software and composable architectures that snap together cleanly.

Example:

If you plug a USB drive into a Linux system, the kernel might automatically load a few modules:

  • usbcore: for USB support
  • ehci_hcd: for USB 2.0 support
  • usb_storage: for USB mass storage devices
  • sd_mod: for SCSI disk support (Small Computer System Interface)

Together, they form a complete USB storage stack — cooperating but independent.

When you remove the USB drive, the modules can be unloaded without affecting the rest of the system.

sudo rmmod usb_storage
...

The equivalent today in microservices could be a payment service, an email service, and an analytics service working together to handle a transaction, but each can be updated or replaced independently.

Use text streams as universal interfaces

Plain text is the great equalizer. It’s human, flexible, and easy to debug at 3 a.m. From shell pipes came JSON, YAML, and every API that talks in words, not secrets.

Example:

You want to know which IP address made the most requests based on an access.log file. You can chain together simple commands:

cat access.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 5

Each command does one thing and passes its plain text output to the next; together, they produce a powerful result.
Each step is easy to understand and debug; chained together, they produce powerful results. You can see what’s happening at each step and fix it if something goes wrong.

Today, JSON payloads between APIs or microservices serve the same purpose — readable, flexible, composable.

Design for composition, not integration

Let programs cooperate, not cling. They should work side by side, not inside each other. That’s how we got loosely coupled systems, event-driven design, and the container revolution.

Microservices are loosely coupled by design, communicating over APIs or messaging systems rather than direct calls.

Example:

In Linux, a service like systemd can start, stop, and manage other services without being tightly integrated with them.

In a microservices architecture, a payment service publishes a “transaction completed” event. Other services (email, analytics, billing) subscribe to it. No tight coupling, just composition.

Everything is a file

It sounds strange, radical, but it's elegant and, most importantly, simple.

Treat everything — disks, devices, sockets — like files, and suddenly the world feels simple.
That idea became the root of resource abstraction, virtualization, and the modern cloud.

Example:

In Linux, a file isn’t just something stored on disk — it’s any object that can be read from or written to using the same system calls (open, read, write, close).

Cloud-Native Microservices With Kubernetes - 2nd Edition

A Comprehensive Guide to Building, Scaling, Deploying, Observing, and Managing Highly-Available Microservices in Kubernetes

Enroll now to unlock all content and receive all future updates for free.