One Postgres, a database per user, or both?
Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users.
Topics Architecture & design
End-to-end design of a system and its tradeoffs.
Search within System design, or combine it with other topics →
Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users.
Before adding a sync engine or local data copy to speed up an application, check whether the real bottleneck is network-attached storage under managed Postgres.
Sauna, a proactive AI work assistant, gives every session, agent and connected inbox or calendar its own Turso database, creating about 90,000 databases a day and over 2 million in total.
Tangled is a federated code forge built on the AT Protocol: self-host Git hosting (knots), CI runners (spindles), or the whole API and UI, and still collaborate with everyone else.
Netflix adopted DataJunction (DJ), an open-source semantic layer, to centralize metric and dimension definitions after onboarding a single metric to its experimentation platform took weeks.
Atproto spaces, a permissioned-data extension to the AT Protocol, is nearing launch with its core primitives stabilizing, and the team will publish weekly code samples until release.
Middleware should manage workflows rather than applications: the three-tier app server, which replaced two-tier client-DBMS setups in the 1990s to fix connection and memory limits, should evolve into a workflow orchestrator.
Grab generates consumer-facing merchant review summaries with a pipeline that stratifies review samples by a sentiment-scored rating distribution, uses an LLM to produce overall and topic-based summaries (taste, packaging, portion size), and has a separate LLM check each claim against the sampled reviews before publication.
Included Health's Dot healthcare guide runs on a federated LangGraph "supergraph" in which a conversational router hands off to team-owned sub-workflows for urgent care, scheduling, specialists and behavioral health.
QuintoAndar's customer data platform replaced a Lambda architecture (a Postgres hot layer plus Kafka Connect into a Delta landing zone processed by 24/7 Databricks jobs with costly MERGE INTO deduplication) by having its event gateway write about 900 million monthly events directly into ClickHouse Cloud, which also serves roughly 300 million API requests a month with sub-second reads.
Airbnb rebuilt login and signup around an "Identify first then Challenge" model.
Riviera, Dropbox's content processing platform, grew from an internal file-preview service into shared infrastructure behind Search, Replay, Sign and Dash.
Modal is best understood not as a neocloud or inference provider but as a computer: a virtual machine built across dozens of cloud providers, mapped component by component onto a classic computer architecture.
Production agents depend more on system design than on model capability: use deterministic automation for predictable workflows and reserve agents for steps that need judgment over messy context.
Real-time analytics means low-latency queries over continuously changing data, so it is a system property spanning time to ingest, time to transform and prepare, and time to query, not just query speed.
Real BYOC (Bring Your Own Cloud) splits a managed platform into a vendor-hosted control plane, which holds only infrastructure metadata, and a data plane in the customer's own cloud account.
"Multi-region" covers three distinct problems: CDN static asset distribution (level 1), stateless compute in multiple regions with a single-region database (level 2), and multi-region writes for stateful data (level 3).
Deploying AI apps splits into two distinct problems: Layer 1 model serving (GPU scheduling, weight loading, per-token economics) and Layer 2 AI apps (long-running web services, workers, Postgres/pgvector, crons, streaming) that call hosted model APIs.
Scale in OLTP is framed as survivability: a system cannot grow beyond the size it can recover, and when rebuild time (MTTR) exceeds time between failures it enters a death spiral.
incident.io runs a deliberately minimal stack on Google Cloud that lets two platform engineers support thousands of customers.
Scribd built a known-CSAM detection pipeline that separates event-driven PhotoDNA hash generation on AWS Lambda (including images extracted from PDFs) from a GPU-backed batch matcher on SageMaker that compares hashes against versioned NCMEC hash sets with conservative distance thresholds.
Vinted runs its global marketplace with all writes in a single primary site and read-only projections replicated to other regions, rather than sharding primary data across regions in a multi-writer setup.
Full-stack TypeScript apps can be structured either as a single framework codebase (Next.js, SvelteKit, TanStack Start) or as independently deployed services in a monorepo, and the choice interacts with whether you deploy to serverless platforms or long-running servers.
Microservices trade the simplicity of one codebase for network seams, distributed data consistency problems, slow and brittle cross-service testing, and heavy operational tooling, and that trade only pays off at large scale with clear domain boundaries and mature teams.
Laravel Nightwatch, Laravel's first-party observability platform, ingests telemetry through API Gateway and Lambda into Amazon MSK Express brokers, then streams it into ClickHouse Cloud via ClickPipes, with materialized views pre-aggregating raw JSON.
OpenAI's abrupt deprecation of older APIs alongside the GPT-5 launch broke many AI apps overnight, exposing how tightly prompt stacks and RAG pipelines couple to a single model's behavior.
AI pipelines built from LangChain, vector stores, embedding models and LLM providers look modular but are tightly coupled through undocumented assumptions about tokenization, prompt formats, retries and latency, so swapping one component breaks others.
HTAP as a single-database architecture never reached product-market fit, even though systems like SingleStore and TiDB proved row and column storage could be combined.
Klarna split each payment option (pay now, pay later, pay over time) into its own microservice, but shared logic such as authentication, funding sources and risk assessment produced a distributed monolith full of duplicated code and cross-team coordination.
Wise's 2025 stack spans 1000+ Java/Kotlin services, 40 Next.js-based web apps, and large iOS and Android codebases.
Letting the frontend query the database directly, via tools like PostgREST or Firebase, can sharply speed up development by removing backend abstraction layers and frontend/backend team dependencies, which makes it attractive for prototypes and many apps.
Postgres multi-tenancy comes in three main designs: shared schema, schema-per-user and database-per-user.
General-purpose OLTP databases hit a hard throughput ceiling on debit/credit workloads because row locks are held across multiple network round-trips, and hot rows such as a few internal accounts serialize nearly every transaction.
Banque des Territoires, Polyconseil and Hugging Face built a sovereign RAG application that drafts sourced email replies for the EduRénov school-renovation program from its internal documentation.
Meta has been decomposing its many monolithic data engines (ETL, interactive, streaming, ML preprocessing) into reusable components: language frontend, IR, optimizer, execution library and runtime.
Microsoft's Skilling organization built Ask Learn, an Advanced RAG knowledge service grounded in Microsoft Learn documentation, which powers Microsoft Q&A Assist and supplies ground truth for Copilot for Azure.
Slack AI was designed around four principles: customer data never leaves Slack's trust boundary, no LLM training on customer data, the AI only sees what the requesting user can see, and all existing compliance controls still apply.
Grab's ads and promo attribution system evolved from a Kappa-architecture streaming engine to a Lambda architecture that pairs real-time stream processing with Spark batch jobs over S3.
Railway replaced its bespoke per-database Plugins (Postgres, Redis, Mongo, MySQL) with databases deployed as ordinary services, built from general-purpose primitives: ZFS-backed NVMe volumes, Docker image deploys, port-based TCP proxies per region, private networking, cross-service variable references, and a `${{ secret() }}` template function for generated passwords.
Figma's architecture resembles a game engine more than a typical web stack: a C++ canvas compiled to WebAssembly for 2D rendering, a React/TypeScript UI layer, and a Rust multiplayer server, plus layered systems for multiplayer, animation, collisions, chat and plugins.
Oxygen, Shopify's hosting platform for Hydrogen custom storefronts, assembles GitHub, GitHub Actions and Cloudflare Workers with first-party Shopify services such as the CDN, Admin API and identity.
Shopify Fulfillment Network shows two-day delivery dates by precomputing them rather than calculating them at request time.
Supabase Edge Functions run TypeScript globally on the Deno runtime via Deno Deploy across 30+ data centers.
Shopify's Rails monolith relies on a set of in-house patterns: the dev CLI for consistent environment setup, a podded architecture that shards the full infrastructure stack by shop, and domain-driven components that share a single database with no database-level foreign keys.
Zalando replaced its Mosaic micro-frontend architecture, built on team-owned page Fragments, with Interface Framework, a unified platform where pages are trees of typed Entities (Product, Collection, Outfit) mapped via declarative rendering rules to React Renderers that declare data needs in GraphQL.