Skip to content
tezvyn:

Architecture

376 bites tagged Architecture — interview questions with model answers, and 60-second explainers.

iOS & Swift2 min read

The Singleton Pattern: One Instance to Rule Them All

A singleton ensures a class has only one instance and provides a global access point to it. It's used for shared resources like a network manager or logger. The main footgun is that overuse creates tight coupling and makes testing difficult.

iOS & Swift2 min read

MVVM: Separate SwiftUI Logic from Layout

MVVM separates logic from layout by moving state and business logic out of your SwiftUI View into a dedicated ViewModel class. This makes your code cleaner, more organized, and easier to test.

iOS & Swift2 min read

Model-View-Controller (MVC): Separating App Logic from UI

MVC organizes code by separating data (Model) from the user interface (View), using a Controller as the go-between. This is the foundational pattern for many UI frameworks, like Cocoa and UIKit. The main footgun is the "Massive View Controller."

Flutter & Dart2 min read

Flutter's Architectural Layers: UI and Data

Think of a Flutter app in two parts: the UI layer for what the user sees, and a data layer for fetching and managing information. This separation is crucial for apps with APIs or complex state.

Flutter & Dart2 min read

Flutter Add-to-App: Embedding Flutter in Native Apps

Think of Add-to-App as embedding the Flutter engine inside your existing native app, like a super-powered web view. It's for incrementally migrating a large Android or iOS codebase to Flutter without a full rewrite.

Flutter & Dart2 min read

Redux: Predictable State via a Single Source of Truth

Redux treats app state like a transaction log. All changes are explicit actions processed by pure functions, creating a new, predictable state. It's ideal for complex apps with shared state. The main footgun: putting side effects like API calls in reducers.

Docker & Kubernetes2 min read

kube-apiserver: The Front Door to Your Kubernetes Cluster

The kube-apiserver is the front door to your Kubernetes control plane. All requests to query or modify the cluster's state must pass through it, from `kubectl` commands to automated controller actions. The footgun is bypassing it to modify `etcd` directly.

Docker & Kubernetes2 min read

Control Plane vs. Data Plane: The Brain and the Brawn

Think of a system as having a brain and a body. The Control Plane is the brain, making decisions and setting rules. The Data Plane is the body, executing those rules on actual data or traffic, like in a service mesh's network of proxies.

Docker & Kubernetes2 min read

Kubernetes API Aggregation Layer: Extending the API Server

The API Aggregation Layer bolts custom API servers onto the main Kubernetes API, with `kube-apiserver` acting as a proxy. This powers features like the metrics server (`kubectl top`) and enables complex extensions.

Docker & Kubernetes2 min read

The Operator Pattern: A Robot SRE for Your App

The Operator pattern adds a custom, automated "robot SRE" to your Kubernetes cluster. It encodes human operational knowledge for a specific application, like a database, into software that handles complex tasks like upgrades, backups, and failovers…

Docker & Kubernetes2 min read

Kubernetes Cluster-Level Logging

Cluster-level logging treats logs as a stream, not as files on ephemeral pods. It centralizes logs from all nodes before they disappear when a pod dies, which is essential for debugging any production application.

Docker & Kubernetes2 min read

kube-controller-manager: The Cluster's Reconciliation Engine

The kube-controller-manager is Kubernetes' reconciliation engine, running multiple control loops to make the cluster's actual state match your desired state. It handles tasks like ensuring a Deployment has the correct pod count.

Docker & Kubernetes2 min read

kube-scheduler: The Cluster's Matchmaker

The kube-scheduler is your cluster's matchmaker, assigning new Pods to the best possible Node based on their needs. This is the default workload placement engine. The footgun is thinking it runs Pods; it only *assigns* them to a Node.

Design Systems2 min read

Monorepos: A Design System's Single Source of Truth

A monorepo places your design system and its consuming apps in one repo. This enables atomic changes: update a component and all its consumers in a single commit. It's ideal for keeping UI consistent, but requires strict tooling to avoid becoming a monolith.

Design Systems2 min read

Component Composition: Treat a Group Like an Individual

Component composition treats a group of objects the same as a single one. This allows building complex UIs by nesting simple components, like putting a Button inside a Form. The footgun is creating monolithic components instead of small, reusable ones.

Design Systems2 min read

Single Source of Truth (SSOT): One Place for All UI

A Single Source of Truth (SSOT) is the "don't repeat yourself" principle for UI. Define a component or style once in a central design system, and reference it everywhere. This prevents UI drift across teams.

Databases & Architecture2 min read

Caching: Write-Through for Safety, Write-Back for Speed

Write-through caching writes to the database immediately for data safety, while write-back delays writes for speed. Use write-through for critical data and write-back for high-volume updates.

Databases & Architecture2 min read

Multi-Region Databases: Resilience, Latency, and Compliance

A multi-region database is a strategy for resilience, low latency, and data compliance. It's used to survive region outages, keep data in-country, and serve reads close to users. The footgun is managing low-level replica placement directly, which is complex.

Databases & Architecture2 min read

Synchronous vs. Asynchronous Replication: A Trade-off

Replication is a trade-off: synchronous waits for all copies to confirm a write, guaranteeing consistency but risking availability. Asynchronous lets the primary move on immediately, prioritizing speed.

Databases & Architecture2 min read

Multi-Leader Replication: Enabling Writes Across Datacenters

Multi-leader replication allows multiple nodes to accept writes, avoiding a single-leader bottleneck. It's used in multi-datacenter systems for low-latency local writes and in offline apps. The main footgun is resolving write conflicts from concurrent updates.

Databases & Architecture2 min read

Single-Leader Replication: One Node to Rule Them All

Think of a single source of truth. One 'leader' server takes all writes, while 'follower' servers handle read traffic. This is the default for many databases like PostgreSQL and MongoDB to scale reads.

Databases & Architecture2 min read

Buffer Manager: The Database's Memory Gatekeeper

The buffer manager acts as a database's private RAM cache, deciding which data pages to keep in memory versus fetching from slow disk. It's central to query performance, as it tries to serve all data requests from this fast cache.

Databases & Architecture2 min read

In-Memory Data Grid: A Shared RAM Pool for Your Cluster

An In-Memory Data Grid (IMDG) pools the RAM of multiple computers into one massive, shared data space. It's for high-speed processing on datasets too large for one machine. The footgun is mistaking it for a simple cache; it also provides parallel computation.

Databases & Architecture2 min read

Approximate Nearest Neighbor (ANN) Search: Good Enough, Fast Enough

ANN search finds 'pretty close' neighbors in a massive dataset for a fraction of the cost of finding the exact closest one. It powers vector databases and semantic search.

Get Architecture bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.