<?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 Nikhil Mankani on Medium]]></title>
        <description><![CDATA[Stories by Nikhil Mankani on Medium]]></description>
        <link>https://medium.com/@nikhilsmankani?source=rss-c690f8eb96fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OpUP60ZatXFhBIG-BZFbNA.jpeg</url>
            <title>Stories by Nikhil Mankani on Medium</title>
            <link>https://medium.com/@nikhilsmankani?source=rss-c690f8eb96fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:01:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nikhilsmankani/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[The Secret Recipe Behind Effortless Scalability: Cloud Run Services, Jobs, and Worker Pools in…]]></title>
            <link>https://medium.com/@nikhilsmankani/the-secret-recipe-behind-effortless-scalability-cloud-run-services-jobs-and-worker-pools-in-a900772b1aba?source=rss-c690f8eb96fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a900772b1aba</guid>
            <dc:creator><![CDATA[Nikhil Mankani]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 00:49:28 GMT</pubDate>
            <atom:updated>2025-11-11T00:49:28.190Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Secret Recipe Behind Effortless Scalability: Cloud Run Services, Jobs, and Worker Pools in Harmony</h3><p>If you’ve ever tried to orchestrate a symphony of microservices, background tasks, and compute-heavy jobs on the cloud, you know it can feel like juggling flaming swords while riding a unicycle. Google Cloud’s <strong>Cloud Run</strong> has made that act a whole lot easier — and with the trio of <strong>Cloud Run Services</strong>, <strong>Cloud Run Jobs</strong>, and <strong>Worker Pools</strong>, you can build systems that scale, adapt, and perform like a well-trained orchestra.</p><p>Let’s explore how these three pieces fit together and why this trifecta can make your architecture both elegant and unstoppable.</p><h3>The Cloud Run Service: The Performer</h3><p>Think of the <strong>Cloud Run Service</strong> as your main performer — the star of the show. It handles real-time requests, scales down to zero when no one’s watching, and bursts back to life the moment an HTTP request arrives. Whether you’re serving an API, a webhook, or an AI inference endpoint, this service is your on-demand stage presence.</p><p>Under the hood, it’s fully managed, container-based, and integrates directly with Cloud Load Balancing, IAM, and Secret Manager. You just focus on writing your code, package it into a container, and deploy. Cloud Run takes care of scaling, traffic splitting, and revision management with grace. It’s like DevOps magic without the 2 a.m. pager alerts.</p><h3>The Cloud Run Job: The Stage Crew</h3><p>Every performance needs a capable backstage crew — and that’s where <strong>Cloud Run Jobs</strong> step in. Jobs run containers that perform something once (or on demand) instead of all the time. Think of generating daily reports, cleaning up stale data, retraining an ML model, or batch-processing a billion records overnight.</p><p>The best part? These jobs share the same runtime model as Cloud Run Services. You don’t have to switch environments or reinvent your deployment process. You containerize once, and you can deploy to both Services and Jobs without rewriting your world.</p><p>Here’s a fun use case: when a user uploads a large video file to your platform (handled by a Cloud Run Service), your system spins up a Cloud Run Job asynchronously to process and transcode the video into multiple formats. The show goes on, smoothly and quietly, behind the curtain.</p><h3>The Worker Pool: The Backup Band</h3><p>Now comes the rhythm section — <strong>Cloud Run Worker Pools</strong>, a newer addition designed for those long-running, event-driven, and high-throughput workloads that need finer-grained control over concurrency and scaling behavior.</p><p>Worker Pools are ideal when you have a backlog of messages, files, or events to process, but you don’t want to burden your main services. They pull tasks from a queue like Pub/Sub or a work queue, handle them in parallel, and can scale independently from your HTTP-facing services.</p><p>They’re also excellent for multi-tenant architectures, where each tenant’s background workload operates in isolated containers. You can even configure accelerators or worker concurrency settings if your jobs are CPU- or GPU-bound. It’s your choice how the beat drops — one worker per message or a band of them jamming together.</p><h3>The Encore: Why It Works So Well</h3><p>The magic lies in Cloud Run’s simplicity and consistency. Everything runs in containers. You can test locally using the same images, version control each revision, and let Cloud Run handle the heavy lifting of scaling, security, and networking. There’s no need for a sprawling Kubernetes cluster or manual pod management.</p><p>In a world of increasingly complex distributed systems, the trio of Services, Jobs, and Worker Pools feels refreshingly coherent — a trifecta that turns cloud chaos into streamlined performance.</p><p>So next time you’re wondering how to handle real-time requests, background jobs, and queued workload processing, remember this: Cloud Run’s not just a service. It’s a platform for orchestrating cloud-native masterpieces.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a900772b1aba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Scaling to Millions: Deploying and Monitoring Google ADK Agents on GCP]]></title>
            <link>https://medium.com/@nikhilsmankani/scaling-to-millions-deploying-and-monitoring-google-adk-agents-on-gcp-84cbb4b1edc9?source=rss-c690f8eb96fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/84cbb4b1edc9</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[agent-development-kit]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Nikhil Mankani]]></dc:creator>
            <pubDate>Mon, 23 Jun 2025 12:42:50 GMT</pubDate>
            <atom:updated>2025-06-23T12:44:31.326Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Go from “it works on my machine” to “serving millions seamlessly” with one command.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EcqUQyq3_QCJbwXz.gif" /></figure><h3>Introduction</h3><p>You’ve just built a conversational agent using Google’s <a href="https://google.github.io/adk-docs/"><strong>Agent Development Kit (ADK)</strong></a> — great job! But deploying that agent to handle real-world traffic, with <strong>autoscaling, monitoring, and zero-downtime updates</strong>, can feel intimidating.</p><p>Finger’s Snap and Enters:<br> ✅ <strong>Cloud Run</strong><br> ✅ <strong>Cloud Monitoring</strong><br> ✅ One magical command: <strong>adk deploy cloud_run</strong></p><p>In this blog, we’ll go from prototype to production in minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*VT905rA5yp2Ugvtn.gif" /><figcaption>Sip and Snap</figcaption></figure><h3>Deploying</h3><h4>✅ Step 1: Set your environment</h4><pre>export GOOGLE_CLOUD_PROJECT=&quot;your-project-id&quot;<br>export GOOGLE_CLOUD_LOCATION=&quot;us-central1&quot;<br>export AGENT_PATH=&quot;./my_adk_agent&quot;<br>export SERVICE_NAME=&quot;service_name&quot;<br>export APP_NAME=&quot;app_name&quot;</pre><h4>✅ Step 2: Deploy!</h4><p>Minimal parameters</p><pre>adk deploy cloud_run \<br>  --project=$GOOGLE_CLOUD_PROJECT \<br>  --region=$GOOGLE_CLOUD_LOCATION \<br>  $AGENT_PATH</pre><p>Add optional flags for better control:</p><pre>adk deploy cloud_run \<br>  --project=$GOOGLE_CLOUD_PROJECT \<br>  --region=$GOOGLE_CLOUD_LOCATION \<br>  --service_name=$SERVICE_NAME \<br>  --app_name=$APP_NAME \<br>  --with_ui<br>  $AGENT_PATH</pre><ul><li>--with_uiAdds a Web UI to test your bot</li><li>--service_nameSets the Cloud Run service name</li><li>--app_nameSets the internal name for the app</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/0*DjcFKnXj_cvIv6VE.gif" /></figure><h3>IAM Gotchas (and how to fix them)</h3><p>If you’re using Cloud Build or GitHub Actions, ensure the deploying service account has these roles:</p><p>roles/run.admin Deploy Cloud Run services <br>roles/iam.serviceAccountUser Run deployments on behalf of SA roles/artifactregistry.writer Push images to registry</p><pre>gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT \<br>  --member=&quot;serviceAccount:${PROJECT_NUMBER}@cloudbuild.gserviceaccount.com&quot; \<br>  --role=&quot;roles/iam.serviceAccountUser&quot;</pre><h3>CI/CD with GitHub Actions</h3><p>Yes, you can automate adk deploy cloud_run in your pipeline. Here’s how</p><pre>- name: Install ADK<br>  run: pip install google-adk<br>- name: Deploy Agent<br>  run: |<br>    yes | adk deploy cloud_run \<br>      --project=&quot;${{ secrets.GCP_PROJECT_ID }}&quot; \<br>      --region=us-central1 \<br>      --with_ui \<br>      ./agent</pre><blockquote><em>🎯 Pro tip: Use </em><em>yes | to auto-confirm prompts during deployment.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/165/0*-J1CjH0hUhfaTMO0.gif" /><figcaption>Elon Approved</figcaption></figure><h3>Logging &amp; Monitoring</h3><h4>Logging</h4><p>All your console.log / print() messages go straight to Cloud Logging:</p><blockquote><em>Logs Explorer → Filter by </em><em>Cloud Run Revision → Highlight recent logs.</em></blockquote><h4>Monitoring</h4><p>Track metrics like:</p><ul><li>Request count</li><li>Latency (p95)</li><li>Memory usage</li><li>Error rate</li></ul><blockquote><em>Cloud Monitoring → Dashboards → Show request graph and latency.</em></blockquote><h4>Alerting</h4><p>Set alerts for spikes in:</p><ul><li>Error rate</li><li>High latency</li><li>Container crashes</li></ul><blockquote><em>Cloud Monitoring → Create Alert Policy → Condition: “Error count &gt; 5%” → Show notification setup.</em></blockquote><h3>🧠 Bonus Best Practices</h3><ul><li>Use /health endpoints for uptime checks</li><li>Use Secret Manager for API keys</li><li>Add OpenTelemetry for request traces</li><li>Enable Error Reporting for grouped stack traces</li><li>Monitor cold starts (keep memory ≥ 512MiB for balance)</li></ul><h3>🎯 Final Thoughts</h3><p>With <strong>adk deploy cloud_run</strong>You get:</p><ul><li>🛠️ Simplified deployment</li><li>📈 Built-in monitoring</li><li>🔁 Easy CI/CD</li><li>☁️ Google-scale infrastructure</li></ul><p>Whether you’re building a customer support bot or a multimodal LLM assistant, this workflow has you covered.</p><p>So go ahead — <strong>ship it to millions.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*g6UbN84NgcHHHqBa.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84cbb4b1edc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>