<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Yetric Blog: Engineering</title>
    <subtitle>Posts in the Engineering category.</subtitle>
    <link href="https://yetric.com/blog/categories/engineering/feed.xml" rel="self"/>
    <link href="https://yetric.com/blog/categories/engineering/"/>
    
    <updated>2026-11-15T00:00:00Z</updated>
    <id>https://yetric.com/blog/categories/engineering/</id>
    <author>
        <name>Yetric</name>
    </author>
    
    <entry>
        <title>A Better Podcast Player: What's New in Our Audio Player and What's Next</title>
        <link href="https://yetric.com/blog/posts/audioplayer-1-2-hittapodd/"/>
        <updated>2026-11-15T00:00:00Z</updated>
        <id>https://yetric.com/blog/posts/audioplayer-1-2-hittapodd/</id>
        
        <category term="engineering"/>
        
        
            
            
        <category term="audio"/>
            
        <category term="open-source"/>
            
        <category term="podcasts"/>
            
        <category term="ux"/>
            
        
        
        <summary>How the audio player behind HittaPodd.se is getting steadier and smarter, and how chapters and timed images can make listening better.</summary>
        
        <content type="html">&lt;p&gt;Press play on &lt;a href=&#34;https://hittapodd.se/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HittaPodd.se&lt;/a&gt; and a small piece of software called &lt;a href=&#34;https://github.com/yetric/audioplayer&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;@yetric/audioplayer&lt;/code&gt;&lt;/a&gt; takes over. It&#39;s open source, we maintain it, and it handles the things a listener notices without thinking about them: play and pause, skipping, speed, the queue, and picking up where you left off.&lt;/p&gt;
