Topic

Software Architecture

Discover software architecture discussions covering design patterns, system design, and architectural decisions. Our digest consolidates microservices, monolith patterns, and domain modeling from developer communities.

What this topic tracks

  • Language and framework updates
  • API, architecture, and deployment patterns
  • Performance, reliability, and production lessons

Software Architecture · 1,135 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

Engineering AI Discover

netflixtechblog.com · 17 Nov

Artificial Intelligence · Backend · Large Language Models · Software Architecture · AI Agents

Netflix built AI Discover around a governed intelligence layer that combines LLMs with recommendation systems to create steerable TV discovery.

Members choose themes, receive grounded title rows, explanations and narrower options, while a controller validates plans and an executor runs typed capabilities with parallelism, fallbacks and offline traces. Asynchronous serving preserves immediate TV feedback despite slow generation. Code-based safety, catalog grounding, model-agnostic components, Memory Hub and member feedback support reliability, experimentation and personalization.

Reflex: an architecture for building mobile apps with agents

shopify.engineering · 5 Nov

Design Patterns · Mobile · Software Architecture · Testing · AI Agents

Shopify built Reflex, an MVVM architecture for agent-first native mobile development.

It separates UI-free Core modules from platform-specific Swift and Kotlin apps, exposes each ViewModel’s JSON state and actions through Introspection Kit, and lets a CLI drive the same contract headlessly or against real builds. One behavior-test suite runs unchanged on iOS and Android, enforcing parity; more than 1,700 tests complete in about four CI minutes without simulators.

Designing a reliable unplanned failover

planetscale.com · 5 Nov

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki’s unplanned Postgres failover uses replica evidence rather than Admin’s health check alone.

It declares a primary dead only when reachable replicas report broken replication without contradiction, then disconnects them to prevent the old primary from returning and to freeze WAL positions. It promotes the replica with the highest received, preferably fully replayed, WAL, reconfigures the shard, and tears down the old primary. Synchronous `ANY 1` durability helps establish write unavailability, while TCP and WAL receiver timeouts detect silent or frozen failures.

F3 Lightning: How Meta Accelerates Ads ML Features to Production at Scale

engineering.fb.com · 3 Nov

Artificial Intelligence · Backend · Machine Learning · Performance · Software Architecture

Meta built F3 Lightning on top of F3 to let Ads ML features be compiled, validated, deployed, and rolled back independently instead of shipping as one merged graph.

This removes the release-blocking effect of failures across a system serving more than 20,000 features while preserving shared execution. Stable computation identifiers, one execution plan, a shared memory buffer, and dense index mapping eliminate duplicated work and request-time lookups. Comparable features now reach production about 3.6x faster with no added infrastructure compute cost.

Designing a planned switchover for minimum disruption

planetscale.com · 29 Oct

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki minimizes planned Postgres primary switchovers by validating candidates beforehand, establishing a final WAL position, preserving synchronous replication, and buffering primary-bound queries.

Admin makes the old primary read-only, disconnects other replicas, waits for the target to replay all required WAL, prepares replication, and promotes it only when safety checks pass. Routers then replan buffered queries, so applications usually see delay rather than errors. A deadline enables rollback to the old primary, while acknowledged commits remain durable.

Meta Andromeda: Powering the Next Generation of Ads Retrieval Through Model-System Co-Design

engineering.fb.com · 28 Oct

Artificial Intelligence · Deep Learning · Machine Learning · Performance · Software Architecture

Meta’s next-generation Andromeda ads-retrieval engine uses model-system co-design to deliver near ranking-level quality while scoring more than one billion eligible ads per second on a single GPU server, a 100x throughput increase over the 2024 system.

Its Retrieval Mixture-of-Experts architecture uses about 300x fewer inference-time FLOPs, while fused GPU kernels and co-located index matching eliminate memory and network bottlenecks. Since 2025, Andromeda has increased Facebook conversions by 2.4%.

Making Failure Diagnosis Reliable with Pensive AI

netflixtechblog.com · 26 Oct

Artificial Intelligence · Backend · Big Data · Large Language Models · Software Architecture

Netflix built Pensive AI to extend deterministic Pensive with AI-assisted error extraction and on-demand failure diagnosis across data workloads.

