<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Serverless on minherz personal blog</title>
    <link>https://leoy.blog/tags/serverless/</link>
    <description>Recent content in Serverless on minherz personal blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 14 Sep 2026 11:05:33 -0700</lastBuildDate>
    <atom:link href="https://leoy.blog/tags/serverless/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>What I Learned About Cloud Run Instances</title>
      <link>https://leoy.blog/posts/what-i-learned-about-cloudrun-instances/</link>
      <pubDate>Sun, 13 Sep 2026 19:56:52 -0700</pubDate>
      <guid>https://leoy.blog/posts/what-i-learned-about-cloudrun-instances/</guid>
      <description>&lt;p&gt;Cloud Run is my primary deployment platform when I experiment with AI Workloads or build samples for conferences and codelabs. When I got early access to its new feature called &lt;a href=&#34;https://cloud.google.com/run/docs/instances/create-and-manage-instances?utm_campaign=CDR_0x71604355_platform_b561110825&amp;amp;utm_medium=external&amp;amp;utm_source=blog&#34; rel=&#34;external&#34; target=&#34;_blank&#34; class=&#34;after-link&#34; &gt;Cloud Run instances&lt;/a&gt;, I was a bit confused. I mean, Cloud Run already offered three execution models: &lt;strong&gt;Services&lt;/strong&gt; for transactions and request-response apps, &lt;strong&gt;Jobs&lt;/strong&gt; for batch processing, and &lt;strong&gt;Worker Pools&lt;/strong&gt; for background tasks. Why introduce a fourth option?&lt;/p&gt;&#xA;&lt;p&gt;Initially I thought that my &amp;ldquo;aha&amp;rdquo; moment would come when I tried to build an AI agent that runs long-lived sessions and needs to persist the session&amp;rsquo;s temporary data locally. Then I tried to find a difference between using an Instance and deploying the agent as a Cloud Run Service. I mounted a &lt;a href=&#34;https://cloud.google.com/run/docs/configuring/services/cloud-storage-volume-mounts?utm_campaign=CDR_0x71604355_platform_b561110825&amp;amp;utm_medium=external&amp;amp;utm_source=blog&#34; rel=&#34;external&#34; target=&#34;_blank&#34; class=&#34;after-link&#34; &gt;storage volume&lt;/a&gt; to my service and instrumented the agent with a tool to read and write state data to that volume. I also added an &lt;a href=&#34;https://cloud.google.com/run/docs/configuring/services/ephemeral-disk?utm_campaign=CDR_0x71604355_platform_b561110825&amp;amp;utm_medium=external&amp;amp;utm_source=blog&#34; rel=&#34;external&#34; target=&#34;_blank&#34; class=&#34;after-link&#34; &gt;ephemeral disk&lt;/a&gt; to store temporary data that the agent generated mid-execution. The agent managed long-lived sessions without a problem. It scaled to zero minimizing costs when left alone and resumed to the same session operation when called later. The known problems of mounting Cloud Storage buckets via FUSE such as high latency and lack of true POSIX locking were there. And my ephemeral disk reset each time the service scaled to zero. &amp;ldquo;Well,&amp;rdquo; I thought, &amp;ldquo;it would be nice to have storage that behaves like a persistent local disk.&amp;rdquo; However the same would be true for Cloud Run Instances too. This experience supported my initial confusion about Instances.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