&lt;p&gt;Two releases are in the works. 1.2 makes the player steadier. 1.3 lets it do something new for listeners. A note on status: 1.2 is in beta, 1.3 is an open pull request, and HittaPodd still runs the older 1.1. Nothing here is live on the site yet.&lt;/p&gt;
&lt;h2 id=&#34;what-a-listener-expects&#34; data-toc-text=&#34;What a listener expects&#34;&gt;What a listener expects&lt;/h2&gt;
&lt;p&gt;Nobody opens a podcast app to admire the player. They want it to do these things and not get in the way:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start quickly and keep playing.&lt;/li&gt;
&lt;li&gt;Remember where they were, even days later.&lt;/li&gt;
&lt;li&gt;Skip back 15 seconds when they missed a sentence.&lt;/li&gt;
&lt;li&gt;Work from the lock screen and with headphone buttons.&lt;/li&gt;
&lt;li&gt;Not drain the battery or make the page feel sluggish.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most of what we&#39;ve done to the player is aimed at these basics. They&#39;re easy to get almost right and annoying when they&#39;re not.&lt;/p&gt;
&lt;h2 id=&#34;1-2-the-basics-get-steadier&#34; data-toc-text=&#34;1.2: the basics get steadier&#34;&gt;1.2: the basics get steadier&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Skipping works the same everywhere.&lt;/strong&gt; Skip forward and back now behaves the same whether you tap a button on the page or on the lock screen. It never jumps to a strange position, and if an episode hasn&#39;t finished loading it moves from where you are rather than back to the start.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A smoother page.&lt;/strong&gt; A player updates several times a second while it plays. Until now, every part of the page that showed anything from the player had to redraw each time, whether it needed to or not. In 1.2 a part of the page can ask to hear only about what it shows. The play button cares about play and pause. The progress bar cares about time. That means less wasted work, which matters most on older phones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remembering your place, more reliably.&lt;/strong&gt; Resuming where you left off is the feature listeners miss most when it breaks. 1.2 fixes a bug that could interfere with restoring your position during development. It also makes sure that when the browser can&#39;t save something, because storage is full or blocked, playback carries on instead of stopping.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tested in real browsers.&lt;/strong&gt; Playback is now tested in actual browsers, not just simulated ones. A change that quietly breaks sound in Firefox or Safari is the kind of bug nobody finds until a listener reports it. We&#39;d rather find it first.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Less work for us.&lt;/strong&gt; For HittaPodd, a lot of what we built by hand around the player becomes a setting. Saving progress every few seconds is one example. Lock-screen controls are another. Less hand-built code means fewer places for things to go wrong, and more time spent on features that listeners can see.&lt;/p&gt;
&lt;h2 id=&#34;1-3-the-player-learns-about-chapters&#34; data-toc-text=&#34;1.3: the player learns about chapters&#34;&gt;1.3: the player learns about chapters&lt;/h2&gt;
&lt;p&gt;Here&#39;s the part I&#39;m most excited about. Many podcasts include chapters: a list of titles and start times, like &amp;quot;Intro&amp;quot;, &amp;quot;Interview&amp;quot;, &amp;quot;Listener mail&amp;quot;. Some also add an image, a link or a short note to a chapter. This is part of an open standard called &lt;a href=&#34;https://podcasting2.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Podcasting 2.0&lt;/a&gt;, and the information is already published by many shows. The chapters themselves follow the &lt;a href=&#34;https://podcasting2.org/docs/podcast-namespace/examples/chapters/jsonChapters&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;JSON Chapters specification&lt;/a&gt;, which is part of the &lt;a href=&#34;https://github.com/Podcastindex-org/podcast-namespace&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;podcast namespace&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Today, most players ignore all of it. In 1.3, our player can read it and keep the screen in step with the audio.&lt;/p&gt;
&lt;p&gt;What that could mean for someone listening on HittaPodd:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Jump to what you care about.&lt;/strong&gt; Instead of dragging a slider and guessing, you tap &amp;quot;Interview&amp;quot; and you&#39;re there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;See where you are.&lt;/strong&gt; The current chapter title is shown while you listen, and the progress bar can show where the chapters begin.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pictures and links at the right moment.&lt;/strong&gt; When the host mentions a book, the cover appears. When they mention a website, the link is there to tap. No hunting through show notes afterwards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Seeking doesn&#39;t spam you.&lt;/strong&gt; If you drag ahead by half an hour, you see what belongs to where you landed. You don&#39;t get every picture and link you skipped past flashing by.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It keeps working when things change.&lt;/strong&gt; Repeat, moving to the next episode in your queue and swapping episodes all reset the screen correctly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of this is opt-in. A show without chapters plays exactly as before.&lt;/p&gt;
&lt;h2 id=&#34;what-we-aren-t-claiming&#34; data-toc-text=&#34;What we aren&#39;t claiming&#34;&gt;What we aren&#39;t claiming&lt;/h2&gt;
&lt;p&gt;The player does the keeping-in-sync. It doesn&#39;t find the chapter data for us. Fetching it from a show&#39;s feed, designing how it looks, and making it accessible to everyone are still up to HittaPodd. That&#39;s real work and it comes next. Also, chapters only help when the podcast publishes them. We&#39;ll see how many do. Transcripts and automatic silence skipping are on the list for later.&lt;/p&gt;
&lt;p&gt;So the honest summary is that 1.3 makes a better listening experience possible. It doesn&#39;t give us one by itself.&lt;/p&gt;
&lt;h2 id=&#34;why-we-build-it-in-the-open&#34; data-toc-text=&#34;Why we build it in the open&#34;&gt;Why we build it in the open&lt;/h2&gt;
&lt;p&gt;The player is MIT-licensed. If you&#39;re building a podcast or audiobook experience in a browser, you can use it, and the &lt;a href=&#34;https://yetric.github.io/audioplayer/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;documentation&lt;/a&gt; and &lt;a href=&#34;https://github.com/yetric/audioplayer&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;code&lt;/a&gt; are public. Using it in a real product, with real listeners, is how we find out what&#39;s missing. I&#39;d rather the library be shaped by an app people use than by guesses.&lt;/p&gt;
&lt;p&gt;If you listen on HittaPodd and something about the player annoys you, that&#39;s useful to us. Tell us.&lt;/p&gt;
</content>
    </entry>

    <entry>
        <title>Finding the Right Podcast Episode: How Search Works on HittaPodd.se</title>
        <link href="https://yetric.com/blog/posts/meilisearch-hittapodd-search/"/>
        <updated>2026-11-15T00:00:00Z</updated>
        <id>https://yetric.com/blog/posts/meilisearch-hittapodd-search/</id>
        
        <category term="engineering"/>
        
        
            
            
        <category term="go"/>
            
        <category term="meilisearch"/>
            
        <category term="podcasts"/>
            
        <category term="search"/>
            
        <category term="ux"/>
            
        
        
        <summary>How we use Meilisearch on HittaPodd.se so listeners find podcasts and episodes quickly, even with typos, and how we want to use it for recommendations next.</summary>
        
        <content type="html">&lt;p&gt;Search is the front door of a podcast app. Someone has a show or a topic in mind, they type a few letters, and they expect the right thing to show up. If it doesn&#39;t, they don&#39;t think &amp;quot;the search index is stale&amp;quot;. They think &amp;quot;this app doesn&#39;t have it&amp;quot;.&lt;/p&gt;