It identifies error spans by line numbers, preserves original logs, streams and caches debugging responses per failed step attempt, and supports APIs, MCP, and Data Portal. AI extraction now covers 100% of failures; users without it performed 321% more manual log-exploration actions. Archived logs, evaluations, tracing, deadlines, and release gates control quality, latency, cost, and compatibility.

Shard design doesn't start from your tables

planetscale.com · 23 Oct

Backend · Database · Distributed Systems · PostgreSQL · Software Architecture

Neki shard-group design should start from query and transaction patterns, not table structure.

Tables sharing a key can be co-located across Postgres shards using a common shard index, keeping joins and transactions local and preserving full single-shard semantics. Reference tables are replicated to every shard, while differently keyed data can use separate groups. Global secondary indexes support lookups without shard keys. MoveTables and Reshard later change placement, shard keys, or shard counts as workloads evolve.

Single-tenant Titus: VM-level isolation on a multi-tenant container platform

netflixtechblog.com · 22 Oct

Backend · DevOps · Kubernetes · Performance · Software Architecture

Netflix introduced single-tenant Titus, giving selected workloads a dedicated EC2 VM while preserving Titus’s API, deployment path, and platform-managed patching.

Federation allowlists eligible jobs, autoscaling provisions right-sized instances, and scheduling enforces one task per node. The mode targets stateful, high-throughput streaming and other latency-sensitive services affected by shared-kernel interference. Netflix reports improved isolation, denser remaining multi-tenant packing, and easier maintenance, while accepting slower cold starts and dedicated-node overhead; shared tenancy remains the default.

Single-tenant Titus: VM-level isolation on a multi-tenant container platform

netflixtechblog.com · 22 Oct

Backend · DevOps · Kubernetes · Performance · Software Architecture

Netflix introduced single-tenant Titus, a mode that runs one container task on a dedicated EC2 VM while preserving Titus’s API, deployment workflow, and managed host ownership.

It targets stateful, high-throughput, latency-sensitive workloads affected by shared-kernel interference in cache, memory bandwidth, networking, storage, and scheduling. Federation allowlists workloads, autoscaling provisions right-sized instances, and Kubernetes prevents colocation. Benchmarks assess throughput and P99 latency under “havoc” neighbors; dedicated nodes improve isolation, simplify patching, and can reduce fleet fragmentation, but add launch latency and sizing overhead.

The bridge to agent-scale Git infrastructure

github.blog · 21 Oct

Backend · Distributed Systems · Git · GitHub · Software Architecture

GitHub changed Spokes’ write quorum from repository-wide to per-reference serialization, enabling the last 0.00001% of repositories to migrate to Azure despite 25 ms cross-region round trips.

Writes to independent branches can now proceed concurrently, delivering 3–4x higher throughput at lower latency in testing. GitHub also introduced a virtual write replica backed by Azure Blob Storage and ephemeral virtual read replicas, separating read scaling from write coordination while preserving durability. The next bottleneck is write throughput and ordering reference state.

The Thin Orchestrator: How We Made Our AI Agents More Reliable by Giving the Router Less to Do

engineering.fb.com · 19 Oct

Artificial Intelligence · Design Patterns · Large Language Models · Software Architecture · AI Agents

Meta built a 1,300-line thin orchestrator that routes 20+ workflows to 14 specialized AI agents while performing no domain reasoning.

Its fixed protocol handles intent, inputs, discovery, reliability gates, delegation, and results; isolated subagents perform domain work using on-demand knowledge files. Replacing a single context-heavy agent reduced hallucinations and cut column-configuration preparation from days to under an hour. About two-thirds of changes now land without significant human edits, while workflow templates add capabilities without new agent code.

Advancing Generative Recommendation Inference: our collaboration with NVIDIA on TensorRT LLM

engineering.atspotify.com · 16 Oct

Artificial Intelligence · Large Language Models · Machine Learning · Performance · Software Architecture

Spotify and NVIDIA collaborated to build a production inference stack for generative recommendations, initially targeting personalized podcasts and broader use across Spotify.

