Ecommerce Architecture at 100 Users: One Server, One Process

By Arkaitz

Why does every ecommerce architecture guide assume you have a team?

Because most of it is written for teams that already have an SRE. At ~100 users, one person on call, and a failure that costs annoyance rather than revenue, the honest answer is one server, one process, one database file — and I run my own store exactly that way.

Search ecommerce architecture advice for a store your size and you get the tier-2 answer: a separate API and SPA, managed Postgres with read replicas, Redis, a search service, Kubernetes, and a CDN with nothing cacheable behind it. The simple web architecture for early-stage websites gives you the general shape; ecommerce architecture at 100 users is that shape with money on it.

DFM Factory — my production store — runs as a Vue 3 SPA and an Express API behind one Docker Compose service on Coolify, with Prisma over an encrypted SQLite file, Stripe Checkout for card entry, and a signature-verified webhook that writes the orders. One developer, about $5–15 a month — the store this post's ~100-user tier is argued from. The cost of failure is an annoyed evening, not a lost quarter.

The tier-2 stack does not fail less at this scale; it costs three to ten times more per month and buys failure modes a 100-user store never experiences — split deploys, cross-service consistency, a shared session store. This post argues the one-server shape is correct here: what runs, what breaks first, what the next tier may change.

What does ecommerce architecture at 100 users actually look like?

One VPS behind a reverse proxy, one Docker Compose service, one encrypted SQLite file, a session cookie, Stripe Checkout, and a deploy that starts from a git push. Everything else is one process on one box, picked by your constraints: budget ~0, ops as a hobby, one maintainer, failure cost = annoyance.

What runs inside the single process

  • API and UI on one port. Express serves the API and the built Vue 3 SPA as static files from port 3001 — hashed assets immutable for a year, HTML must-revalidate. The image is a multi-stage node:22-slim build, non-root, under dumb-init; Compose drops all capabilities and sets no-new-privileges.
  • One encrypted database file. Prisma points at /data/db.sqlite on a named volume, encrypted at rest with SQLCipher (256-bit key from DATABASE_ENCRYPTION_KEY). The entrypoint backs the file up, encrypts idempotently on boot, then applies migrations through migrate-encrypted.js.
  • Server-side sessions. Admin sessions live in a local encrypted sessions.db — 24 hours absolute, 8 hours idle rolling, sameSite=lax, secure in production. CSRF is a double-submit cookie; rate limits sit at login 5 per 15 minutes, register 3 per hour, API 100 per minute per IP.
  • Client-side cart. The cart is a Pinia store persisted to localStorage — no server-side cart table, no cart API, nothing to scale.
  • SQL search. Product search is a contains match on name and slug — a LIKE query. No FTS index, no search service, no Redis.
  • In-process jobs. A scheduler boots interval jobs (expiry, daily refresh, weekly revenue snapshot) with a boot guard so a reload cannot double-fire them.
  • A healthcheck that touches the database. /api/health runs SELECT 1 through Prisma and answers 503 on failure; Docker probes it every 30 seconds.

Sessions beat tokens on one box: a session ID is a few dozen opaque bytes you revoke by deleting a row, while a stateless JWT cannot be killed before expiry without a blocklist — a session store with extra steps. JWTs pay off at service boundaries and multiple verifiers; you have neither.

What is deliberately absent

No Redis, no search service, no job queue, no CDN, no separate API, no Kubernetes — each an argument, not an omission:

  • No Redis. Sessions, cart and cache are local by construction; a shared cache answers a question you do not have, and skipping it breaks nothing here.
  • No search service. Hundreds of products filtered by name and slug do not justify a network hop, an index to sync, or a third bill. When LIKE stops being enough, SQLite ships FTS5 in-process first.
  • No job queue. The in-process scheduler covers expiry and snapshot work. A DB-backed queue is a scaling wall you meet later — second on the break list below.
  • No CDN. Cart, checkout and account pages are uncacheable by definition, and PageVitals' rule holds: a fast CDN only helps on cache hits — at this traffic, an expensive proxy.
  • No separate API, no Kubernetes. Starting a second service for later is the classic tier-1 anti-pattern — every extra moving part is one you must patch and page on at 3am.

How it deploys and how it backs up