&lt;p&gt;On &lt;a href=&#34;https://hittapodd.se/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HittaPodd.se&lt;/a&gt; we use &lt;a href=&#34;https://www.meilisearch.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Meilisearch&lt;/a&gt; for this. It sits behind our API and is used by the web app. This post is about why we added it, and what it does for listeners.&lt;/p&gt;
&lt;h2 id=&#34;what-was-wrong-before&#34; data-toc-text=&#34;What was wrong before&#34;&gt;What was wrong before&lt;/h2&gt;
&lt;p&gt;Search used to be a database query that looked for your text inside titles. It worked, but badly in three ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It was slow where it mattered.&lt;/strong&gt; Episodes are the biggest part of the catalogue. On our measurements with about 345,000 episodes, the database search took around 1.7 seconds. The search engine answers in about 10 milliseconds. A search box that waits almost two seconds after every keystroke feels broken.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It didn&#39;t forgive typos.&lt;/strong&gt; Type &lt;code&gt;fotbolsviken&lt;/code&gt; with one &lt;code&gt;l&lt;/code&gt; and you got nothing, even though the show exists.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The order was arbitrary.&lt;/strong&gt; A database &lt;code&gt;LIKE&lt;/code&gt; query finds matches but doesn&#39;t say which is the best one.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;what-listeners-get-now&#34; data-toc-text=&#34;What listeners get now&#34;&gt;What listeners get now&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Fast enough to search as you type.&lt;/strong&gt; We lowered the delay before a search starts from 400 to 150 milliseconds. That only makes sense because answers come back quickly. Results appear while you&#39;re still typing, in a popup you can open from anywhere with Cmd/Ctrl+K.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Typos are forgiven.&lt;/strong&gt; A title that&#39;s one letter off is still found. We tuned this on purpose, though. By default the engine forgives a typo from 5 letters, and at that length &lt;code&gt;krimm&lt;/code&gt; started matching &lt;code&gt;krim&lt;/code&gt;. We changed it to forgive one typo from 6 letters and two from 12, so short words stay precise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Better order.&lt;/strong&gt; Of equally good matches, a podcast with more episodes comes first, and a newer episode comes before an older one. We also drop weak matches. Without that, searching for &lt;code&gt;kolbäck&lt;/code&gt; would list every episode that happens to mention the village of Kolback somewhere deep in its description.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One search across everything.&lt;/strong&gt; The same box finds podcasts, episodes, collections and focus areas. There&#39;s also a results page at &lt;code&gt;/hitta&lt;/code&gt; where podcasts show as cards and episodes as rows with cover, show name, snippet and date. The address contains your search, so you can share it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Newly published episodes show up quickly.&lt;/strong&gt; A new episode of a show you follow shouldn&#39;t be missing from search for a day. A small job adds new episodes to the index every ten minutes. A full rebuild runs nightly to catch everything else.&lt;/p&gt;
&lt;h2 id=&#34;where-it-still-falls-short&#34; data-toc-text=&#34;Where it still falls short&#34;&gt;Where it still falls short&lt;/h2&gt;
&lt;p&gt;We try to be honest about trade-offs in the docs, and the same applies here.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It matches the start of words, not the middle.&lt;/strong&gt; &lt;code&gt;fotboll&lt;/code&gt; finds &lt;code&gt;Fotbollspodden&lt;/code&gt;. &lt;code&gt;podden&lt;/code&gt; does not. The old database query would have found it. That&#39;s the price of the typo tolerance, and it hurts with Swedish compound words. I think the trade is right, since typos are more common than searching for the end of a word. But some listeners will notice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New things take a little while.&lt;/strong&gt; Not everything is picked up by the ten-minute job. If a feed changes an episode&#39;s title, that waits for the nightly rebuild.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It uses real resources.&lt;/strong&gt; The index for about 260,000 episodes takes around 2 GB of disk, and a rebuild needs room for the old and new index side by side. That&#39;s fine for us, but it&#39;s not free.&lt;/p&gt;
&lt;h2 id=&#34;why-meilisearch&#34; data-toc-text=&#34;Why Meilisearch&#34;&gt;Why Meilisearch&lt;/h2&gt;
&lt;p&gt;We looked at two open source engines: &lt;a href=&#34;https://typesense.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Typesense&lt;/a&gt; and Meilisearch. Both are fast, both forgive typos, and both can run on your own server. Either would probably have worked for us. We went with Meilisearch.&lt;/p&gt;
&lt;p&gt;What we ended up relying on, and what makes it a good fit for HittaPodd:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Typo tolerance we can tune.&lt;/strong&gt; We set how long a word must be before a typo is forgiven, which fixed short words matching too loosely.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A ranking score for every hit.&lt;/strong&gt; That let us drop weak matches, like a near miss buried in a long description.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Language settings.&lt;/strong&gt; We can tell the engine which language a field is written in, which matters for Swedish.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A plain HTTP interface.&lt;/strong&gt; Our client is small and has no extra dependency. That keeps the search code easy to read and replace.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#39;d say the same to anyone choosing between the two: try both on your own data. Search quality depends on your content, and a day of testing tells you more than a comparison table.&lt;/p&gt;
&lt;h3 id=&#34;and-compared-with-algolia&#34; data-toc-text=&#34;And compared with Algolia&#34;&gt;And compared with Algolia&lt;/h3&gt;
&lt;p&gt;The hosted name most people know is &lt;a href=&#34;https://www.algolia.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Algolia&lt;/a&gt;. It&#39;s good and easy to start with, and for many teams it&#39;s the right call. If you&#39;re willing to self-host, though, Meilisearch or Typesense is a good alternative:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s ours.&lt;/strong&gt; The data stays on our own server. There&#39;s no third party in the path of every search a listener makes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The cost is predictable.&lt;/strong&gt; We pay for a server we already run, not per search or per record. With a catalogue of hundreds of thousands of episodes, that matters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s small to run.&lt;/strong&gt; For us it&#39;s one container with a memory cap and no public port. Only our own services can reach it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The honest other side is that you take on the work. You size the server, keep the index up to date, and handle upgrades yourself. A hosted service does all of that for you, and for a small team that may be worth the price. Meilisearch also offers a hosted version if you want the engine without running it.&lt;/p&gt;
&lt;p&gt;Our setup makes self-hosting lower-risk than it sounds, because the index is only a fast copy. If it&#39;s lost, we rebuild it from the database.&lt;/p&gt;
&lt;h2 id=&#34;the-safety-net&#34; data-toc-text=&#34;The safety net&#34;&gt;The safety net&lt;/h2&gt;
&lt;p&gt;The part I like most is what happens when the search engine is down. The answer is: nothing visible. The API quietly falls back to the old database search, and the listener gets slower, less forgiving results instead of an error. We only see it in the logs.&lt;/p&gt;
&lt;p&gt;Two design choices make that safe.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The engine only decides what matches and in what order.&lt;/strong&gt; The actual podcast and episode data is always read from our database. So if an admin hides an episode, or a podcast is removed, or a collection is made private, it disappears from search results right away. The index doesn&#39;t have to be rebuilt first. The result looks the same whether it came from the engine or from the fallback.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The index can always be rebuilt.&lt;/strong&gt; Meilisearch is a fast copy of what&#39;s in the database, never the source of truth. The nightly rebuild builds a fresh index on the side and swaps it in, so a search never hits one that&#39;s half finished. Upgrading Meilisearch means wiping the index and rebuilding it. That sounds drastic and is actually boring, which is what we want.&lt;/p&gt;
&lt;h2 id=&#34;what-s-next-finding-what-you-didn-t-know-to-search-for&#34; data-toc-text=&#34;What&#39;s next: finding what you didn&#39;t know to search for&#34;&gt;What&#39;s next: finding what you didn&#39;t know to search for&lt;/h2&gt;
&lt;p&gt;Search only helps people who already know what they&#39;re looking for. Some of the best listening comes from the show you&#39;d never have typed in. That&#39;s the next job for the same engine: recommendations and personalization.&lt;/p&gt;
&lt;p&gt;None of this is built yet, so this is the direction and not a feature list. But Meilisearch is a good fit for it, and here is what we want it to make possible for listeners:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;quot;If you liked this, try that.&amp;quot;&lt;/strong&gt; An episode or podcast page that suggests things close to it in topic, not just things with a similar name. We already find similar podcasts today. A search engine that understands words and ranking lets us do it for episodes too, and do it fast enough to show on every page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A start page that knows you.&lt;/strong&gt; What you&#39;ve listened to, saved and followed can shape what you see first, so you spend less time scrolling through things that don&#39;t interest you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Search that leans your way.&lt;/strong&gt; Of two equally good matches, the one closer to what you usually listen to can come first. Someone who follows football podcasts probably means the sports show when they type a short, ambiguous word.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discovery beyond the obvious.&lt;/strong&gt; Recommendations that only repeat the most popular shows aren&#39;t much help. We&#39;d like to surface good, smaller podcasts that match your taste and that you&#39;d otherwise miss.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Personalization comes with a responsibility. We want it to be something you can see and control, not a black box. That means being clear about what&#39;s used, keeping it to what a listener has chosen to do on HittaPodd, and always leaving a plain, non-personalized way to browse and search. A recommendation that feels creepy is worse than none.&lt;/p&gt;
&lt;p&gt;We&#39;ll write about it as it takes shape, including what doesn&#39;t work. In the meantime, I&#39;d also like to look at which searches return nothing, since those show what listeners want and we don&#39;t have. Compound words are the other thing on my mind, since they&#39;re where the engine is weakest for Swedish.&lt;/p&gt;
&lt;p&gt;If a search on HittaPodd doesn&#39;t find what you expected, tell us. It&#39;s the quickest way for us to find the next thing to fix.&lt;/p&gt;
</content>
    </entry>

    <entry>
        <title>From PHP to Go: Rebuilding the Backend for HittaPodd.se</title>
        <link href="https://yetric.com/blog/posts/hittapodd-php-to-go/"/>
        <updated>2026-11-07T00:00:00Z</updated>
        <id>https://yetric.com/blog/posts/hittapodd-php-to-go/</id>
        
        <category term="engineering"/>
        
        
            
            
        <category term="engineering"/>
            
        <category term="go"/>
            
        <category term="migration"/>
            
        <category term="php"/>
            
        <category term="podcasts"/>
            
        
        
        <summary>How HittaPodd.se moved from PHP to Go and from a shared database to one of its own. What went well, what went wrong, and what we learned.</summary>
        
        <content type="html">&lt;p&gt;&lt;a href=&#34;https://hittapodd.se/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HittaPodd.se&lt;/a&gt; now runs on Go. The old PHP API has been retired, and the app has a database of its own instead of sharing one with other things.&lt;/p&gt;
