Sources

Engineering @ Scale — 2026-07-27#

Signal of the Day#

The economics of code production have fundamentally flipped: code must now be treated as a disposable “materialized view of understanding” rather than a precious asset. As the cost of generating code drops to near zero, editing in-place accumulates entropy; rigorous engineering must relocate from the authoring phase into behavioral testing, system evaluation, and production observability.

Deep Dives#

How NVIDIA Builds Open Models for the Age of AI · NVIDIA Balancing speed and capability in frontier AI models is notoriously difficult, as traditional Attention mechanisms become prohibitively expensive for long contexts, while State Space Models (like Mamba) struggle with pinpoint recall. To solve this, NVIDIA utilizes a hybrid architecture that replaces most Attention layers with Mamba layers to handle long sequences cheaply, inserting just a few Attention layers to retain precise retrieval capabilities. They combine this with Mixture-of-Experts (MoE) routing to activate only a small subset of parameters per token. Furthermore, to maximize efficiency, their models are pretrained in 4-bit precision (NVFP4), tightly co-designed with their underlying hardware. Blending distinct neural architectures offers a highly effective blueprint for scaling context length without destroying compute budgets.

Service Architecture at SoundCloud: Domain Gateways · SoundCloud The Backends for Frontends (BFF) pattern originally gave SoundCloud’s client teams autonomy, but over time it led to heavily duplicated business and authorization logic across multiple edge services. To fix this, engineering evolved the architecture to introduce Value-Added Services (VAS) that serve core domain aggregates (e.g., Tracks, Playlists) and enforce authorization rules in one centralized layer. When these aggregates grew too large and fanned out to too many foundational services, they introduced Field Masks (partial responses via protobuf) so BFFs could request only the necessary data subset. Ultimately, they separated concerns into Domain Gateways to prevent a single VAS from becoming an unmaintainable bottleneck across highly disparate consumer and creator domains. This highlights how BFFs solve frontend autonomy but inevitably push domain complexity to the edge, requiring centralized domain gateways to rein in technical debt.

Cost-Tiered Multimodal RAG for Medical Documents · AWS / Guardoc Processing over a million highly variable medical records daily—mixing handwriting, checkboxes, and printed tables—presents a massive scaling challenge where relying solely on frontier multimodal models is cost-prohibitive. Guardoc implemented a rigorous cost-tiered RAG pipeline to drastically reduce processing overhead. Documents are first extracted cheaply via Amazon Textract, chunked along clinical boundaries, and embedded into DynamoDB for an in-memory KNN search partitioned by patient. A lightweight, low-cost model (Nova 2 Lite) performs coarse filtering to drop obvious non-matches before routing only the surviving pages and raw PDF bytes to the computationally heavy multimodal model (Nova Pro) for final visual reasoning. For high-volume AI processing, aggressive pre-filtering through a hierarchy of increasingly capable models safely slashes costs without sacrificing precision.

Testing SQL for BigQuery · SoundCloud Data pipelines are frequently treated as legacy code lacking proper unit tests, largely because testing against cloud data warehouses like BigQuery incurs high constant-time overhead for loading tables, ruining TDD feedback loops. After migrating from Spark to BigQuery, SoundCloud engineers built a rapid testing framework using Python and pytest to ensure pipeline reliability. To completely bypass table-loading latency, they inject test data directly into the SQL queries as literals using Jinja templating. Complex queries are heavily modularized using Common Table Expressions (CTEs), allowing the test harness to mock inputs for individual CTEs and validate transformation logic in strict isolation. Treating SQL as standard application code and utilizing CTEs for modular unit testing enables fast, deterministic feedback loops for data engineering.

Debugging Oblivious HTTP with pvcli · Cloudflare Debugging privacy-preserving protocols like Oblivious HTTP (OHTTP) is a tedious and error-prone task, forcing engineers to manually parse binary HTTP encodings, decrypt payloads, and trace issues across disconnected relays, gateways, and targets. To eliminate this friction, Cloudflare open-sourced pvcli, a CLI tool designed with a curl-like interface to fully encapsulate the complexity of OHTTP. The tool natively handles public key fetching, asymmetric encryption, binary HTTP encoding/decoding, and proxy routing—including mTLS authentication to relays—in a single command. When operating complex, multi-party cryptographic protocols, relying on bespoke bash scripts prolongs incident response; investing in unified, purpose-built CLI tooling significantly reduces operational overhead.

AI Demands More Engineering Discipline, Not Less · O’Reilly The sudden drop in code generation costs threatens to overwhelm teams with nondeterministic code if they continue treating AI-generated code the same way they treat human-written code. Drawing on concepts of immutable infrastructure, the author argues that code should no longer be treated as a durable asset where system knowledge lives, but rather as a disposable “materialized view of understanding.” When code regeneration is practically free, editing in place becomes an anti-pattern that accumulates entropy. The true bottleneck of software engineering is no longer code production, but system evaluation; harnessing AI safely requires relocating engineering rigor strictly into behavioral testing, architectural artifacts, and production observability.

Android Image Loading Optimization · SoundCloud An app redesign at SoundCloud introduced heavily styled images featuring rounded corners and dynamic background palettes, causing severe frame rate drops and stuttering during scroll events. Profiling revealed that using large Bitmap objects as keys in the Palette LruCache was stalling the main thread, so engineers swapped the cache key to the image’s lightweight String URL. Furthermore, generating color palettes from 500x500 images was too slow, so they aggressively downscaled the bitmaps to 15x15 before extracting dominant colors. Finally, to fix GPU overdraw from stacked images, they utilized PorterDuff.Mode.DST_ATOP to draw only the visible outer margins of layered elements. Offloading heavy processing (like palette generation) to downscaled assets and simplifying memory cache keys are essential practices for maintaining 60fps client-side rendering.

Patterns Across Companies#

A major converging trend is the implementation of hierarchical routing for scale and cost containment. Whether it is Guardoc utilizing cheap NLP models to filter data before invoking expensive multimodal LLMs, or NVIDIA combining cheap State Space Models (Mamba) with expensive Attention layers to balance context length with precision, architectural success relies heavily on shielding expensive compute from low-value tasks. Additionally, we are seeing a strong push toward centralizing distributed complexity at the gateway level, evidenced by SoundCloud reigning in sprawling BFF logic into cohesive Domain Gateways and Cloudflare wrapping multi-hop cryptographic complexity into an edge-tested CLI tool.


Categories: News, Tech