Push to the git remote, let CI build and push the image to a private registry, and Coolify rolls it out onto the VPS behind its reverse proxy. Backups are deliberately boring: cp the database file, rsync it off the box, 7 daily plus one monthly copy, key stored apart.

Why is a monolith the correct ecommerce architecture at 100 users?

Because your constraints are the exact conditions under which monoliths win: one person means the system must fit in one head, and Fowler's rule stands — don't even consider microservices unless your system is too complex to manage as a monolith. Yours is not too complex to manage as a monolith; it is one process you can hold in your head. That answer is one worked instance, not a method. How to think about system design before you build is the general version, and it is where the next two tiers fit.

Three constraints do the arguing. Budget ~0 and ops as a hobby mean every extra service is a part you patch and page on yourself. Failure cost = annoyance means availability engineering — replicas, failover, multi-region — buys nothing measurable.

The write load at this tier (checkouts, stock decrements, order rows in integer cents) sits orders of magnitude under SQLite's single-writer ceiling, so no database pressure forces a split. What would you actually be optimizing for?

What the tier-2 stack actually costs per month

The numbers come from vendor comparisons: self-hosted Coolify on an entry VPS runs the whole stack at roughly €3.99–$5 a month all-in (SoloDevStack), the same small stack lands around $15–25 a month on Railway and about $24 on Render (BuildPilot), and managed Postgres alone starts at $12.41 a month for an RDS db.t4g.micro or $25 for Supabase Pro (Bytebase). Add Redis, a CDN tier, a job runner and a metrics stack, and the bill climbs into the tens-to-hundreds — three to ten times the tier-1 cost, paid monthly against a failure cost of annoyance.

That $5 bill is not luck: Coolify, SQLite, Compose and Node cost nothing, which makes the open-source argument practical rather than ideological — and it is why open source is a strategic necessity when your infrastructure budget is effectively zero. Buying the tier-2 architecture at tier 1 — Kubernetes, replicas, a search service, a CDN with no cacheable assets — means paying monthly for failure modes you do not have.

What the biggest stores actually run

Monoliths, mostly. Basecamp has run as the Majestic Monolith since 2003 — around 12 programmers, six platforms, millions of users — and DHH's core rule is don't distribute your computing. Fowler's empirical read is that almost all successful microservice stories started as a monolith that grew too big and got broken up, while systems designed as microservices from scratch end in serious trouble. Shopify, an actual ecommerce company at 10M-user scale, chose a modular monolith over microservices because it wanted modularity without more deployment units — and it still deploys its main Rails monolith roughly 40 times a day (per Shopify's InfoQ talk).

Then Prime Video: Amazon's team cut infrastructure cost by more than 90% by packing distributed serverless components back into a single process after the distributed design hit a hard limit at about 5% of expected load — in Adrian Cockcroft's framing, a refactor of a bad distributed design, not proof that microservices never pay.

Is SQLite safe for a store that takes real money?

Yes, at this tier — your write volume sits orders of magnitude under SQLite's single-writer ceiling, and what actually kills SQLite in production is configuration and a second writer, not load. Ben Johnson went all-in on server-side SQLite for exactly this reason: local queries land in 10–20µs against up to ~1ms for a same-region network hop (his figures); durability is a replication problem, not a database choice.

The two PRAGMAs worth 100x

Travis Horn's single-machine practitioner benchmark measured 33,135 inserts per second against 279 — same data, two settings: journal_mode=WAL with synchronous=NORMAL versus the default DELETE/FULL. Add a 30-second busy_timeout and serialized writers and you have the production setup.

The failure to avoid is documented: yukimemi/kanade logged a real deployment running journal_mode=delete under concurrent writes producing database is locked errors and 7.2-second single-row INSERTs; the fix was WAL, NORMAL, a busy timeout and one writer at a time, and the issue reporter's conclusion was that the single writer becomes the first bottleneck only at fleet scale. Eugenio Enko's benchmark at 200 virtual users found the bottleneck was password hashing and connection-pool contention, not the file lock.

The encrypted file carries one hard rule: a 256-bit key supplied at boot, applied idempotently before migrations run, and a lost DATABASE_ENCRYPTION_KEY means unrecoverable data.