&lt;p&gt;This isn&#39;t a how-to. I&#39;m leaving the code out and writing about why we did it, what helped, and the things that didn&#39;t go as planned. We got a fair amount wrong along the way.&lt;/p&gt;
&lt;h2 id=&#34;why-we-did-it&#34; data-toc-text=&#34;Why we did it&#34;&gt;Why we did it&lt;/h2&gt;
&lt;p&gt;Nothing was broken. The PHP version worked. The reason is bigger than one app: we want to retire PHP as a runtime across our product portfolio and move toward Go. HittaPodd was the next one in line.&lt;/p&gt;
&lt;p&gt;Fewer runtimes means less to patch, less to keep in your head, and less to explain to anyone joining a project. That was the bet, at least.&lt;/p&gt;
&lt;p&gt;There was also a reason specific to HittaPodd. The app shared a database with other things. Nobody decided that, it just happened over the years. It was convenient at first and then turned into a dependency nobody had chosen. Changing runtimes seemed like a reasonable time to deal with it.&lt;/p&gt;
&lt;h2 id=&#34;how-it-went&#34; data-toc-text=&#34;How it went&#34;&gt;How it went&lt;/h2&gt;
&lt;p&gt;It wasn&#39;t done in one go. A first pass in March got the basics and the background jobs running in Go: importing podcasts, reading feeds, making thumbnails, finding similar podcasts. Then it sat for a while because other work came first. We picked it up again in the autumn, and the actual cutover happened over a few weeks in late October.&lt;/p&gt;
&lt;p&gt;Looking back, the pause helped. When we returned to it, it was clearer what was still missing.&lt;/p&gt;
&lt;h2 id=&#34;moving-one-piece-at-a-time&#34; data-toc-text=&#34;Moving one piece at a time&#34;&gt;Moving one piece at a time&lt;/h2&gt;
&lt;p&gt;We used nginx, which already sat in front of the API, to decide where each request went. PHP kept answering everything, and we moved groups of routes to Go one step at a time. First the catalogue (categories, collections, authors), then podcasts, episodes and search, then similar podcasts and series. The background jobs moved in between.&lt;/p&gt;
&lt;p&gt;This worked better than I expected:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Each step was small.&lt;/strong&gt; A few routes at a time meant that when something looked wrong, there wasn&#39;t much to search through.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Going back was easy.&lt;/strong&gt; Sending a route back to PHP was a change in nginx, not a new release. That made it less scary to try the next step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;We could see what was left.&lt;/strong&gt; Whatever nginx still sent to PHP was the work that remained.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PHP and Go ran side by side.&lt;/strong&gt; We could compare them on real traffic, instead of guessing how they&#39;d differ.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;what-went-better&#34; data-toc-text=&#34;What went better&#34;&gt;What went better&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Speed.&lt;/strong&gt; Search was the slowest part. Once we measured it on production data, we got an uncached episode search from about 1.4 seconds down to about 0.6, and later made most searches faster again. Day to day, the API answers with a median around 18 ms, though that&#39;s from a single hour, so take it as a rough picture.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The database is ours.&lt;/strong&gt; HittaPodd now has a database that only holds HittaPodd data, and Go owns the schema. Migrations live next to the code and run in CI. I can change a table without first wondering who else reads it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A reason to revisit the background work.&lt;/strong&gt; The feed updater now checks feeds less often when they rarely change and backs off when one misbehaves. Thumbnails are made from a queue. Similar podcasts are found through shared vocabulary rather than name matching. None of that required Go, but the rewrite gave us a reason to look at it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Room for new things.&lt;/strong&gt; With the foundation in place, we&#39;ve been able to add accounts, playlists, OPML import, an admin, and an MCP server. We probably wouldn&#39;t have gotten to those on the old setup.&lt;/p&gt;
&lt;h2 id=&#34;what-was-hard&#34; data-toc-text=&#34;What was hard&#34;&gt;What was hard&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Untangling the shared database.&lt;/strong&gt; Working out what actually belonged to HittaPodd took longer than the code did. After years with other tenants, the boundaries were blurry. We started from an exact copy of production&#39;s schema and sorted it out from there. I&#39;m not certain we made every call right the first time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Matching the old behavior.&lt;/strong&gt; The frontend relied on details that only the PHP code defined, and nobody had written them down. In one case a renamed field would have made every private collection look public. We added tests that compare the API spec to the real code, and they found 87 mismatches the first time they ran. That was humbling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The first route move broke the site.&lt;/strong&gt; We had a new frontend ready, but its deploy failed, so the live site was still running an older build. Installed apps and open tabs do the same. They kept expecting PHP&#39;s response format, and Go answered in a different one. We should have caught that before moving anything. The fix was to let Go answer in the old format when asked. nginx asks on behalf of old clients, and new clients get the new format. We used that for every step after.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Moving the data.&lt;/strong&gt; Data migrations make me nervous. We rehearsed it several times, ran it, checked the result, threw it away, and repeated, until the real run was uneventful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Real traffic is different from tests.&lt;/strong&gt; Some of our heaviest traffic comes from our own apps and partner sites, and it doesn&#39;t behave like anything we&#39;d have made up. Search was the clearest case, and we only found it by looking at real numbers.&lt;/p&gt;
&lt;h2 id=&#34;what-we-d-do-the-same-and-what-we-d-change&#34; data-toc-text=&#34;What we&#39;d do the same, and what we&#39;d change&#34;&gt;What we&#39;d do the same, and what we&#39;d change&lt;/h2&gt;
&lt;p&gt;Things we&#39;d repeat:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Move one route at a time behind a switchboard, even though it feels slow.&lt;/li&gt;
&lt;li&gt;Get the old behavior right first and improve things afterwards.&lt;/li&gt;
&lt;li&gt;Measure before tuning anything.&lt;/li&gt;
&lt;li&gt;Give an app its own database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Things we&#39;d do differently:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check what old clients expect before moving the first route.&lt;/li&gt;
&lt;li&gt;Write down the quirks of the old system earlier, before they turn into surprises.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;where-that-leaves-us&#34; data-toc-text=&#34;Where that leaves us&#34;&gt;Where that leaves us&lt;/h2&gt;
&lt;p&gt;HittaPodd.se is simpler to run now, and it doesn&#39;t depend on anything it didn&#39;t choose. It&#39;s also one less PHP app in the portfolio, which was the goal. There are surely rough edges we haven&#39;t found yet.&lt;/p&gt;
&lt;p&gt;If you spot something that feels off on &lt;a href=&#34;https://hittapodd.se/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HittaPodd.se&lt;/a&gt;, I&#39;d like to hear about it.&lt;/p&gt;
&lt;p&gt;And if you have an old system you&#39;re nervous about touching, &lt;a href=&#34;https://yetric.com/contact/&#34;&gt;get in touch&lt;/a&gt;. This is the kind of work I like helping with.&lt;/p&gt;
</content>
    </entry>

    <entry>
        <title>Behind the Scenes: DevOps Improvements at Maklarinfo</title>
        <link href="https://yetric.com/blog/posts/maklarinfo-devops-improvements-2026/"/>
        <updated>2026-03-01T00:00:00Z</updated>
        <id>https://yetric.com/blog/posts/maklarinfo-devops-improvements-2026/</id>
        
        <category term="engineering"/>
        
        
            
            
        <category term="ci-cd"/>
            
        <category term="devops"/>
            
        <category term="engineering"/>
            
        <category term="infrastructure"/>
            
        
        
        <summary>How we're making our CI/CD pipeline faster, our deployments more reliable, and our infrastructure more observable without compromising security.</summary>
        
        <content type="html">&lt;h2 id=&#34;tl-dr&#34; data-toc-text=&#34;TL;DR&#34;&gt;TL;DR&lt;/h2&gt;
