r/statichosting • u/Standard_Scarcity_74 • Dec 15 '25
Lessons learned serving large static JSON datasets at scale
After running a static site that ships fairly large JSON datasets to the client, I’ve learned that “just put it on a CDN” stops working surprisingly fast once files grow or usage patterns change.
What caught me off guard wasn’t bandwidth, but parse time, memory pressure, and cache invalidation. Even with gzip or brotli, a single large JSON payload can block the main thread longer than expected, especially on lower-end devices. Splitting data by access patterns rather than by logical structure helped a lot. Smaller files that map to actual user flows load more predictably than one big canonical dataset.
Another lesson was that versioning matters more than freshness. Immutable, content-hashed JSON files cached aggressively performed better than trying to update the same URLs frequently. Letting clients opt into newer versions instead of forcing updates reduced breakage and made debugging easier.
Curious how others here handle large static data. Are you streaming JSON, using binary formats, or just drawing a hard line on dataset size?