Backups when the database is one file

Back up by copying the file: cp db.sqlite, rsync it off the box, keep 7 daily plus monthly copies, and hold the key somewhere else — a backup without the key is an unusable file. The upgrade path for real disaster recovery is Litestream-style continuous replication to object storage, priced by Johnson at about a dollar a month. The anti-pattern is a copy never restored: rehearse a restore on a scratch box, key included, before you need one.

How do you take payments without ever touching a card number?

Use Stripe's hosted Checkout — card input lives in an iframe on Stripe's domain, which means Checkout puts you on SAQ A, the shortest self-assessment questionnaire, instead of SAQ A-EP for a self-hosted form passed through Stripe.js or SAQ D for direct API integration — and let the signature-verified webhook, not the browser redirect, create the order.

Hosted Checkout also deletes the maintenance: your server builds the session from database prices (integer cents, tax-inclusive, automatic tax, shipping thresholds), validates stock first, and hands the customer to Stripe. The 2025 wrinkle, per a vendor analysis: SAQ A eligibility now includes confirming your payment page is not susceptible to script attacks, so script inventory became a gate — Stripe shrinks your scope, it does not certify your page. Hand-rolling a card form is pure tax for a one-person team: more questionnaire, more requirements, no conversion argument to offset them.

The redirect is not the order

The browser returning from Stripe proves nothing; the webhook is the order. Verify Stripe-Signature against the raw body, accept only checkout.session.completed events with payment_status === 'paid', then write the order and decrement stock in one transaction — updateMany where stock >= q, so overselling throws instead of going negative. Stripe retries for up to three days and its docs tell you to handle duplicate events; the duplicate path here is a unique-violation swallow on the Stripe session ID, so a replayed event is logged and ignored, and the confirmation email goes out after the commit.

Skipping signature verification or idempotency is the fastest way to double-ship stock or accept a fake order, and both are an afternoon's work. The same honesty applies to your admin route: it shares the storefront's process, so the floor is per-IP rate limits, CSRF double-submit, httpOnly/secure/sameSite cookies and an absolute session lifetime — an admin panel with none of those is the anti-pattern, and two-factor auth is the next cheap rung.

What did you trade away to keep it this simple?

Five, and I'll name all of them: a server-injected SEO head instead of an SSR rewrite, SQLite's single-writer ceiling and an unrecoverable encryption key, sessions that die with the process beyond their idle window, one blast radius for admin and storefront, and Stripe's hosted checkout UX.

First, the SPA already existed, and rewriting to SSR to fix Search Console canonical and noindex findings was the wrong cost at this tier. So the server renders the whole head — title, meta, robots, canonical, Open Graph, JSON-LD — on every non-API HTML response, with 404 plus noindex for private paths. What I accepted is two places to keep titles in sync: the server now has to know the route taxonomy and publication status.

A Vercel and MERJ vendor study of 100,000+ Googlebot fetches found every eligible HTML page fully rendered, median crawl-to-render 10 seconds — the weeks to index fear did not show up. Google's own JavaScript SEO docs still recommend server-side or pre-rendering because not all bots can run JavaScript. The sharper edge is Vynced Digital's follow-up analysis of that study: GPTBot, ClaudeBot and PerplexityBot fetch JavaScript files but never execute them, so content that exists only after client-side render is invisible to the assistants now shaping buying decisions.

Second, the key: the database is encrypted, and a lost DATABASE_ENCRYPTION_KEY is unrecoverable data — which is why the key is backed up separately from the file, always.

The other three are one-liners: sessions die with the process beyond their 24-hour and 8-hour windows; admin and storefront share one blast radius — one ops surface, one bad deploy — mitigated with rate limits, CSRF and session caps instead of separation; and hosted checkout trades Stripe's redirect UX for SAQ A scope plus card numbers that never touch your server.

What breaks first when 100 users becomes 100k?