&lt;p&gt;We&#39;ve made significant investments in our CI/CD pipeline, logging infrastructure, and deployment reliability over the past three months. Pull request checks now run 50% faster through parallelization. We&#39;ve added structured logging across the entire stack. And we&#39;ve hardened our build process to be more resilient to edge cases.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;faster-feedback-loops&#34; data-toc-text=&#34;Faster Feedback Loops&#34;&gt;Faster Feedback Loops&lt;/h2&gt;
&lt;p&gt;One of the biggest wins for developer experience is speed. When you push code, you want to know if it passes quality gates in seconds, not minutes.&lt;/p&gt;
&lt;h3 id=&#34;parallel-ci-cd-jobs&#34; data-toc-text=&#34;Parallel CI/CD Jobs&#34;&gt;Parallel CI/CD Jobs&lt;/h3&gt;
&lt;p&gt;We restructured our pull request quality checks to run in parallel instead of sequentially. What used to take 4+ minutes now completes in about 2 minutes for most changes.&lt;/p&gt;
&lt;p&gt;How? By running linting, type checking, tests, and formatting checks concurrently rather than one after another. They don&#39;t depend on each other, so there&#39;s no reason to serialize them.&lt;/p&gt;
&lt;p&gt;We also implemented smart caching of dependencies and build artifacts, so repeat checks skip expensive install and build steps when nothing has changed.&lt;/p&gt;
&lt;h3 id=&#34;change-detection&#34; data-toc-text=&#34;Change Detection&#34;&gt;Change Detection&lt;/h3&gt;
&lt;p&gt;Not all changes require the same level of scrutiny. If a PR only modifies documentation or markdown files, we skip the full build step entirely. This saves time on documentation-only PRs without sacrificing quality on code changes.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;observable-systems&#34; data-toc-text=&#34;Observable Systems&#34;&gt;Observable Systems&lt;/h2&gt;
&lt;p&gt;You can&#39;t manage what you can&#39;t measure. We&#39;ve invested in structured logging across the entire application stack—from API routes to background workers to third-party integrations.&lt;/p&gt;
&lt;h3 id=&#34;structured-logging&#34; data-toc-text=&#34;Structured Logging&#34;&gt;Structured Logging&lt;/h3&gt;
&lt;p&gt;Instead of freeform log messages, we now log events with consistent structure: context, severity levels, timestamps, and relevant metadata. This makes it possible to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Search and filter logs efficiently in production&lt;/li&gt;
&lt;li&gt;Correlate events across services&lt;/li&gt;
&lt;li&gt;Build alerts on specific patterns&lt;/li&gt;
&lt;li&gt;Debug issues faster with more context&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Structured logging is invisible to end users, but it&#39;s the foundation for reliability. When something goes wrong at 3 AM, better logs mean faster resolution.&lt;/p&gt;
&lt;h3 id=&#34;production-observability&#34; data-toc-text=&#34;Production Observability&#34;&gt;Production Observability&lt;/h3&gt;
&lt;p&gt;We&#39;ve instrumented critical paths in the application to emit detailed events—from user actions to third-party API calls. This lets us:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Detect anomalies before users notice them&lt;/li&gt;
&lt;li&gt;Understand where time is being spent in the system&lt;/li&gt;
&lt;li&gt;Validate that background jobs are running as expected&lt;/li&gt;
&lt;li&gt;Track data quality in real-time&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;resilient-builds&#34; data-toc-text=&#34;Resilient Builds&#34;&gt;Resilient Builds&lt;/h2&gt;
&lt;p&gt;Production systems need to handle edge cases gracefully. We&#39;ve hardened our build and deployment processes to be more resilient.&lt;/p&gt;
&lt;h3 id=&#34;defensive-configuration&#34; data-toc-text=&#34;Defensive Configuration&#34;&gt;Defensive Configuration&lt;/h3&gt;
&lt;p&gt;The build now handles missing configuration gracefully. If an environment variable isn&#39;t set, the build doesn&#39;t fail—it either uses a sensible default or continues with a warning. This prevents cascading failures where missing one config value brings down the entire pipeline.&lt;/p&gt;
&lt;h3 id=&#34;safer-dependency-management&#34; data-toc-text=&#34;Safer Dependency Management&#34;&gt;Safer Dependency Management&lt;/h3&gt;
&lt;p&gt;We&#39;ve added versioning constraints and fallback logic to ensure that third-party dependencies don&#39;t introduce breaking changes silently. Dependency updates are tested more thoroughly before they reach production.&lt;/p&gt;
&lt;h3 id=&#34;test-stability&#34; data-toc-text=&#34;Test Stability&#34;&gt;Test Stability&lt;/h3&gt;
&lt;p&gt;We&#39;ve fixed flaky tests and improved test infrastructure to reduce false negatives. When a test fails, it means something is actually broken—not that the test framework had a hiccup.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;security-first-infrastructure&#34; data-toc-text=&#34;Security-First Infrastructure&#34;&gt;Security-First Infrastructure&lt;/h2&gt;
&lt;p&gt;DevOps isn&#39;t just about speed—it&#39;s about doing things securely at scale.&lt;/p&gt;
&lt;h3 id=&#34;owasp-compliance&#34; data-toc-text=&#34;OWASP Compliance&#34;&gt;OWASP Compliance&lt;/h3&gt;
&lt;p&gt;We conducted a comprehensive security audit and addressed all OWASP Top 10 findings. This includes improvements to how we handle authentication, rate limiting, input validation, and more.&lt;/p&gt;
&lt;h3 id=&#34;secret-management&#34; data-toc-text=&#34;Secret Management&#34;&gt;Secret Management&lt;/h3&gt;
&lt;p&gt;We&#39;ve hardened how secrets (API keys, database credentials) are stored and accessed. Secrets are never logged, never stored in version control, and are rotated regularly.&lt;/p&gt;
&lt;h3 id=&#34;rate-limiting-ddos-protection&#34; data-toc-text=&#34;Rate Limiting &amp;amp; DDoS Protection&#34;&gt;Rate Limiting &amp;amp; DDoS Protection&lt;/h3&gt;
&lt;p&gt;We&#39;ve implemented rate limiting at multiple layers to protect against abuse while ensuring legitimate traffic always gets through.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;looking-forward&#34; data-toc-text=&#34;Looking Forward&#34;&gt;Looking Forward&lt;/h2&gt;
&lt;p&gt;These improvements compound over time. Faster CI means developers get feedback sooner and ship features quicker. Better observability means we catch issues before users do. Harder infrastructure means we can scale confidently.&lt;/p&gt;
&lt;p&gt;The next phase of work focuses on deployment automation, canary releases, and more sophisticated monitoring. The goal is to make deploying code as boring and reliable as possible—just push to main, everything works, no drama.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&#34;takeaways&#34; data-toc-text=&#34;Takeaways&#34;&gt;Takeaways&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Speed matters&lt;/strong&gt;: 50% faster PR checks keeps developers in flow and lets us iterate faster.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You manage what you measure&lt;/strong&gt;: Structured logging is a force multiplier for reliability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resilience requires discipline&lt;/strong&gt;: Defensive coding, solid testing, and gradual rollouts prevent most production issues.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security is a feature&lt;/strong&gt;: Compliance and hardening aren&#39;t obstacles—they&#39;re table stakes for trustworthy systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Infrastructure compounds&lt;/strong&gt;: Each small improvement makes the next improvement easier to build.&lt;/li&gt;
&lt;/ol&gt;
</content>
    </entry>


</feed>