TensorRT LLM was enhanced with multi-sequence beam search, multi-item scoring, out-of-tree model support, and embedding injection for user soft tokens, consolidating capabilities previously split across vLLM and SGLang. Its sampler improves GPU utilization and performance, delivering up to 54% beam-search and 7% scoring cost reductions on the 1.7B Qwen3 model.

TimeSeries Tiered Storage Journey: Kafka/Flink Streams to Native Cassandra Cold Reads

netflixtechblog.com · 14 Oct

Backend · Big Data · Database · NoSQL · Software Architecture

Netflix evolved its TimeSeries tiered storage from an Apache Kafka/Flink pipeline writing compacted Parquet to S3 into native Cassandra cold reads from existing S3 backups.

Immutable Time Slices use ReadOnlyCompactionStrategy to align SSTables, while custom backup Memtables cache metadata locally and fetch data chunks on demand. An optional separate Cassandra cold cluster protects hot traffic. The system now stores over 15 PB, reduced disk usage from 80% to 7%, improved p90 latency by ~30%, and keeps p99 below 500 ms.

From 2,500 requests to 24: Rebuilding star history without the stargazers

github.blog · 14 Oct

Backend · GitHub · Performance · REST API · Software Architecture

GitHub built an aggregate star-history endpoint that returns up to 30 weeks of daily counts without stargazer identities.

It filters stars by an indexed time range before grouping, reducing `react/react` history retrieval from about 2,511 requests and 6 million repeated row scans to about 24 requests examining roughly 251,000 rows. The design addresses scraping risks and database load, though unusually dense weeks can still be expensive.

Meta’s Generative Ads Model (GEM): Scaling the Central Model and Compute Engine for Frontier Ads AI

engineering.fb.com · 13 Oct

Artificial Intelligence · Deep Learning · Machine Learning · Performance · Software Architecture

Meta’s 2026 GEM is a unified ads recommendation foundation model and compute engine for Meta’s surfaces and objectives.

It uses Kunlun to scale model complexity 2.5x, transfers central intelligence through LoopFM and Solaris, and trains across thousands of GPUs with 4x the training FLOPs at double the end-to-end efficiency (20–25% MFU). GEM reports 18.9% conversion and 12% CTR improvement, plus targeted conversion uplifts of 5.8% on Facebook, 4.1% on Instagram, and 1.6% off-site.

Maybe you don't need GraphQL

alexandrehtrb.github.io · 3 Sept

GraphQL · REST API · Software Architecture

GraphQL can consolidate requests and let clients select only needed fields, but it adds data-layer coupling, validation complexity, security risks, and aggregate-query limitations.

It is most valuable for large platforms serving diverse clients. Simpler APIs can achieve similar results through SQL/NoSQL joins, optional fields, API flags, and HTTP/2 or HTTP/3 multiplexing, often with better performance.

Single responsibility, the distorted principle

truehenrique.com · 4 Jun

Productivity · Software Architecture · Computer Science

The Single Responsibility Principle (SRP) is frequently misunderstood as requiring classes to perform only a single action.

In reality, it focuses on cohesion and defining responsibility rather than granular tasks. Overusing this principle leads to overengineering and code fragmentation. Software engineers should prioritize clear, cohesive structures that minimize cognitive load based on project context.

How to Not Get Hacked Through File Uploads

eliranturgeman.com · 14 Mar

Backend · Cybersecurity · Software Architecture

Secure file uploads by validating file types via magic bytes, using strict allowlists, and renaming files with random identifiers.

Protect against parser exploits, XSS through SVGs, path traversal, and resource exhaustion by isolating file storage, enforcing limits, and sandboxing processing. Keep dependencies updated and use security headers to prevent browser-side execution of malicious content.

The Illusion of Building

uphack.io · 1 Mar

Artificial Intelligence · Distributed Systems · Software Architecture

The article distinguishes between 'building an app' and 'engineering a system.'

AI significantly lowers the barrier to creating functional-looking prototypes (Code to Prototype), but it cannot automate the complex work of fighting entropy, ensuring security, scalability, and long-term reliability (Service to Institution) that defines professional software engineering.

Where it came fromNetflix TechBlogEngineering at MetaRedditPlanetScaleGitHub EngineeringShopify EngineeringCreate a Snapbyte.dev digest and choose Software Architecture as one of your topics.Build your digest