In-process state and background jobs go first, then SQLite under a second writer, then single-box CPU, then origin and disk — and only after all of that does read scaling enter the conversation. The order matters more than any item: it tells you which tripwire to install now.

  1. In-process state. Sessions and scheduled jobs live inside the app process: an in-memory store means a restart logs everyone out (the documented pre-26 Keycloak failure mode), and an interval scheduler dies with the process or double-fires after it — hence the boot guard and a persistent encrypted session file.
  2. Background jobs. Your first genuine scaling wall, and it is not the database. StackAdapt measured a DB-backed queue at 40–60% of aggregate database load, with job spikes visibly degrading its web queries; CoderIQ's Delayed Jobs Hell took its primary down when a bulk import grew the job table to 500k rows and every worker polled it at 0.5–2s per query. Gusto found worker autoscaling contributing to partial and complete site outages, with queue latency spiked to 124 seconds — a vendor engineering blog, and still the metric worth stealing.
  3. SQLite's single writer, but only when configuration or concurrency changes. Default journal settings plus a second writer produce database is locked and multi-second INSERTs (the incident above); a well-tuned WAL setup sits at thousands of write transactions per second. At 100k what changes is not read volume — it is a replay job or bulk import competing for the one writer.
  4. Single-box CPU. Password hashing and image resizing saturate cores while HTTP waits behind them; at 200 virtual users Eugenio Enko's benchmark found the bottleneck was bcrypt, not the SQLite file lock. One box's silicon is your ceiling. For a Black Friday spike you tune what you can — asset caching, rate limits, hashing off the hot path — and accept the rest.
  5. Origin load and image delivery. Cache-miss traffic pays full origin compute, and a CDN only removes distance for what it can cache — personalization cookies and uncached HTML turn it into an expensive proxy. Uploads served from local disk stay fine until images dominate bandwidth or the disk fills.
  6. Disk. One volume holds database, WAL, uploads and logs (rotation caps at 20MB × 14, about 280MB). Hobby boxes tend to die of disk long before they die of traffic — observation, not benchmark.
  7. Observability. Error tracking sits behind an optional SENTRY_DSN, and there are no metrics or alerts, so at 100k it felt slow becomes undiagnosable. Request logs, an error tracker and one queue-latency signal are the floor.
  8. Then read scaling. Hot catalog reads dominate, and the next tier answers with a full-page cache, Redis and a read replica — not a service split.

Two numbers for the honesty check: 99% uptime is about 7.3 hours a month, 99.9% about 43 minutes. At this tier, 99% plus honest status comms is defensible — and knowing when to split a monolith starts with watching this list, not reading trend posts.

The tripwires worth watching on one box

Four signals, no observability platform: healthcheck 503s, request logs (JSON, capped — ship them somewhere), an error tracker with the DSN actually set, and queue latency the moment you add a queue. What's the first thing you'd pull out of your own stack if it broke at 3am? Tell me.

What does the next tier change — and what must it not change?

Add a CDN or full-page cache in front of the catalog read path, Redis for sessions and hot data, a real job queue, a read replica or a bigger primary, metrics with alerts, and failover inside one region — and change nothing about the service topology, because splitting into services belongs to the tier above this one.

Every item is a capacity answer to the break order above: cache for origin load, Redis for state that outlives one process, a queue for jobs, a replica for read scaling, metrics so the next tripwire is visible before a customer is. None requires a second deployable. The citations for holding the line stay the ones already named — Fowler's microservice premium, Shopify's modular-monolith write-up — plus the live evidence that the commerce-subsystem extraction is specified as one deployable, with microservices rejected as an ops multiplier for one tenant. When to split a monolith is a question about team size, multi-tenancy and complexity, not a birthday you celebrate at 100k users.

What should you do this week?

Stand up the one-service shape — Compose file, SQLite file, hosted Checkout, file backup with a rehearsed restore — and let a tripwire, not a trend, tell you when to change it. When a monolith stops being enough is the ledger of what that change costs.

Concretely: one Compose service behind a reverse proxy; WAL plus a sane busy_timeout; a webhook that verifies signatures and swallows duplicates; a healthcheck you probe; rate limits on login; a backup that has restored this month.

This is my production store: the healthcheck I probe, the restore I rehearse, the $5–15 a month I pay — one server, one process, and a list of tripwires instead of an architecture roadmap. Scale that shape up and you get the same packaging convenience, at cluster scale.

The next tier keeps this monolith whole and adds the cache, the queue and the metrics. Ecommerce at 100k users is the next post in this series.

Related Reading