Websites · 11 min read

How to Build a Website That Handles 100K Visits Without Crashing

scalable website - How to Build a Website That Handles 100K Visits Without Crashing

A scalable website is not about buying more server capacity the night before a traffic spike. It is about choosing an architecture that distributes load, caches aggressively, and degrades gracefully so that 100,000 visits feel the same to your infrastructure as 1,000. The decisions that determine this are made before a single line of code is written.

Why Most Sites Fail at Scale

Most sites in the $1M–$50M revenue range are running on a single origin server, a shared database, and a WordPress install that was never designed to absorb a traffic surge. The founder gets a mention in a newsletter, a product hunt launch lands, or a paid campaign fires — and the site goes down. Every minute of downtime during a spike is the worst possible minute to be unavailable: the audience is warm, the intent is high, and the bounce is permanent.

The failure is almost never the server itself. It is the architecture around it. Dynamic page generation on every request, no caching layer, a database that serialises reads, and assets served from the origin instead of an edge network. These are design choices, not bad luck. Building a scalable website means eliminating each of those choices deliberately.

The Scalable Website Architecture That Actually Holds

A scalable website separates concerns: content generation happens at build time or at the edge, not on every user request. The three-layer model that holds under real traffic looks like this:

  • Static or pre-rendered HTML served from a CDN edge node — no PHP, no database query, no server-side render on the critical path.
  • An API layer for dynamic data (pricing, inventory, personalisation) that is independently scaled and rate-limited.
  • An origin server or serverless function that only handles requests the edge cannot — authenticated sessions, form submissions, webhooks.

This is the architecture behind every high-traffic site that does not crash. It is not exotic. Frameworks like Astro, Next.js with static export, and Nuxt all support it out of the box. The question is whether your team has actually configured it that way, or whether you are still generating every page dynamically on every hit.

Static Rendering vs. Server-Side Rendering

Static rendering wins for marketing pages, blog posts, and landing pages — anything where the content does not change per user. The HTML is generated once at deploy time and cached everywhere. Server-side rendering (SSR) is appropriate for authenticated dashboards or real-time data. The mistake is using SSR for pages that could be static, because SSR multiplies origin load linearly with traffic. A scalable website uses static rendering as the default and SSR only where it is genuinely required.

Incremental Static Regeneration

If your content changes frequently — product pages, blog feeds, pricing — incremental static regeneration (ISR) is the middle path. The page is served as static HTML, but the CDN revalidates it in the background on a schedule you control. Visitors always get a fast response. The origin only regenerates the page once per interval, not once per visitor. This is how a scalable website handles a catalogue of thousands of pages without a full rebuild on every content change.

CDN and Edge Delivery

A content delivery network is not optional for a scalable website — it is the primary load-bearing layer. A CDN caches your static assets and HTML at edge nodes distributed globally. A visitor in Sydney hits a node in Sydney, not your origin server in Virginia. Latency drops. Origin load drops. The site stays up when traffic spikes because the spike is absorbed by hundreds of edge nodes, not one server.

Cloudflare, Fastly, and AWS CloudFront are the three serious options at this scale. Cloudflare is the default choice for most companies in this revenue range: the free tier handles significant traffic, the DDoS protection is automatic, and the configuration is straightforward. The critical setting most teams miss is cache TTL. If your CDN is set to cache for five minutes, a traffic spike still hammers your origin every five minutes. Set static assets to cache for a year. Set HTML pages to cache for at least an hour, with background revalidation.

Database and Origin Server Pressure

Even with a CDN in front, some requests will reach your origin. The database is almost always the bottleneck. A single unindexed query on a table with 500,000 rows can hold a connection open for two seconds. At 50 concurrent users hitting that query, you have 100 seconds of blocked connections. The site appears to hang.

Read Replicas and Connection Pooling

Two changes fix most database pressure problems. First, add a read replica and route all read queries to it. Your primary database handles only writes. Second, add a connection pooler — PgBouncer for PostgreSQL is the standard — so that your application does not open a new database connection on every request. Without pooling, a traffic spike exhausts your connection limit before it exhausts your CPU. These are not advanced techniques. They are table stakes for any scalable website serving more than a few thousand concurrent users.

Caching at the application layer is the third lever. Redis or Memcached can cache the result of expensive queries for 60 seconds. If 500 users hit the same product page in one minute, the database query runs once and the other 499 requests are served from cache. This is where most of the performance gain comes from in practice.

Core Web Vitals and Performance Baselines

Performance is not just a user experience concern — it is a ranking signal and a conversion signal. Google’s Core Web Vitals measure three things that matter directly to whether your scalable website converts: Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). The thresholds are specific: LCP under 2.5 seconds, INP under 200 milliseconds, CLS under 0.1. Sites that pass all three convert measurably better than sites that do not.

LCP is almost always determined by your hero image or the largest above-the-fold element. Serve it from the CDN, use a modern format (WebP or AVIF), and preload it in the document head. INP is determined by JavaScript execution time on the main thread — the most common culprit is a bloated third-party tag manager loading six analytics scripts synchronously. CLS is caused by images and embeds without explicit dimensions, and by fonts that swap after layout. Fix the dimensions. Use font-display: optional or preload your web fonts.

