<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: grpc</title>
  <id>https://pype.dev/tags/grpc/atom.xml</id>
  <updated>2025-06-24T20:55:42Z</updated>
  <subtitle>All posts with the tag &#34;grpc&#34;</subtitle>
  <link href="https://pype.dev/tags/grpc/" rel="alternate" type="text/html"></link>
  <link href="https://pype.dev/tags/grpc/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Nic Payne</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>Traefik and gRPC for Temporal at home</title>
    <id>https://pype.dev/traefik-and-grpc-for-temporal-at-home/</id>
    <updated>2025-06-24T20:55:42Z</updated>
    <published>2025-06-24T20:55:42Z</published>
    <link href="https://pype.dev/traefik-and-grpc-for-temporal-at-home/" rel="alternate" type="text/html"></link>
    <summary type="text">Someday I will potentially write up some stuff about temporal but for now it&#39;s a workflow orchestrator that I&#39;m interested in and I wanted to PoC it in my...</summary>
    <content type="html">&lt;h1 id=&#34;temporal-networking-woes&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Temporal Networking Woes&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Someday I will potentially write up some stuff about &lt;a href=&#34;/temporal/&#34; class=&#34;wikilink&#34; data-title=&#34;temporal&#34; data-description=&#34;Temporal is a workflow orchestrator that I&amp;#39;m interested in&#34; data-date=&#34;2025-06-24&#34; data-preview=&#34;Temporal is a workflow orchestrator that I&amp;#39;m interested in&#34;&gt;temporal&lt;/a&gt; but for now&#xA;it&amp;rsquo;s a workflow orchestrator that I&amp;rsquo;m interested in and I wanted to PoC it in&#xA;my homelab by replacing a simple cron job to build my blog with a temporal&#xA;workflow and activity. I was IMMEDIATELY thwarted by a networking error that&#xA;feels crazy to me but maybe won&amp;rsquo;t be to others&amp;hellip; so enjoy the problem and if&#xA;you&amp;rsquo;re here from a Google search, I hope it&amp;rsquo;s helpful.&lt;/p&gt;&#xA;&lt;p&gt;Getting started with Temporal I wanted to have the server and associated&#xA;components on my server, but I expected to be running workflows and workers&#xA;on another computer.&lt;/p&gt;&#xA;&lt;p&gt;For most of my apps I slap some &lt;a href=&#34;/traefik/&#34; class=&#34;wikilink&#34; data-title=&#34;Traefik&#34; data-description=&#34;If you don&amp;#39;t know about traefik and you need a reverse-proxy then you might want to check it out. I used to use nginx for my reverse proxy but the config was...&#34; data-date=&#34;2022-03-06&#34; data-preview=&#34;If you don&amp;#39;t know about traefik and you need a reverse-proxy then you might want to check it out. I used to use nginx for my reverse proxy but the config was...&#34;&gt;Traefik&lt;/a&gt; labels on&#xA;and we&amp;rsquo;re good to go. But I got a wild set of errors trying to run a worker on&#xA;my desktop and connect it to the temporal server on my server over https&amp;hellip;. it&#xA;ended up being because I needed to setup a special protocol in traefik for the&#xA;reverse proxy to appropriately proxy the grpc call.&lt;/p&gt;&#xA;&lt;p&gt;So I had a normal set of labels on my temporal container, went to run a worker&#xA;and got this nasty work of art&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;RuntimeError: Failed client connect: `get_system_info` call error after connection: Status { code: Internal, message: &amp;quot;protocol error: received message with invalid compression flag: 73 (valid flags are 0 and 1) while receiving response with status: 500 Internal Server Error&amp;quot;, metadata: MetadataMap { headers: {&amp;quot;content-type&amp;quot;: &amp;quot;text/plain; charset=utf-8&amp;quot;, &amp;quot;content-length&amp;quot;: &amp;quot;21&amp;quot;, &amp;quot;date&amp;quot;: &amp;quot;Wed, 25 Jun 2025 02:12:44 GMT&amp;quot;} }, source: None }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Thank God I had &lt;a href=&#34;/kind/&#34; class=&#34;glossary-term&#34; title=&#34;kind - kubernetes in docker&#34; data-hover-title=&#34;kind&#34;&gt;kind&lt;/a&gt; of seen this at work one other time in my life, and we&#xA;never fixed the issue there but I knew what it was&amp;hellip; we had traefik acting as&#xA;a load balancer (as do I at home) and the traefik load balancer was &amp;ldquo;balancing&#xA;traffic using https&amp;rdquo;&amp;hellip; no, I do not really know what I&amp;rsquo;m saying. But what I do&#xA;know is that in order for the Temporal Server and Worker to communicate,&#xA;traefik has to properly route the traffic for gRPC instead of https.&lt;/p&gt;&#xA;&lt;div class=&#34;admonition warning&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Warning&lt;/p&gt;&#xA;&lt;p&gt;I can&amp;rsquo;t stress enough how little I know about the difference between https and grpc or why the load balancer cares&amp;hellip; there&amp;rsquo;s clearly something in the networking stack that is extremely relevant here&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;But the fix is NOT hard thankfully, and it&amp;rsquo;s even on &lt;a href=&#34;https://doc.traefik.io/traefik/user-guides/grpc/#traefik-configuration&#34;&gt;traefik&amp;rsquo;s website&lt;/a&gt; - the warning annotation there tells you what you need - which is one more traefik label&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;l&#34;&gt;traefik.http.services.&amp;lt;my-service-name&amp;gt;.loadbalancer.server.scheme=h2c&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So after setting the loadbalancer.server.scheme to &lt;code&gt;h2c&lt;/code&gt; I could run my worker just fine!&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/20250625021838_4d7104c2.png&#34; alt=&#34;20250625021838_4d7104c2.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
</feed>