Every developer knows the frustration of using legacy network utility sites. You just want to check an ASN routing path, look up a public IP, or verify a WebRTC STUN leak—and you're instantly bombarded with autoplaying video ads, massive layout shifts, intrusive cookie modals, and arbitrary CAPTCHAs.
I wanted a completely clean, ad-free, dark-mode alternative engineered for developers and sysadmins. So, I built IPSuite.io.
But as an architect, the fun part wasn't just building the UI—it was designing a cloud infrastructure that could handle rapid-fire client diagnostic requests at global scale while keeping my recurring monthly AWS bill under two bucks.
Here’s the architectural teardown of how I leveraged AWS Edge functions to build a zero-maintenance, highly scalable network toolkit for a current operational cost of exactly $1.71/month.
The Infrastructure Blueprint
The setup avoids expensive, always-on EC2 instances, containers, or bloated server-side compute layers altogether.
[ Client Browser ]
|
v (HTTPS Request)
[ AWS CloudFront Edge ] <---> [ AWS WAF Bot Control ]
|
+---> [ CloudFront Functions ] (SPA Trailing-Slash Resolution)
|
+---> [ S3 Bucket ] (Pre-rendered Static Astro Assets - Zero JS Hydration)
1. The Rendering Layer: Astro Static Builds
I chose Astro for the frontend. For a diagnostic utility suite, client-side hydration is an anti-pattern. If a user lands on a page to check their IP, they shouldn’t have to wait for a massive React or Next.js bundle to execute before seeing results.
Astro pre-renders the entire framework-less HTML layout at build time. When a user hits the site, the core page structure renders instantly on the first pass of the browser or crawler.
Interactive diagnostic modules (like the live ping chart or canvas fingerprinting tools) are encapsulated into lightweight, isolated Web APIs or minimal client scripts that only execute when needed.
2. Eliminating S3 Read Costs with CloudFront Functions
Hosting static assets on Amazon S3 is cheap, but SPA setups introduce inefficiencies. Handling trailing slashes or routing fallbacks natively in S3 often requires public website hosting or origin hits on refresh—leading to unnecessary data transfer and GET request costs.
To avoid this, I moved routing logic to AWS CloudFront Functions at the edge.
function handler(event) {
var request = event.request;
var uri = request.uri;
// Handle trailing slash resolution at the edge
if (uri.endsWith('/')) {
request.uri += 'index.html';
} else if (!uri.includes('.')) {
request.uri += '/index.html';
}
return request;
}
Because this logic executes at the edge, S3 never receives unnecessary read requests. CloudFront caches the statically generated HTML, resulting in a high cache hit ratio and keeping my S3 bill at a perfect $0.00.
3. Defeating the "Denial-of-Wallet" on the Ping Test Visualizer
The trickiest challenge was the Live Ping & Jitter Visualizer.
To calculate real-time connection stability, variance, and packet loss, the client browser must rapidly send HTTP requests to the infrastructure.
At scale, this creates two problems:
- AWS WAF Bot Control may flag these as Layer 7 DDoS or bot activity, blocking legitimate users.
- High request volume increases WAF rule evaluation costs significantly.
To solve this, I isolated a dedicated lightweight endpoint: /ping.txt.
I then created a custom WAF scope-down rule for this endpoint:
- Strip query strings and session headers at the edge
- Skip deep packet inspection and bot profiling for this path
This allows high-frequency ping requests without triggering WAF defenses or inflating costs.
This single optimization keeps the WAF cost at just $1.21/month while maintaining functionality.
The $1.71 Monthly Bill — Real Breakdown
From my AWS billing dashboard (June 2026):
- Route 53: $0.50 (fixed hosted zone cost)
- AWS WAF: $1.21 (after optimization)
- Amazon S3: $0.00 (no billable reads)
- CloudFront: $0.00 (within free tier)
Total: $1.71/month
Note: This excludes the annual domain registration fee. This is purely the operational cost.
Lessons Learned for Indie Builders
1. Push logic to the edge early
CloudFront Functions are limited (no async/await, strict size limits), but they’re perfect for URL rewriting, header manipulation, and lightweight logic. Moving compute closer to the user drastically reduces origin costs.
2. Align infrastructure with monetization
If your product is free, your infrastructure cost curve must stay flat. Static pre-rendering + aggressive caching ensures that traffic spikes (from Reddit, Hacker News, etc.) cost pennies instead of triggering scaling issues.
The suite is live at IPSuite.io.
I’d love to hear how others are handling high-frequency request patterns or cost optimization strategies in AWS architectures.
Top comments (0)