Before vs. After Architecture Comparison

Dimension Typical Before State Scalable Website After
Page rendering Dynamic PHP/SSR on every request Static HTML from CDN edge
Asset delivery Origin server, single region CDN, global edge nodes
Database Single instance, no pooling Read replica + PgBouncer + Redis cache
Cache TTL (HTML) No-cache or 5 minutes 1 hour + background revalidation
Traffic spike behaviour Origin overwhelmed, site down Edge absorbs spike, origin unaffected
LCP (median) 4–8 seconds Under 2.5 seconds
Monthly infrastructure cost $400–$1,200 (oversized server) $80–$300 (CDN + small origin)

What Breaks First and How to Find It

Load testing before a launch is not optional if you expect a traffic event. Tools like k6, Locust, or Artillery let you simulate 10,000 concurrent users against your staging environment and watch exactly where the system degrades. The failure mode is almost always one of three things: the database connection pool exhausts, a third-party API times out and blocks the render, or a missing CDN cache rule sends everything to the origin.

Run the test, watch your metrics, and fix the first thing that breaks. Then run it again. A scalable website is not one that never breaks under load — it is one where you have already broken it in staging and fixed the failure modes before they hit production. This is the difference between a site that survives a Product Hunt launch and one that goes down in the first ten minutes.

Monitoring and Alerting

Instrumentation is part of the architecture. You need three things running in production: uptime monitoring with a sub-minute check interval (Better Uptime or Checkly), real-user monitoring for Core Web Vitals (Vercel Analytics, Datadog RUM, or Cloudflare Web Analytics), and error tracking (Sentry). Without these, you find out your site is down when a customer emails you. With them, you find out in 30 seconds and can act before the spike peaks.

The Business Cost of Getting This Wrong

A scalable website is a revenue protection decision, not a technical one. Consider the economics: if your site converts at 3% and your average contract value is $5,000, then 1,000 visitors during a spike represent $150,000 in pipeline. If the site is down for 20 minutes of that spike, you lose a material fraction of that pipeline permanently — those visitors do not come back. The cost of the CDN configuration and the read replica that would have prevented it is under $200 a month.

The same logic applies to SEO. A site that is slow or intermittently unavailable accumulates crawl errors, loses Core Web Vitals scores, and drops in rankings over time. The compounding effect of a poorly architected site is not just the traffic you lose during the spike — it is the organic traffic you fail to build in the months after. If you are investing in a website architecture that ranks and converts, the infrastructure underneath it has to be able to hold the traffic that architecture earns.

Founders in this revenue range often treat infrastructure as a cost to minimise. The correct frame is that a scalable website is the floor on which every other growth investment stands. Paid acquisition, SEO, content — all of it leaks value if the site cannot hold the traffic it generates.

If you want to pressure-test your current setup or build a scalable website from the ground up, Studio Máté is worth a conversation.

FAQ

How much traffic can a standard WordPress site handle before it crashes?

An unoptimised WordPress site on shared hosting typically struggles above 200–500 concurrent users. With a CDN, object caching (Redis or Memcached), and a properly sized server, the same WordPress install can handle several thousand concurrent users. The ceiling is not the CMS — it is the architecture around it. A scalable website built on WordPress is entirely possible; it just requires deliberate configuration.

Is a scalable website significantly more expensive to build and run?

No — and in many cases it is cheaper. A well-architected scalable website offloads most traffic to a CDN, which means the origin server can be smaller and cheaper. The infrastructure cost typically drops from $400–$1,200 per month for an oversized single server to $80–$300 per month for a CDN plus a modest origin. The build cost is higher upfront, but the ongoing cost is lower and the failure risk is dramatically reduced.

What is the single highest-impact change for a site that keeps going down under load?

Put a CDN in front of it and set aggressive cache TTLs on your HTML pages. This single change absorbs the majority of traffic before it reaches your origin. If your pages are already cached at the edge, a 10x traffic spike has almost no effect on your server. Everything else — read replicas, connection pooling, ISR — is important, but CDN caching is the highest-leverage first step for a scalable website.

Does site speed affect SEO rankings directly?

Yes. Google uses Core Web Vitals as a ranking signal, and a scalable website that passes LCP, INP, and CLS thresholds has a measurable advantage over one that does not. Beyond rankings, speed affects conversion rate: a one-second improvement in LCP is consistently associated with higher engagement and lower bounce rates across published industry studies. The SEO and conversion benefits compound over time.

When should a founder invest in a full infrastructure rebuild vs. incremental fixes?

Incremental fixes — CDN, caching, image optimisation — are the right first move and often solve 80% of the problem. A full rebuild makes sense when the underlying framework is fundamentally incompatible with static rendering (some legacy monoliths), when the database schema is so denormalised that query optimisation cannot help, or when the site is being rebuilt anyway for other reasons. Most founders in the $1M–$50M range do not need a rebuild — they need their current stack configured correctly as a scalable website.

← Back to all articles