<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jim Hague on Sinodun Internet Technologies</title>
    <link>https://sinodun.com/authors/jim-hague/</link>
    <description>Recent content in Jim Hague on Sinodun Internet Technologies</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright 2026 Sinodun IT</copyright>
    <lastBuildDate>Tue, 21 Jan 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://sinodun.com/authors/jim-hague/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Working with Materialized View tables in ClickHouse</title>
      <link>https://sinodun.com/post/clickhouse-matviews/</link>
      <pubDate>Tue, 21 Jan 2020 00:00:00 +0000</pubDate>
      <guid>https://sinodun.com/post/clickhouse-matviews/</guid>
      <description>&lt;p&gt;There must be something about January which makes John prod me into a blog post about something I&amp;rsquo;ve just teased out. So here we are, it&amp;rsquo;s 2020, it&amp;rsquo;s January, and what is fast (OK, not so fast) becoming an annual tradition.&lt;/p&gt;&#xA;&lt;p&gt;Today&amp;rsquo;s post is a selection on snippets on Materialized Views. Materialized Views, if you haven&amp;rsquo;t met them, are tables automatically populated when data is inserted into some other table.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Executable External Dictionaries in Clickhouse</title>
      <link>https://sinodun.com/post/clickhouse-exe-dicts/</link>
      <pubDate>Mon, 28 Jan 2019 00:00:00 +0000</pubDate>
      <guid>https://sinodun.com/post/clickhouse-exe-dicts/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://clickhouse.yandex/docs/en/query_language/dicts/external_dicts/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;External dictionaries&lt;/a&gt;, a dictionary populated by an external source, are a rather useful way to make data external to &lt;a href=&#34;http://clickhouse.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;ClickHouse&lt;/a&gt; accessible when working in ClickHouse. One option for the source of the external data is an executable. I found, though, that the documentation doesn’t clearly tell you how to use this, so here I’m trying to rectify this.&lt;/p&gt;&#xA;&lt;p&gt;There are two basic types of executable external dictionary, which I’ll call whole file and lookup dictionaries. Let’s look at each in turn. Oh, and I’m using ClickHouse version 18.5.1 for these examples.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using OpenSSL from inside a chroot</title>
      <link>https://sinodun.com/post/openssl-chroot/</link>
      <pubDate>Mon, 29 Jan 2018 00:00:00 +0000</pubDate>
      <guid>https://sinodun.com/post/openssl-chroot/</guid>
      <description>&lt;p&gt;A little something we tripped over this week. We’re providing an experimental DNS-over-TLS server that supports TLS v1.3. Right now TLS v1.3 is still an Internet Draft; in other words, it’s not a finished standard, though close to it. The latest version of the draft is draft 23, support for which was merged into the OpenSSL master branch yesterday, January 25th. Yup, we’re living on the bleeding edge.&lt;/p&gt;&#xA;&lt;p&gt;Support for the final standard TLS v1.3 will be in the next OpenSSL release, v1.1.1.&lt;/p&gt;</description>
    </item>
    <item>
      <title>More on Debian Jessie/Ubuntu Trusty packet capture woes</title>
      <link>https://sinodun.com/post/more-pcap/</link>
      <pubDate>Tue, 27 Jun 2017 00:00:00 +0100</pubDate>
      <guid>https://sinodun.com/post/more-pcap/</guid>
      <description>&lt;p&gt;Back in September I wrote about a problem we’d come across when capturing traffic with &lt;code&gt;pcap_dispatch()&lt;/code&gt; or &lt;code&gt;pcap_next_ex()&lt;/code&gt; on Ubuntu Trusty or Debian Jessie. When the traffic was slow, we saw packets not being captured.&lt;/p&gt;&#xA;&lt;p&gt;We’ve since done a bit more digging. The problem, we think, is a bug in the Linux kernel &lt;code&gt;select()&lt;/code&gt; system call. With both &lt;code&gt;pcap_dispatch()&lt;/code&gt; and&#xA;&lt;code&gt;pcap_next_ex()&lt;/code&gt; we’re using a central loop that is basically:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pcap_dispatch();&#xA;select(pcapfd, timeout);&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The length of timeout in the select() call shouldn’t matter. But it does. In our test scenario, set it to 1ms and every packet in a ping to an otherwise idle network connection will be captured. Set it to 2s and most or all will be missed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Compressing pcap files</title>
      <link>https://sinodun.com/post/compress-pcap/</link>
      <pubDate>Thu, 08 Jun 2017 00:00:00 +0100</pubDate>
      <guid>https://sinodun.com/post/compress-pcap/</guid>
      <description>&lt;p&gt;Here at Sinodun Towers, we’re often dealing with &lt;code&gt;pcap&lt;/code&gt; DNS traffic capture files created on a far distant server. These files need to be compressed, both to save space on the server, and also to speed transfer to our machines.&lt;/p&gt;&#xA;&lt;p&gt;Traditionally we’ve used &lt;code&gt;gzip&lt;/code&gt; for quick but basic compression, and &lt;code&gt;xz&lt;/code&gt; when space was more important than CPU and we really needed the best compression we could get. At a recent conference, though, an enthusiastic Facebook employee suggested we take a look at &lt;code&gt;zstd&lt;/code&gt;. We’d looked at it quite some time ago, but our contact said it has improved considerably recently. So we thought we’d compare the latest &lt;code&gt;zstd (1.2.0)&lt;/code&gt; with current &lt;code&gt;gzip (1.8)&lt;/code&gt; and &lt;code&gt;xz (5.2.3)&lt;/code&gt; and see how they stack up when you’re dealing with pcap DNS traffic captures.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Packet capture woes with libpcap on Ubuntu Trusty and Debian Jessie</title>
      <link>https://sinodun.com/post/packet-capture/</link>
      <pubDate>Thu, 29 Sep 2016 00:00:00 +0100</pubDate>
      <guid>https://sinodun.com/post/packet-capture/</guid>
      <description>&lt;p&gt;Usually when you’re using libpcap to capture network traffic, your chief worry will be whether or not your application will keep up with the flow of traffic.&lt;/p&gt;&#xA;&lt;p&gt;Today, though, I’ve stubbed my toe on a problem with traffic that’s too slow. It happens with both Ubuntu Trusty and Debian Jessie. If there’s a gap between packets of more than about 50 milliseconds, the first packet to arrive after the gap will be dropped and you’ll never see it. I was capturing DNS queries and responses, and found that with a query rate of under 20 queries per second you start dropping queries. By the time you’re down to 15 queries per second, nearly every query is dropped.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
