<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jagruthi on Medium]]></title>
        <description><![CDATA[Stories by Jagruthi on Medium]]></description>
        <link>https://medium.com/@jagruthi.bollempali?source=rss-110f236c6c63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gxXbEp6whHpDzAVs</url>
            <title>Stories by Jagruthi on Medium</title>
            <link>https://medium.com/@jagruthi.bollempali?source=rss-110f236c6c63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:24:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jagruthi.bollempali/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Multi-Region Production-Grade Synthetic Monitoring — How I Built It at a Fraction of Enterprise…]]></title>
            <link>https://medium.com/@jagruthi.bollempali/multi-region-production-grade-synthetic-monitoring-how-i-built-it-at-a-fraction-of-enterprise-d97c224c0eba?source=rss-110f236c6c63------2</link>
            <guid isPermaLink="false">https://medium.com/p/d97c224c0eba</guid>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[apm]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[synthetic-monitoring]]></category>
            <dc:creator><![CDATA[Jagruthi]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 06:20:44 GMT</pubDate>
            <atom:updated>2026-01-09T07:54:44.640Z</atom:updated>
            <content:encoded><![CDATA[<h3>Multi-Region Production-Grade Synthetic Monitoring — How I Built It at a Fraction of Enterprise Cost</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaxBMmukSAdYuvHt4qpUBg.png" /></figure><p>Our team was evaluating synthetic monitoring solutions for 100+ URLs across multiple regions. The enterprise quotes ranged from $1,500 to $3,000 per month. That’s when I asked myself: What if I could build enterprise-grade synthetic monitoring in-house?</p><p>Spoiler alert: Today, it’s used in live monitoring. And it costs $120–150 per month to run across 10 global regions.</p><p><strong>What I built:</strong></p><ul><li>Browser-based synthetic testing with real Chrome</li><li>Network request &amp; API call monitoring during page loads</li><li>24/7 uptime/downtime alerting (&lt; 1 minute response)</li><li>Multi-step clickpath testing</li><li>Multi-region monitoring</li><li>Real-time Prometheus metrics + Grafana dashboards</li></ul><p><strong>What is Synthetic Monitoring (And Why Should You Care)?</strong></p><p>Before diving into the technical details, let’s establish what synthetic monitoring actually does. Unlike traditional monitoring that waits for real users to encounter problems, synthetic monitoring proactively tests your websites and applications from different locations around the world.</p><p>Think of it as having a team constantly checking if your:</p><ul><li><strong>Websites</strong> load fast and correctly</li><li><strong>API calls</strong> made during page loads are responding properly</li><li><strong>Critical user journeys</strong> (login, checkout, search) work properly</li><li><strong>Websites</strong> are up and accessible from different regions</li></ul><p>For any business with a web presence, downtime or slow performance directly impacts revenue. Synthetic monitoring catches these issues, including silent backend failures, before your customers do.</p><p><strong>Build vs Buy</strong></p><p>The traditional wisdom in software is “don’t build what you can buy.” But when the cost difference is significant, it’s worth reassessing whether a commercial solution fits for a given team’s scale, flexibility needs, and operational maturity.</p><p>Here’s the math that made me reconsider:</p><p>Enterprise Solution Annual Cost: $18,000 — $36,000<br>SyntheticEye Annual Cost: $1,440 — $1,800<br>Annual Savings: $16,200 — $34,560</p><p><em>Note: Enterprise pricing based on publicly available list prices for synthetic monitoring solutions (typically $10–15 per monitor per month). Enterprise tools often justify this pricing through managed operations, support SLAs, advanced analytics, and reduced internal maintenance overhead.</em></p><p>But beyond the cost savings, building an in-house solution gave us something priceless: complete control.</p><h4>Architecture: Keeping It Simple (But Not Too Simple)</h4><p>I’m a firm believer in the KISS principle. SyntheticEye follows a hub-and-spoke architecture that’s easy to understand and maintain.</p><p><strong>Why build from scratch?</strong> When I researched existing solutions, I found single-node monitoring tools, but no open-source solution existed for true multi-region synthetic monitoring with centralised management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*E6mzGG5SNNHs5XwORSDn8Q.png" /><figcaption>SyntheticEye hub-and-spoke architecture showing central hub connected to agents across 10 global regions with AWS S3 and SES integration</figcaption></figure><p><strong>The Hub handles:</strong></p><ul><li>Web dashboard for configuration and visualization</li><li>User authentication and authorization</li><li>Results aggregation from all agents</li><li>Email alerting when agents are not available</li><li>Prometheus metrics and Grafana dashboards</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaxHhxQkLWTg5CrW1758oQ.png" /><figcaption>Production monitoring dashboard displaying 127 monitored URLs with 124 healthy, global agent status map, and recent alerts timeline</figcaption></figure><p><strong>The Agents handle:</strong></p><ul><li>Pulling configuration from AWS S3</li><li>Running browser-based tests using Puppeteer</li><li>Capturing performance metrics</li><li>Taking and storing screenshots</li><li>Email alerting when thresholds are breached</li><li>Pushing metrics to Prometheus</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6QILRLyeVd9AsUodGwl5jg.png" /><figcaption>Performance metrics dashboard showing 1.8s average load time, P95 at 3.2s, 245ms TTFB, and 99.2% success rate across regions</figcaption></figure><p><strong>Technology Choices: Standing on Giants’ Shoulders</strong></p><p>I didn’t reinvent the wheel. Instead, I combined battle-tested open-source technologies:</p><p><strong>Node.js + Puppeteer</strong></p><p>The heart of each agent is Puppeteer — Google’s headless Chrome automation library. It gives us:</p><ul><li>Real browser testing (not just curl requests)</li><li>Full network waterfall capture</li><li>Actual user experience metrics</li><li>Screenshot capabilities</li></ul><pre>const browser = await puppeteer.launch({<br>  headless: true,<br>  args: [<br>    &#39;--no-sandbox&#39;,<br>    &#39;--disable-setuid-sandbox&#39;,<br>    &#39;--disable-dev-shm-usage&#39;<br>  ]<br>});</pre><pre>const page = await browser.newPage();</pre><p><strong>AWS S3 for Configuration</strong></p><p>Instead of building a database, I used S3 as a simple JSON store. Agents poll a configuration file every 10 minutes:</p><pre>{<br>  &quot;homepage&quot;: {<br>    &quot;url&quot;: &quot;https://example.com&quot;,<br>    &quot;location&quot;: &quot;london&quot;,<br>    &quot;threshold&quot;: &quot;3s&quot;,<br>    &quot;type&quot;: &quot;browser&quot;,<br>    &quot;networkPreset&quot;: &quot;4G&quot;,<br>    &quot;alertEnabled&quot;: true<br>  }<br>}</pre><p>This approach is:</p><ul><li>Highly available (99.999999999% durability)</li><li>Virtually free</li><li>Version-controlled (S3 versioning)</li><li>Cacheable</li></ul><p><strong>Prometheus for Metrics</strong></p><p>Instead of building a time-series database, I used Prometheus — the industry standard for metrics:</p><pre>// metrics we track<br>const websiteLoadTime = new promClient.Gauge({<br>  name: &#39;website_load_time&#39;,<br>  help: &#39;Time taken to load website in milliseconds&#39;,<br>  labelNames: [&#39;url&#39;, &#39;location&#39;]<br>});<br>const thresholdViolation = new promClient.Gauge({<br>  name: &#39;threshold_violation&#39;,<br>  help: &#39;Whether the load time exceeded threshold&#39;,<br>  labelNames: [&#39;url&#39;, &#39;location&#39;]<br>});</pre><p>This gives us free integration with Grafana for beautiful dashboards.</p><h4>The Features That Matter</h4><p><strong>1. Multi-Region Testing</strong></p><p>Each agent runs in a different AWS region across the globe:</p><ul><li>Americas: US East, US West</li><li>Europe: London, Paris</li><li>Asia Pacific: Mumbai, Singapore, Tokyo, Sydney</li><li>Canada: Central</li></ul><p>This tests real geographic performance from different locations worldwide, not just whether your site is “up.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1V5wjxNvktcrTycfyMTApQ.png" /><figcaption>Multi-region status dashboard displaying real-time performance metrics for 10 global regions including US-East, London, Mumbai, Tokyo, and Sydney</figcaption></figure><p><strong>2. Critical API Call Monitoring</strong></p><p>During page load, SyntheticEye captures and analyzes every network request:</p><pre>// Captured during browser test<br>const capturedRequests = [<br>  {<br>    url: &quot;https://api.example.com/user/profile&quot;,<br>    method: &quot;GET&quot;,<br>    status: 200,<br>    duration: 245,<br>    type: &quot;xhr&quot;,<br>    size: 1024<br>  },<br>  {<br>    url: &quot;https://api.example.com/products&quot;,<br>    method: &quot;POST&quot;,<br>    status: 200,<br>    duration: 890,<br>    type: &quot;fetch&quot;<br>  }<br>]</pre><p>This is critical because:</p><ul><li>Frontend might load, but backend APIs could be failing</li><li>Identifies slow API responses affecting user experience</li><li>Catches authentication or authorization failures</li><li>Provides a full network waterfall for debugging</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eYL7OVbq_20nfvfpP9N7JQ.png" /><figcaption>Network waterfall view showing 42 HTTP requests during page load with 18 API calls, timing breakdown, and one failed request highlighted</figcaption></figure><p><strong>3. Site Up/Down Monitoring with Instant Alerts</strong></p><p>Real-time uptime monitoring with immediate notifications:</p><pre>const uptimeCheck = {<br>  url: &quot;https://example.com&quot;,<br>  type: &quot;uptime&quot;,<br>  interval: &quot;1m&quot;,  // Check every minute<br>  timeout: &quot;10s&quot;,<br>  alerting: {<br>    emailEnabled: true,<br>    emailTo: &quot;mail@example.com&quot;,<br>    alertOnFailure: true,<br>    failureThreshold: 3  // Alert after 3 consecutive failures<br>  }<br>};</pre><p>When a site goes down:</p><ul><li>Alert fires within 30 seconds</li><li>Email includes error details and a screenshot</li><li>Recovery notification sent when the site is back</li><li>Full incident timeline tracked</li></ul><p><strong>4. Clickpath Testing</strong></p><p>Beyond simple page loads, agents can execute multi-step user journeys:</p><pre>const clickPath = [<br>  {<br>    action: &quot;click&quot;,<br>    selector: &quot;.login-button&quot;,<br>    threshold: &quot;2s&quot;,<br>    name: &quot;Open Login Modal&quot;<br>  },<br>  {<br>    action: &quot;type&quot;,<br>    selector: &quot;#username&quot;,<br>    value: &quot;testuser&quot;,<br>    name: &quot;Enter Username&quot;<br>  },<br>  {<br>    action: &quot;click&quot;,<br>    selector: &quot;.submit-button&quot;,<br>    threshold: &quot;5s&quot;,<br>    name: &quot;Submit Login&quot;<br>  }<br>];</pre><p>This catches issues in critical workflows like checkout, signup, or search.</p><p><strong>5. Network Throttling</strong></p><p>Testing on your gigabit office connection doesn’t reflect reality. Agents simulate real network conditions:</p><pre>const NETWORK_PRESETS = {<br>  &#39;4G&#39;: {<br>    downloadThroughput: (20 * 1024 * 1024) / 8,  // 20 Mbps<br>    uploadThroughput: (10 * 1024 * 1024) / 8,    // 10 Mbps<br>    latency: 40                                   // 40ms<br>  },<br>  &#39;3G&#39;: {<br>    downloadThroughput: (5 * 1024 * 1024) / 8,   // 5 Mbps<br>    uploadThroughput: (1 * 1024 * 1024) / 8,     // 1 Mbps<br>    latency: 100                                  // 100ms<br>  }<br>};</pre><h4>Infrastructure</h4><p>The entire platform runs on AWS with straightforward infrastructure:</p><pre>Hub:<br>  - 1x reserved EC2 instance<br>  - Express.js dashboard<br>  - Prometheus Pushgateway<br>  <br>Agents (10 regions):<br>  - 10x reserved EC2 instances<br>  - Puppeteer + monitoring scripts<br>  <br>Shared Services:<br>  - S3 bucket for config + screenshots<br>  - Application Load Balancer (optional)<br>  - Amazon SES for email alerts</pre><pre>Total: ~$120-150/month for 10-region deployment</pre><p><strong>Cost Optimisation Tip</strong>: Using AWS Reserved Instances (1–3 year commitment) reduces costs by 40–60% compared to on-demand pricing. For a production monitoring system that runs 24/7, this is an easy decision that brings monthly costs from $200+ down to $120–150.</p><h4>The Hidden Complexity</h4><p>While the architecture appears straightforward, production reality required solving:</p><p><strong>Distributed Systems Challenges:</strong></p><ul><li>Agent health monitoring with automatic recovery</li><li>Network partition handling across regions</li><li>Time synchronization for accurate alerting</li><li>Graceful degradation when regions fail</li></ul><p><strong>Reliability Engineering:</strong></p><ul><li>Circuit breakers for S3 and Prometheus</li><li>Exponential backoff for failed tests</li><li>Deduplication of alerts across agents</li><li>Screenshot storage lifecycle management</li></ul><p><strong>Performance at Scale:</strong></p><ul><li>Puppeteer memory leak prevention</li><li>Concurrent test execution without resource exhaustion</li><li>Metric aggregation for 100+ URLs × 10 regions</li><li>Log streaming and retention policies</li></ul><p>These weren’t initial requirements — they emerged from running this in live monitoring.</p><h4>The Results: Enterprise Features at 1% of the Cost</h4><p>After six months in production, here’s what the system delivers:</p><p><strong>Real-World Impact:</strong></p><p>During recent CloudFront and Cloudflare outages that affected thousands of websites globally, SyntheticEye detected the issues within 60 seconds across multiple regions and fired alerts immediately — before our business teams noticed, before customer complaints started, and before the CDN providers’ status pages even updated.</p><p><strong>By the numbers:</strong></p><p><strong>Cost Savings</strong></p><ul><li>Monthly cost: $120–150 (vs $1,500–3,000 for enterprise solutions)</li><li>90–95% cost reduction</li><li>$16,000–34,000+ annual savings</li></ul><p><strong>Reliability</strong></p><ul><li>99.9% agent uptime</li><li>Average test execution: 10 seconds</li><li>Zero data loss</li></ul><p><strong>Coverage</strong></p><ul><li>100+ URLs monitored</li><li>10 geographic regions</li><li>10-minute test intervals</li><li>30+ clickpath journeys</li><li>Network request &amp; API call tracking</li><li>24/7 uptime/downtime alerting</li></ul><p><strong>Value Delivered</strong></p><ul><li>Caught critical issues before customers</li><li>Detected failing API calls during page loads</li><li>Site downtime alerts in &lt; 1 minute</li><li>Zero false positives</li></ul><h4>Conclusion: Sometimes DIY Is the Right Choice</h4><p>SyntheticEye proves that with modern open-source tools and cloud infrastructure, you can build enterprise-grade monitoring with global coverage for a fraction of enterprise costs.</p><p>The key lessons:</p><ol><li><strong>Combine existing tools</strong> instead of building from scratch</li><li><strong>Start simple</strong> and add complexity only when needed</li><li><strong>Focus on value</strong> (monitoring that works) over features (monitoring that impresses)</li><li><strong>Use managed services</strong> (S3, SES) to minimize operational burden</li></ol><p>This approach won’t be right for every team, particularly those that prioritize fully managed services, vendor support, or faster time-to-value.</p><p><em>Note: This article presents the architectural overview and key technical decisions. Specific implementation details, proprietary optimizations, and production configurations have been generalized or omitted to protect the product’s intellectual property. All code examples and configurations are illustrative.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d97c224c0eba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>