Static Site Hosting
Delivery of pre-rendered websites and assets via CDN, object storage or edge platforms to minimize runtime servers and operational costs.
Classification
- ComplexityMedium
- Impact areaTechnical
- Decision typeArchitectural
- Organizational maturityIntermediate
Technical context
Principles & goals
Use cases & scenarios
Compromises
- Misconfigured caches lead to stale content
- Insufficient protection of the build pipeline compromises content
- Dependency on third-party CDNs can increase outage risk
- Minify assets, optimize images and use modern formats
- Combine cache strategies using Cache-Control and asset versioning
- Integrate automated tests and security checks in CI
I/O & resources
- Source repository with static assets
- Static site generator or build tool
- Domain, certificates and DNS access
- Public URL(s) with CDN delivery
- Versioned artifacts and rollback points
- Monitoring and logging metrics
Description
Static Site Hosting delivers pre-rendered HTML, CSS and asset bundles from object storage, CDNs or edge platforms, minimizing runtime servers. This approach improves latency, reduces attack surface and operating costs, and simplifies scaling. Common use cases include marketing sites, documentation, blogs and product landing pages with minimal server-side logic.
✔Benefits
- Low operational costs due to eliminated runtime servers
- Improved performance via CDN distribution
- Reduced attack surface and simpler hardening
✖Limitations
- Limited support for server-side per-request logic
- Complexity for dynamic, personalized content
- Cache invalidation and consistency can be challenging
Trade-offs
Metrics
- Time to First Byte (TTFB)
Measures time until first byte; indicator for delivery latency.
- Cache hit rate
Percentage of requests served from CDN cache.
- Monthly operational cost
Sum of storage, CDN and function invocation costs per month.
Examples & implementations
Open-source project site on GitHub Pages
Repository uses GitHub Actions to build and automatically publish the site via GitHub Pages.
Product docs on S3 + CloudFront
Documentation is uploaded to S3 via CI and distributed globally via CloudFront.
Marketing landing page on Vercel
Landing page uses an SSG and runs on an edge platform for minimal latency.
Implementation steps
Choose a static site generator and set up local builds
Automate build in CI with artifact upload
Configure CDN, TLS and DNS and test cache behavior
⚠️ Technical debt & bottlenecks
Technical debt
- Monolithic build pipelines with long build times
- Legacy assets without a versioning scheme
- Distributed, undocumented cache-bypass workarounds
Known bottlenecks
Misuse examples
- Attempting to run highly personalized user dashboards purely statically
- Serving time-critical API data via static caches
- Insufficient pipeline security leading to secrets in builds
Typical traps
- Wrong cache TTLs cause users to see stale content
- Untested CDN configuration breaks resource delivery
- Missing monitoring alerts for deployment failures
Required skills
Architectural drivers
Constraints
- • Limited support for server-side authentication
- • Dependency on third-party CDNs and storage providers
- • Constraints for content personalization