<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Apis on Mark Wolfe&#39;s Blog</title>
    <link>https://www.wolfe.id.au/tags/apis/</link>
    <description>Recent content in Apis on Mark Wolfe&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 02 Dec 2025 08:55:22 +1000</lastBuildDate><atom:link href="https://www.wolfe.id.au/tags/apis/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why Connect RPC is a great choice for building APIs</title>
      <link>https://www.wolfe.id.au/2025/12/02/why-connect-rpc-is-a-great-choice-for-building-apis/</link>
      <pubDate>Tue, 02 Dec 2025 08:55:22 +1000</pubDate>
      
      <guid>https://www.wolfe.id.au/2025/12/02/why-connect-rpc-is-a-great-choice-for-building-apis/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://connectrpc.com/&#34;&gt;Connect RPC&lt;/a&gt; is a suite of libraries which enable you to build HTTP based APIs which are gRPC compatible. It provides a bridge between &lt;a href=&#34;https://grpc.io/&#34;&gt;gRPC&lt;/a&gt; and HTTP/1.1, letting you leverage HTTP/2&amp;rsquo;s multiplexing and performance benefits while still supporting HTTP/1.1 clients. This makes it a great solution for teams looking to get the performance benefits of gRPC, while maintaining broad client compatibility.&lt;/p&gt;
&lt;p&gt;HTTP/2&amp;rsquo;s multiplexing and binary framing make it significantly more efficient than HTTP/1.1, reducing latency and improving throughput. Connect RPC lets you harness these benefits while maintaining broad client compatibility for services that can&amp;rsquo;t yet support HTTP/2.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://connectrpc.com/">Connect RPC</a> is a suite of libraries which enable you to build HTTP based APIs which are gRPC compatible. It provides a bridge between <a href="https://grpc.io/">gRPC</a> and HTTP/1.1, letting you leverage HTTP/2&rsquo;s multiplexing and performance benefits while still supporting HTTP/1.1 clients. This makes it a great solution for teams looking to get the performance benefits of gRPC, while maintaining broad client compatibility.</p>
<p>HTTP/2&rsquo;s multiplexing and binary framing make it significantly more efficient than HTTP/1.1, reducing latency and improving throughput. Connect RPC lets you harness these benefits while maintaining broad client compatibility for services that can&rsquo;t yet support HTTP/2.</p>
<p>Connect RPC can be used to build both internal and external APIs, powering frontends, mobile apps, CLIs, agents and more. See the list of <a href="https://github.com/connectrpc">supported languages</a>.</p>
<h2 id="core-features">Core Features</h2>
<p>Connect RPC provides a number of features out of the box, such as:</p>
<ul>
<li><a href="https://connectrpc.com/docs/go/interceptors">Interceptors</a> which make it easy to extend Connect RPC and are used to add authentication, logging, metrics, tracing and retries.</li>
<li><a href="https://connectrpc.com/docs/go/serialization-and-compression">Serialization &amp; compression</a>, with pluggable serializers, and support for asymmetric compression reducing the amount of data that needs to be transmitted, or received.</li>
<li><a href="https://connectrpc.com/docs/go/errors">Error handling</a>, with a standard error format, with support for custom error codes to allow for more granular error handling.</li>
<li><a href="https://connectrpc.com/docs/go/observability">Observability</a>, with in built support for OpenTelemetry enabling you to easily add tracing, or metrics to your APIs.</li>
<li><a href="https://connectrpc.com/docs/go/streaming">Streaming</a>, which provides a very efficient way to push or pull data without polling.</li>
<li><a href="https://connectrpc.com/docs/protocol/#summary">Schemas</a>, which enable you to define and validate your API schemas, and generate code from them.</li>
<li><a href="https://connectrpc.com/docs/web/generating-code/#local-generation">Code generation</a> for <a href="https://go.dev">Go</a>, <a href="https://www.typescriptlang.org/">TypeScript</a>, <a href="https://kotlinlang.org/">Kotlin</a>, <a href="https://developer.apple.com/swift/">Swift</a> and <a href="https://www.java.com/en/">Java</a>.</li>
</ul>
<h2 id="ecosystem">Ecosystem</h2>
<p>In addition to these features, Connect RPC is built on top of the Buf ecosystem, which offers notable benefits:</p>
<ul>
<li><a href="https://buf.build/blog/connect-rpc-joins-cncf">Connect RPC joins CNCF</a>, entering the cloud-native ecosystem, which is great for the long term sustainability of the project.</li>
<li><a href="https://buf.build/product/bsr">Buf Schema Registry</a>, which is a great tool for managing, sharing and versioning your API schemas.</li>
<li><a href="https://buf.build/product/cli">Buf CLI</a>, a handy all in one tool for managing your APIs, generating code and linting.</li>
</ul>
<h2 id="recommended-interceptor-packages">Recommended Interceptor Packages</h2>
<p>Some handy Go packages that provide pre-built Connect RPC interceptors worth exploring or using as a starting point:</p>
<ul>
<li><a href="https://github.com/connectrpc/authn-go">authn-go</a>, provides a rebuilt authentication middleware library for Go. It works with any authentication scheme (including HTTP basic authentication, cookies, bearer tokens, and mutual TLS).</li>
<li><a href="https://github.com/connectrpc/validate-go">validate-go</a> provides a Connect RPC interceptor that takes the tedium out of data validation. This package is powered by <a href="https://github.com/bufbuild/protovalidate-go">protovalidate</a>
and the <a href="https://github.com/google/cel-spec">Common Expression Language</a>.</li>
<li><a href="https://github.com/mdigger/rpclog">rpclog</a> provides a structured logging interceptor for Connect RPC with support for both unary and streaming RPCs.</li>
</ul>
<h2 id="summary">Summary</h2>
<ol>
<li>
<p>Connect RPC provides a paved and well maintained path to building gRPC compatible APIs, while maintaining compatibility for HTTP/1.1 clients. This is invaluable for product teams that need to support multiple client types without building custom compatibility layers.</p>
</li>
<li>
<p>Using a mature library like Connect RPC, you get to benefit from all the prebuilt integrations, and the added capabilities of the Buf ecosystem. This makes publishing and consuming APIs a breeze.</p>
</li>
<li>
<p>Protobuf schemas, high performance serialisation and compression ensure you get robust and efficient APIs.</p>
</li>
</ol>
<h2 id="conclusion">Conclusion</h2>
<p>Connect RPC makes it easy to build high-performance, robust APIs with gRPC compatibility, while avoiding the complexity of building and maintaining custom compatibility layers.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
