Threads for castle

  1. 3

    Given that routes can change at any time, I always assumed this approach would fail for connection-based protocols such as TCP. There’s a risk that different packets from a TCP session might show up at different servers with the same anycast address. I assumed you’d need to run some extra state management on each server to redirect packets to the server that received the SYN packet.

    However, both this article and another article I found on building an anycast network don’t mention this, so I wonder whether it matters in practice.

    1. 6

      I hadn’t thought of that (I helped review this blog post). It looks like that’s entirely possible but mostly a non-issue in practice because a BGP route doesn’t (or shouldn’t) be changing frequently.

      BGP will notice flapping, and it will penalize the flapping link, and the link will get dropped from routing updates. You would be hard-pressed to find what you fear in the real world. ISPs take stability very seriously, and they will block partnerships which display instability.


      If a BGP route does change and starts sending TCP packets mid-connection to a different server, the new server won’t have a record of that connection and will respond with a TCP reset packet I think, which would effectively terminate that connection.

    1. 4

      Company: Render

      Company site:


      Location: San Francisco, CA and/or Remote

      Description: At Render we are building a powerful, easy-to-use cloud platform to host anything online: from simple static sites to complex applications with dozens of microservices. Render offers the flexibility of traditional cloud providers without their complexity and maintenance headaches, so developers and businesses can focus on building delightful products instead of managing servers.

      Tech stack:

      • Go
      • Kubernetes
      • JS / Node.js for front-end

      Contact: Apply through job descriptions linked above, email me, or Twitter DM. Happy to chat about the role/company/my experience candidly (I’m a Developer Advocate and not the hiring manager for these positions).

      1. 6

        I’ve got another blog post to write up on a bluetooth annoyance that I finally looked into. Specifically, that audio quality degrades when you go to use your microphone.

        I’d never noticed this before strangely but I think it only came about when we started having bridge calls, that is, meeting calls that would run all day in the background while we were working from home.

        They weren’t actually meetings but a drop in/drop out channel for having discussions and so on.

        Turns out you can’t really use Spotify (or really any audio) at a high quality while using your microphone. I think it was only exacerbated because Microsoft Teams seemingly claims a hold on your microphone even while muted so you’re constantly at a lower sample rate when in a call.

        If anyone is interested in a lightweight explainer as to why, I’ll be posting it sometime shortly at

        1. 2

          The same thing happens with AirPods on a Mac. To maintain the higher audio quality when I join a video call, I often switch to the Mac’s built in mic instead if the AirPods mic, but keep the audio I hear coming through the AirPods.

          It’s super fiddly and a pain in the butt.

          I’m looking forward to reading your post.

          1. 1

            Mhmm, that’s essentially what I’ve opted to do as well. Interestingly, you can see the sample rate change from 48000hz to 16000hz (or thereabouts) in and vice versa