<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kerno</title>
    <description>The latest articles on DEV Community by Kerno (@kerno).</description>
    <link>https://dev.to/kerno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1143925%2Fa4329542-2f5e-4b06-a88a-80953d03eee2.png</url>
      <title>DEV Community: Kerno</title>
      <link>https://dev.to/kerno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kerno"/>
    <language>en</language>
    <item>
      <title>Into the Multicloud-Verse with Crossplane</title>
      <dc:creator>Kerno</dc:creator>
      <pubDate>Wed, 20 Sep 2023 14:27:00 +0000</pubDate>
      <link>https://dev.to/kerno/issue-003-into-the-multicloud-verse-with-crossplane-2dh0</link>
      <guid>https://dev.to/kerno/issue-003-into-the-multicloud-verse-with-crossplane-2dh0</guid>
      <description>&lt;p&gt;Welcome to this issue of &lt;a href="https://www.kerno.io/newsletter/activation-function"&gt;Activation Function&lt;/a&gt;. Every other week, we introduce you to a new and exciting open-source backend technology (that you’ve probably only kind of heard about… ) and explain it to you in 5 minutes or less so you can make better technical decisions moving forward.&lt;/p&gt;

&lt;p&gt;In this issue, we’ll explore Crossplane, an open-source framework to provision and manage cloud resources across any cloud provider (aka a multi-cloud control plane) using the magic of Kubernetes.&lt;br&gt;
But wait... Why the heck would I use Kubernetes to do this? Let’s find out.&lt;/p&gt;

&lt;h3&gt;
  
  
  TL;DR:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Crossplane is an incubating CNCF project created in 2018 by Upbound.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crossplane lets you provision &amp;amp; manage infrastructure in a cloud-agnostic way using the Kubernetes API by abstracting the underlying cloud provider. It offers support for all major cloud providers and can be extended to support any third-party tool running pretty much anywhere.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Crossplane is built to serve both Ops and Dev teams. Platform teams can create an interface that application teams can self-serve cloud resources without worrying about implementation details.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why do I need a multi-cloud control plane?
&lt;/h2&gt;

&lt;p&gt;Unless you’ve lived under a rock for the past 10+ years, just like the rest of us, you’re probably hooked on this awesome thing called managed cloud services. It’s convenient to get started with, easy to scale, and, in many cases, cost-efficient.&lt;/p&gt;

&lt;p&gt;Initially, the game was simple – You needed a managed cloud service, you got it from your main cloud provider, and that was it. &lt;/p&gt;

&lt;p&gt;And then,  the cloud wars got REAL, and things went from 0 to 100 real quick!&lt;/p&gt;

&lt;p&gt;You now have so many options to choose from. Mixing and matching (aka adopting a multi-cloud strategy) allows you to pick whatever best fits your use case, budget, compliance, geography, etc.&lt;/p&gt;

&lt;p&gt;But of course, there are always trade-offs. In this case, it’s complexity.&lt;/p&gt;

&lt;p&gt;Running across multiple cloud providers is a mess—fragmented tooling, no portability, different UIs/UXs, no standardization, etc. You get the picture…&lt;/p&gt;

&lt;p&gt;Wouldn’t it be nice to leverage whatever resources best fit your needs because, you know... we’re all so unique and get a single pane of glass, ideally a single API, to manage and abstract away all the complexity?&lt;/p&gt;

&lt;p&gt;Of course you do!&lt;/p&gt;

&lt;h2&gt;
  
  
  Enters Crossplane
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RgygzsiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezj7bmcjnt5q4qai6juu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RgygzsiX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezj7bmcjnt5q4qai6juu.png" alt="source: crossplane.io" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At its simplest, Crossplane is an abstraction layer that lets you provision and orchestrate cloud resources across multiple vendors in a &lt;strong&gt;declarative&lt;/strong&gt; way using a &lt;strong&gt;single unified API&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of it as a universal remote control for cloud services.&lt;/p&gt;

&lt;p&gt;In addition to its declarative and unified nature, Crossplane brings 2 major advantages:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workload portability&lt;/strong&gt; – This allows dev teams to build applications that can run on any cloud provider without any modifications. We’ll break this down later in the how it works section.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reconciliation loop&lt;/strong&gt; – This ensures that the state of your deployment matches the state of the configuration you passed in.&lt;/p&gt;

&lt;p&gt;Does this all sound familiar? Well, it should, as this is what Kubernetes does for containers.&lt;/p&gt;

&lt;p&gt;In fact, Crossplane is essentially extending Kubernetes beyond the cluster and turning it into a universal Control Plane. It has adopted the Kubernetes declarative resource management model and leverages the Kubernetes API, etcd, and controllers to manage external cloud services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition:&lt;/strong&gt; A Control Plane is a system that provides cloud infrastructure management, routing, and orchestration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VPH27huo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/me9zwkzje271nvzck46j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VPH27huo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/me9zwkzje271nvzck46j.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Given this tight integration with Kubernetes, Crossplane plays nicely with most tools in the Kubernetes ecosystem (e.g., Argo CD) AND can run directly on top of an existing Kubernetes cluster without requiring any changes.&lt;/p&gt;

&lt;p&gt;And there you have it… That’s why Kubernetes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; Kubernetes manages containers (pods) and the resources they consume across nodes. Crossplane manages workloads (container, serverless, others) and the resources they consume across cloud providers or on-premise environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Crossplane work?
&lt;/h2&gt;

&lt;p&gt;To use Crossplane,  you must first &lt;a href="https://docs.crossplane.io/v1.13/software/install/"&gt;install its control plane&lt;/a&gt; in a Kubernetes Cluster. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Crossplane must be installed in a Kubernetes cluster—either where your applications run or a new one.&lt;/p&gt;

&lt;p&gt;Crossplane extends the Kubernetes API using custom resource definitions (CRDs) known as Providers responsible for creating and managing external cloud-provider-specific services (e.g., an RDS database). Crossplane &lt;a href="https://marketplace.upbound.io/providers"&gt;has a Provider for every major cloud&lt;/a&gt;, including AWS, GCP, and Azure, but you can also build custom Providers using the &lt;a href="https://github.com/crossplane/provider-template"&gt;provider template&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GtwdzX4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skph1hvbuae04h383s49.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GtwdzX4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skph1hvbuae04h383s49.png" alt="Crossplane Provider Ecosystem" width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
Once your Provider is installed, you must configure it with the necessary security credentials and endpoint details to communicate with your cloud provider's API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VYOL5SKB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1anf5dpnqb7h879qr3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VYOL5SKB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1anf5dpnqb7h879qr3z.png" alt="Crossplane Simplified Diagram" width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
Once that’s all set, you’re ready to start creating resources (e.g., an RDS instance)  to be managed by the Provider. These are called Managed Resources, and you create them by declaring a Kubernetes custom resource (CR) that specifies things like the size, type, and any other configurations specific to the cloud resource you want to spin up.&lt;/p&gt;

&lt;p&gt;This is where the &lt;strong&gt;Provider’s reconciliation mechanism&lt;/strong&gt; kicks in, and the magic happens. The Provider’s controller detects the change (desired state), and the Provider communicates with the cloud provider's API and attempts to reconcile the actual state of the cloud resource with the desired state declared in the CR, in this scenario, creating an RDS instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; Crossplane Managed Resources are just Kubernetes resources, which means that you can use any Kubernetes tool to monitor and query the state of these resources&lt;/p&gt;

&lt;p&gt;But what if you need to spin up other components alongside the main one (e.g., networking, security, RBAC, etc.)? Compositions are here to help!&lt;/p&gt;

&lt;p&gt;Compositions let you create multiple individual Managed Resources as a single object known as Composite Resources (XR). Like Managed Resources, XRs have a reconciliation loop that will sync their desired and actual state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; Before being able to create Composite Resources, you’ll need to create a Composite Resource Definition (XDR), which defines the schema for a custom API you’ll use to create your XRs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Crossplane for Devs
&lt;/h2&gt;

&lt;p&gt;Crossplane was created to serve both Administrators (e.g., Platform Engineers) and Developers. So far, we’ve explored the administrator side of things, but what’s in it for devs?&lt;/p&gt;

&lt;p&gt;This is where portability comes into play. With the help of Crossplane, Developers can define workloads without worrying about implementation details, environment constraints, and policies.&lt;/p&gt;

&lt;p&gt;They do this by leveraging Claims.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--izhFPcXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1erl7g0z9ot3qsakzfoa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--izhFPcXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1erl7g0z9ot3qsakzfoa.png" alt="Crossplane Simplified Diagram&amp;lt;br&amp;gt;
" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claims are the primary way developers interact with Crossplane. Claims access the custom APIs the platform team defines in a Composite Resource Definition to create the developer's desired resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; Claims are like Composite Resources. The difference between Claims and composite resources is that Crossplane can create Claims in a namespace, while composite resources are cluster-scoped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Crossplane Vs. Terraform
&lt;/h2&gt;

&lt;p&gt;Like Crossplane, Terraform lets you dynamically provision and declaratively make infrastructure changes across cloud providers and build reusable components. However, there are a couple of differences worth pointing out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State Management&lt;/strong&gt; – Crossplane offers out-of-the-box automated reconciliation (aka drift correction) leveraging Kubernetes controllers and etcd. On the other hand, unless you’re using a Terafform cloud, you’ll need to configure your own backend and manage the state of your resources manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Policy-Driven Provisioning&lt;/strong&gt; – Crossplane provides a native policy framework to enable policy-driven provisioning and management. On the other hand, Terraform requires external tools to do the same. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That being said, Terraform is a much more established technology with a huge ecosystem of tools and a large community. Additionally, Terraform is a standalone tool, whereas Crossplane requires you to run Kubernetes. Finally, the lack of a preview feature similar to Terraform's dry-run/plan feature to assess and verify changes in advance is another drawback of Crossplane.&lt;/p&gt;

&lt;p&gt;So which solution should you go with? Well, as usual, it depends. &lt;/p&gt;

&lt;p&gt;Are you ready to go all-in on Kubernetes? Do you already have expertise in HCL? Do you like managing infrastructure using APIs? Does your existing tooling (e.g., CI/CD tooling) play nice with Kubernetes? Is the Terraform Open Source license an issue?&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to next
&lt;/h2&gt;

&lt;p&gt;Crossplane is still a fairly new project; therefore, resources and documentation are still limited. That being said, here are a few resources to get you started on the right path:&lt;/p&gt;

&lt;h3&gt;
  
  
  Documentation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/crossplane/crossplane"&gt;Crossplane GitHub repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.crossplane.io/"&gt;Crossplane documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/orgs/crossplane/projects/20/views/3"&gt;Crossplane roadmap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://crossplane.io/"&gt;Crossplane website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Articles &amp;amp; Tutorials
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.google.com/document/d/1whncqdUeU2cATGEJhHvzXWC9xdK29Er45NJeoemxebo/edit"&gt;An Introduction to Crossplane&lt;/a&gt; – The original and first introduction written by the creators of Crossplane&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://vrelevant.net/archive/"&gt;vRelevant Blog&lt;/a&gt; – A blog written by Nate Reid covering various cloud computing topics, including Crossplane.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.baeke.info/2022/07/23/first-steps-with-crossplane/"&gt;First steps with Crossplane&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Books
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.oreilly.com/library/view/end-to-end-automation-with/9781801811545/"&gt;End-to-End Automation with Kubernetes and Crossplane&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://freecontent.manning.com/defining-infrastructure-declaratively-with-crossplane/"&gt;Defining Infrastructure Declaratively with Crossplane&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.manning.com/books/platform-engineering-on-kubernetes"&gt;Platform Engineering on Kubernetes
&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Videos &amp;amp; talks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/5WRkVUlEgHI?si=Nwiwmw4sEY3vDdDM"&gt;Crossplane Intro and Deep Dive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/live/lzBWIhYC5_E?si=kKEfhMFSRZuB1Jdi"&gt;How to provision a production cluster with Crossplane&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/live/aWRWKnniqeM?si=_QFCUbT7Lcc66gdW"&gt;Crossplane on Amazon EKS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=7In1PquH5tc"&gt;Secure and multi-tenant infrastructure as code with Crossplane &amp;amp; Argo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/DLOjkUDEbIw?si=6IdtAjG6Ec8pyYLL"&gt;Anthos &amp;amp; Crossplane for Lifecycle Management of Infrastructure and Kubernetes Config&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Communities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://slack.crossplane.io/"&gt;Crossplane Slack group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/crossplane_io"&gt;Crossplane Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://community.cncf.io/crossplane/"&gt;CNCF Crossplane community group&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UC19FgzMBMqBro361HbE46Fw"&gt;Crossplane YouTube channel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://groups.google.com/g/crossplane-dev?pli=1"&gt;Crossplane Forum&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  People to follow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/vfarcic"&gt;Viktor Farcic&lt;/a&gt; – Developer Advocate at Upbound&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/bassamtabbara"&gt;Bassam Tabbara&lt;/a&gt; – Crossplane co-creator&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/jbw976"&gt;Jared Watts&lt;/a&gt; – Crossplane co-creator&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/illya_chekrygin"&gt;Illya Chekrygin&lt;/a&gt; – Crossplane co-creator&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/luebken"&gt;Matthias Lübken&lt;/a&gt; – PM at Upbound&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it, folks! I hope this gave you an overview of Crossplane. There are a lot of technical nuances to effectively implementing Crossplane and tailoring it to your needs, so I strongly recommend looking at the documentation.&lt;/p&gt;

&lt;p&gt;Until next time!&lt;/p&gt;

&lt;p&gt;P.S. Did you enjoy this content? &lt;a href="https://www.kerno.io/newsletter/activation-function"&gt;Sign up here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Programming the Kernel with eBPF</title>
      <dc:creator>Kerno</dc:creator>
      <pubDate>Tue, 05 Sep 2023 09:23:55 +0000</pubDate>
      <link>https://dev.to/kerno/programming-the-kernel-with-ebpf-5bpa</link>
      <guid>https://dev.to/kerno/programming-the-kernel-with-ebpf-5bpa</guid>
      <description>&lt;p&gt;Welcome to this issue of &lt;a href="https://www.kerno.io/newsletter/activation-function"&gt;Activation Function&lt;/a&gt;. Every month, we introduce you to a new and interesting open-source backend technology (that you’ve probably only kind of heard about… ) and explain it to you in 5 minutes or less so you can make better technical decisions moving forward.&lt;/p&gt;

&lt;p&gt;In this issue, we’ll explore eBPF (Extended Berkeley Packet Filter), an exciting new technology that makes programming the kernel flexible, safe, and accessible to developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;TLDR&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;eBPF is a mechanism that makes the kernel dynamically programmable without modifying the source code.&lt;/li&gt;
&lt;li&gt;eBPF is safe, fast, incredibly flexible, and extensible.&lt;/li&gt;
&lt;li&gt;eBPF has been running in production for over half a decade at internet scale on millions of servers.&lt;/li&gt;
&lt;li&gt;eBPF use cases range from observability, networking, security, tracing, and profiling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[IMPORTANT NOTE]&lt;/strong&gt; eBPF is now a standalone term that doesn’t stand for anything. You'll see the term BPF in Linux source code, and you'll see BPF and eBPF used interchangeably in tooling and documentation. The original BPF is sometimes referred to as cBPF (classic BPF) to distinguish it from eBPF.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why program the Kernel?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The kernel can oversee and control the entire system, which, on the one hand, makes it the ideal place to implement networking, security, and observability capabilities and, on the other hand, makes it very risky to fiddle with.&lt;/p&gt;

&lt;p&gt;As a result, innovation at the kernel level has been super slow! After all, as the saying goes,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With great power comes great responsibility.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Up until recently, if you wanted to add functionality to the kernel, you had two options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Try to change the kernel's source code and convince the community that the change is required, which, as you can imagine, took ages.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZ7Ew1FB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dmff7vzlwaextp3x0js.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZ7Ew1FB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dmff7vzlwaextp3x0js.png" alt="Source: The State &amp;amp; Future of eBPF – Thomas Graf, Isovalent&amp;lt;br&amp;gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://linux-kernel-labs.github.io/refs/heads/master/labs/kernel_modules.html#"&gt;Load kernel modules&lt;/a&gt; (LKMs) can be risky on many levels… (security, performance, stability, compatibility, and the list goes on.) and costly to maintain as every kernel version upgrade can break them.
Enters eBPF&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Enters eBPF&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R-9vdr1r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uqv5i7v47s97whwegn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R-9vdr1r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uqv5i7v47s97whwegn5.png" alt="Source: The State &amp;amp; Future of eBPF – Thomas Graf, Isovalent&amp;lt;br&amp;gt;
" width="800" height="634"&gt;&lt;/a&gt;&lt;br&gt;
‍&lt;br&gt;
eBPF is a mechanism that makes the kernel dynamically programmable, kind of like how JavaScript lets you dynamically change the behavior of a webpage. Here is a great high-level explanation by &lt;a href="https://www.brendangregg.com/blog/2019-01-01/learn-ebpf-tracing.html"&gt;Brendan Gregg&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;eBPF does to Linux what JavaScript does to HTML. (Sort of.) So, instead of a static HTML website, JavaScript lets you define mini-programs that run on events like mouse clicks, which are run in a safe virtual machine in the browser. And with eBPF, instead of a fixed kernel, you can now write mini-programs that run on events like disk I/O, which are run in a safe virtual machine in the kernel. In reality, eBPF is more like the v8 virtual machine that runs JavaScript rather than JavaScript itself. eBPF is part of the Linux kernel.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Although eBPF is far from completely replacing LKMs, it sets itself apart by bringing great flexibility while mitigating risk by putting solid safety and controls in place.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How we got here?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;1992 – &lt;a href="https://en.wikipedia.org/wiki/Van_Jacobson"&gt;Van Jacobson&lt;/a&gt; wanted to troubleshoot network issues, but existing network filters were too slow. He and his team developed BPF (Berkeley Packet Filter) to be fast, efficient, and easily verifiable to run in the kernel safely.&lt;/p&gt;

&lt;p&gt;BPF was a great technology, but it had a few limitations that became apparent over the years as networking technology evolved. Among other things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It wasn't adapted to modern processors and multi-processor systems.
&lt;/li&gt;
&lt;li&gt;It was stateless, which made it a bad fit for complex packet operations.&lt;/li&gt;
&lt;li&gt;It took a lot of work to extend for developers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2014 – &lt;a href="https://www.linkedin.com/in/alexey1/"&gt;Alexei Starovoitov&lt;/a&gt; introduced the extended BPF (eBPF) design that took things to a whole new level by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overhauling the BPF instruction set to take advantage of modern hardware.&lt;/li&gt;
&lt;li&gt;Introducing &lt;em&gt;Helper&lt;/em&gt; functions that eBPF programs can call to interact with the system.&lt;/li&gt;
&lt;li&gt;Introducing the &lt;em&gt;bpf() system call&lt;/em&gt; so that user space programs can interact with eBPF programs in the kernel.&lt;/li&gt;
&lt;li&gt;Introducing the eBPF &lt;em&gt;verifier&lt;/em&gt; which ensures that an eBPF program is loaded only if it’s safe to run.&lt;/li&gt;
&lt;li&gt;Moving beyond packet filtering and opening the door for many use cases around networking, observability, security, tracing, and profiling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, eBPF is a general-purpose compute engine within the Linux kernel that allows you to hook into, observe, and act upon anything happening in the kernel&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://youtu.be/DAvZH13725I"&gt;this talk&lt;/a&gt; by Alexei Starovoitov for an in-depth history of eBPF.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How does eBPF work?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before we delve into this, it’s essential to understand the difference between the kernel and user space in Linux.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jYuFXI69--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8abrqwts3qwdh0n302ym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jYuFXI69--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8abrqwts3qwdh0n302ym.png" alt="Source — https://ebpf.io/" width="720" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a quick rundown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Linux kernel is the software layer that sits between your applications and the hardware they run on in a layer called the &lt;em&gt;user space&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;The user space is &lt;em&gt;unprivileged&lt;/em&gt;; therefore, it can’t access the hardware directly.&lt;/li&gt;
&lt;li&gt;When an application requires something from the hardware, it will need to request the kernel, which is &lt;em&gt;privileged&lt;/em&gt;, to do it on its behalf using the system call (syscall) interface.&lt;/li&gt;
&lt;li&gt;The kernel then relays the request to the hardware, coordinating concurrent requests and ensuring everything runs smoothly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alright, back to eBPF. Without going the rabbit hole, here is how it works on a high level:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--osVubO4o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wm1fj2hfshf1r07z3ypp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--osVubO4o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wm1fj2hfshf1r07z3ypp.png" alt="How eBPF works (Simplified)" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step #1 | Program Development&lt;/strong&gt;&lt;br&gt;
You can write your own eBPF program using a tool like &lt;a href="https://github.com/iovisor/bpftrace"&gt;bpftrace&lt;/a&gt; that provides an easy-to-learn high-level language or the &lt;a href="https://github.com/iovisor/bcc"&gt;BPF Compiler Collection (BCC) Python framework&lt;/a&gt;. The program is then compiled into bytecode.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; As a beginner, you don’t need to write eBPF code from scratch, as BCC comes with over 70 tools you can use out of the box. Here is a glimpse of what you have at your disposal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AjkTe1OE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h3s3auh1knw9fadw37ot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AjkTe1OE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h3s3auh1knw9fadw37ot.png" alt="Source — https://www.brendangregg.com/" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step #2 | Program Verification&lt;/strong&gt;&lt;br&gt;
The bytecode runs through the eBPF verifier inside a VM to ensure it will not harm the system before being loaded into the kernel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; The verification process is quite complex. You can read more about it &lt;a href="https://docs.kernel.org/bpf/verifier.html"&gt;here&lt;/a&gt;. Although much work has gone into improving and simplifying it, you can still run into strange errors when developing your program. If you need help, check out the &lt;a href="http://ebpf.io/slack"&gt;eBPF Slack community channel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step #3 | Program Attachment&lt;/strong&gt;&lt;br&gt;
The verified program is loaded into the kernel and attached to predefined hook points before being further JIT compiled at runtime into native machine instructions to ensure maximum performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step #4 | Program Execution&lt;/strong&gt;&lt;br&gt;
The program is triggered on predefined events and helper functions are called.&lt;/p&gt;

&lt;p&gt;Maps are then used to pass data between the kernel and user space or other eBPF functions and to maintain the state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Note]&lt;/strong&gt; eBPF program becomes active when loaded into the kernel. You don’t need to reboot the machine, restart existing processes, or change anything about other applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;eBPF in production&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Since its inception in 2014, eBPF capabilities have continued to grow, supported by 300+ kernel developers and major tech players, including Netflix, Meta, Google, Cloudflare, DoorDash, and many others, running eBPF-based tools in production for over half a decade 24/7 at internet scale on millions of servers. Let's look at some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://engineering.linkedin.com/blog/2022/skyfall--ebpf-agent-for-infrastructure-observability"&gt;LinkedIn uses eBPF&lt;/a&gt; for Infrastructure Observability.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://netflixtechblog.com/how-netflix-uses-ebpf-flow-logs-at-scale-for-network-insight-e3ea997dca96"&gt;Netflix has developed a network observability&lt;/a&gt; sidecar called Flow Exporter, which uses eBPF tracepoints to capture TCP flows in near real-time.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.cloudflare.com/tag/ebpf/"&gt;Cloudflare uses eBPF for network security&lt;/a&gt;, performance monitoring, and network observability
&lt;a href="https://www.youtube.com/watch?v=ZBlJSr6XkN8"&gt;Apple uses eBPF&lt;/a&gt; for kernel security monitoring.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=ZYBXZFKPS28"&gt;Meta uses eBPF to process and load balance&lt;/a&gt; every packet coming into their data centers.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://doordash.engineering/2023/08/15/bpfagent-ebpf-for-monitoring-at-doordash/"&gt;DoorDash uses eBPF&lt;/a&gt; for application monitoring.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://youtu.be/gcHxfhDT-I4"&gt;Digital Ocean&lt;/a&gt; and &lt;a href="https://youtu.be/7bdy2AkRjqE"&gt;Cruise&lt;/a&gt; use eBPF for GPU performance monitoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the list &lt;a href="https://ebpf.io/case-studies/"&gt;goes on&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;eBPf limitations&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;No technology is perfect, and eBPF isn't an exception. Let's discuss a few current limitations you should be aware of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;eBPF was initially released in a limited capacity in 2014 with Linux 3.18. You need at least Linux 4.4 or above to use eBPF fully.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nakryiko.com/posts/bpf-portability-and-co-re/"&gt;Despite much work, eBPF portability&lt;/a&gt; between kernel versions and distributions is still not 100% there.&lt;/li&gt;
&lt;li&gt;eBPF is still a pretty complex technology that isn't easy to grasp for the average developer. Anyone working with eBPF will need a solid knowledge of networking and kernel inner workings.&lt;/li&gt;
&lt;li&gt;eBPF is still in the early stages of expanding to other OS ecosystems, with &lt;a href="http://microsoft/ebpf-for-windows%20%20GitHub%20https://github.com%20%E2%80%BA%20microsoft%20%E2%80%BA%20ebpf-for-windows"&gt;Windows leading the charge&lt;/a&gt; &lt;strong&gt;.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Despite great efforts by the community and large companies like Google to secure eBPF, it's still vulnerable &lt;a href="https://www.blackhat.com/us-21/briefings/schedule/index.html?spm=a2c65.11461447.0.0.bd5ece2fifCnt1#with-friends-like-ebpf-who-needs-enemies-23619"&gt;to cyber attacks&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;eBPF-based projects&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Despite a lot of effort put in by the community to make eBPF more accessible, there reality is that it's still quite a complex technology to work with for the majority of developers.&lt;/p&gt;

&lt;p&gt;The good news is that if you want to leverage the power of eBPF, there are a growing number of projects that can help you do that without writing eBPF programs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;​​&lt;a href="https://falco.org/"&gt;Falco&lt;/a&gt; is a behavioral activity monitor designed to detect anomalous activity in applications.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/cilium/tetragon"&gt;Tetragon&lt;/a&gt; provides eBPF-based transparent security observability combined with real-time runtime enforcement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/parca-dev/parca"&gt;Parca&lt;/a&gt; helps you track memory, CPU, I/O bottlenecks broken down by method name, class name, and line number over time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cilium.io/"&gt;Cilium&lt;/a&gt; is an open source project that provides eBPF-powered networking, security and observability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/projectcalico/calico"&gt;Calico&lt;/a&gt; Open Source is designed to simplify, scale, and secure container and Kubernetes networks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/cilium/hubble"&gt;Hubble&lt;/a&gt; is a fully distributed networking and security observability platform for cloud native workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/cilium/pwru"&gt;pwru&lt;/a&gt; is an eBPF-based tool for tracing network packets in the Linux kernel with advanced filtering capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/pixie-io/pixie"&gt;Pixie&lt;/a&gt; is an open source observability tool for Kubernetes applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kerno.io/"&gt;Kerno&lt;/a&gt; provides the best developer experience to monitor and troubleshoot distributed cloud-native applications quickly and autonomously.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the &lt;a href="https://ebpf.io/applications"&gt;list goes on&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Where to next?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If eBPF sounds like your cup of tea, and you're interested in exploring further, you're in luck, as many great free resources are available. Here are a few:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Documentation&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.kernel.org/doc/html/latest/bpf/index.html"&gt;BPF Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cilium.readthedocs.io/en/stable/bpf/"&gt;BPF &amp;amp; XDP Reference Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/bpf/bpf_design_QA.rst"&gt;BPF Design Q&amp;amp;A&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Articles &amp;amp; Blogs&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://lwn.net/Articles/740157/"&gt;A thorough introduction to eBPF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.brendangregg.com/"&gt;Brendan Gregg's blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ebpf.io/"&gt;eBPF's official community website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.researchgate.net/publication/349173667_eBPF_-_From_a_Programmer's_Perspective"&gt;eBPF - From a Programmer's Perspective&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/lizrice/ebpf-beginners"&gt;The Beginner's Guide to eBPF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Tutorials&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/iovisor/bcc/blob/master/docs/tutorial_bcc_python_developer.md"&gt;bcc Python Developer Tutorial&lt;/a&gt;. This tutorial is about developing &lt;a href="https://github.com/iovisor/bcc"&gt;bcc&lt;/a&gt; tools and programs using the Python interface&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.brendangregg.com/blog/2019-01-01/learn-ebpf-tracing.html"&gt;Learn eBPF Tracing&lt;/a&gt;: Tutorial and Examples.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/iovisor/bpftrace/blob/master/docs/tutorial_one_liners.md"&gt;The bpftrace One-Liner Tutorial&lt;/a&gt; - Learn bpftrace for Linux in 12 easy lessons, where each lesson is a one-liner you can try running&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Books&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://isovalent.com/learning-ebpf/"&gt;Learning eBPF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://isovalent.com/ebpf/"&gt;What is eBPF?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.oreilly.com/library/view/linux-observability-with/9781492050193/"&gt;Linux Observability with BPF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://isovalent.com/ebpf-security/"&gt;Security Observability with eBPF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Videos &amp;amp; talks&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/f-oTe-dmfyI?si=FKMRnJ3ldDTZ0IOf"&gt;eBPF - Rethinking the Linux Kernel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/0p987hCplbk?si=dbpzOMhyastCLSx5"&gt;Beginner's Guide to eBPF Programming for Networking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/C-fWG6PUGVw?si=ouqZzqTsH-4GVwuP"&gt;eBPF - The Future Of Isolated/Malware Analysis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Communities&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://ebpf.io/slack"&gt;eBPF Slack community channel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/tagged/ebpf+or+bpf+or+xdp-bpf"&gt;eBPF Stack Overflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/eBPF/"&gt;eBPF reddit community&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;People to follow&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/brendangregg"&gt;Brendan Gregg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/lizrice"&gt;Liz Rice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/alexei_ast"&gt;Alexei Starovoitov&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/davem_dokebi"&gt;David S. Miller&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it for today. I hope this gave you a good idea of what eBPF is and how you can use it for your next project. There is still SO MUCH to unpack when it comes to eBPF, so I encourage you to go out and explore!&lt;/p&gt;

&lt;p&gt;Until next time!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>ebpf</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Redefining Time Series Analytics @ Pinterest &amp; Scaling Dev Tools @ Meta</title>
      <dc:creator>Kerno</dc:creator>
      <pubDate>Tue, 22 Aug 2023 14:48:56 +0000</pubDate>
      <link>https://dev.to/kerno/redefining-time-series-analytics-pinterest-scaling-dev-tools-meta-10la</link>
      <guid>https://dev.to/kerno/redefining-time-series-analytics-pinterest-scaling-dev-tools-meta-10la</guid>
      <description>&lt;p&gt;&lt;strong&gt;Welcome to Activation Function&lt;/strong&gt; – Each week we help you discover, understand, and draw inspiration from interesting open-source backend technologies used by top software companies.&lt;/p&gt;

&lt;p&gt;Sounds like your cup of tea? Great! Subscribe &lt;a href="https://activation-function.beehiiv.com/subscribe"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alright, let's dive in. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Issue 001 | TScript &amp;amp; Goku to Streamline Time Series Analytics for Observability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;TScript is a language the Pinterest engineering team designed to streamline time series database queries and analytics. The goal was to create a language that encapsulates DB queries as variables, allows for multiline entries, makes the queries expandable, provides a filter for DB queries, and is verbose enough for the user to quickly understand the syntax from a time series context.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/pinterest-engineering/goku-building-a-scalable-and-high-performant-time-series-database-system-a8ff5758a181"&gt;Goku&lt;/a&gt; was the DB chosen by the Pinterest engineering team after evaluating the performance of Ganglia, Graphite, and OpenTSDB. Goku has four distinct advantages over OpenTSDB (the leading contender):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Goku uses an inverted index engine - a significant efficiency improvement over OpenTSDB.&lt;/li&gt;
&lt;li&gt;Goku implements Gorilla compression - 12x compression.&lt;/li&gt;
&lt;li&gt;Goku’s engine computes near the storage layer allowing for parallel processing and, thus, faster response times.&lt;/li&gt;
&lt;li&gt;Goku uses thrift binary over JSON (OpenTSDB) - faster queries at scale.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--A3Zxv-aR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbtj4qq9rxark1acfzdt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A3Zxv-aR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbtj4qq9rxark1acfzdt.png" alt="Figure 1.1 - Goku / TScript Queries Diagram" width="641" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TScript leverages multiple features, making it easier for developers to create queries and dashboards that visualize the results. Combining explicit syntax and graphing functionalities, the following snippet (See Figure 1.2) will return a dashboard (See Figure 1.3) with appropriate markings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5vAmVggn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/464dcrmjvobk6075g7tq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5vAmVggn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/464dcrmjvobk6075g7tq.png" alt="Figure 1.2 - Basic TScript query that retrieves data on a 10-minute interval and labels it based on two thresholds" width="800" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wiqxK0Da--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbv5hrnqrf2a4aixhqjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wiqxK0Da--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbv5hrnqrf2a4aixhqjd.png" alt="Figure 1.3 - Visualization of data from the Tscript query with color codes based on thresholds" width="800" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The team's key challenge was data processing after it was returned from the DB. By preallocating memory using NumPy NaN values, it’s possible to consolidate DataFrames and achieve a considerable performance improvement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scaling developer tools - Meta’s approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Meta has an extensive codebase; at scale, the company has experienced challenges with the current best-in-class tools (Ex: Git, GitHub) - Sapling was born. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://engineering.fb.com/2022/11/15/open-source/sapling-source-control-scalable/"&gt;Sapling&lt;/a&gt; provides multiple features aimed at working with multiple repositories, simplifying UI, and augmenting operations we’ve taken for granted. For example, it’s optimized for lazy loading the files of a repository, thus making it efficient for retrieving large amounts of files and making it possible to work on massive sets of files without local storage. The drawback is that this requires a constant connection to the web. The second major update was layering a set of features/commands on top of Git - Branching and merging now allow for concurrent development. As an engineer awaits code review, they’re able to keep working on their code.&lt;/p&gt;

&lt;p&gt;Meta engineers push code to production on a regular basis. At scale, removing friction between developers and them running their code is a key undertaking for leadership. The engineering team has released the second version of Buck - &lt;a href="https://github.com/facebook/buck2"&gt;Buck2&lt;/a&gt;. It’s an open-source large-scale build system that benchmarked 2x as fast at completing builds as Buck1.&lt;/p&gt;

&lt;p&gt;Static code analysis plays a vital role at Meta. By incorporating several platforms into the process, Meta engineers have validated their code and mitigated crashes and potential issues - Infer, RacerD, and Jest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://fbinfer.com/"&gt;Infer&lt;/a&gt; is easy to install and deploy within Java, C, C++, and Objective-C applications. It’s possible to run validations on portions of a project; here’s an example of validating a branch called “feature” and a “main.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ABo_o5b6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fz0y17oltminmcqh1r00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ABo_o5b6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fz0y17oltminmcqh1r00.png" alt="Figure 2.1 - Differential Workflow of Infer applied to a feature branch" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RacerD was a project that stemmed from the need for concurrency analysis at scale. Engineers at Meta released an MVP in 2017 with the following features in mind:&lt;/p&gt;

&lt;p&gt;Prioritizing a high signal detection ensures that numerous alerts don't overwhelm developers. High false positives can lead to "alert fatigue," where developers begin to ignore warnings, potentially overlooking real issues.&lt;/p&gt;

&lt;p&gt;An interprocedural analysis approach indicates a deeper view of the codebase. By tracking data races through nested procedure calls, the tool can understand the context better, capturing the bigger picture of potential data races in larger, modular projects.&lt;/p&gt;

&lt;p&gt;Eliminating the need for manual annotations streamlines the analysis process. Manual annotations can be error-prone, tedious, and become outdated as code evolves. Automating this or using tools that infer these relationships ensures consistency and reduces maintenance overhead.&lt;/p&gt;

&lt;p&gt;Speed is crucial in modern software development, especially with CI/CD pipelines. Rapidly analyzing and reporting on a massive codebase ensures the development workflow remains uninterrupted, promoting higher code quality and faster release cycles.&lt;/p&gt;

&lt;p&gt;Differentiating between joint (coarse-grained locking) and rare (fine-grained synchronization) in product code underscores the primary focus on understanding and analyzing coarse-grained locking. This pragmatic approach ensures the most frequent potential issues are addressed first, leading to more stable software.&lt;/p&gt;

&lt;p&gt;The resulting tool showcases the possibility of static concurrency analysis for rapidly evolving, vast codebases like Meta's. Its genius is automating the understanding of threads, locks, and memory, eliminating the need for manual, error-prone human input. This automation seamlessly integrates into multiple developers' workflows. Core features like the News Feed, which preemptively addressed over 1,000 concurrency concerns, wouldn't be sustainable without such efficiency and scale in a concurrent environment. This represents the true impact of next-gen analysis.&lt;/p&gt;

&lt;p&gt;You may have noticed that Infer isn’t available for languages other than C, C++, Java, and Objective-C. As JavaScript remains a dominant language in the web vertical, Meta needed a testing framework that addressed this segment - &lt;a href="https://jestjs.io/"&gt;Jest&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Jest was created with simplicity in mind and currently supports projects that use the most popular runtimes, such as Node.js. Jest optimizes testing efficiency by ensuring tests maintain a unique global state, enabling parallel execution without hiccups. Jest smartly prioritizes previously failed tests to expedite the process and adjusts the test sequence based on file execution times. This strategy saves time and ensures the most crucial issues are addressed first, showcasing intelligent test management.&lt;/p&gt;

&lt;p&gt;📝 References&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://medium.com/pinterest-engineering/analyzing-time-series-for-pinterest-observability-95f8cc0c5885"&gt;Analyzing Time Series for Pinterest Observability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://engineering.fb.com/2023/06/27/developer-tools/meta-developer-tools-open-source/"&gt;Meta developer tools: Working at scale&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.toGoku:%20Building%20a%20scalable%20and%20high-performant%20time%20series%20database%20system"&gt;Goku: Building a scalable and high-performant time series database system&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://engineering.fb.com/2022/11/15/open-source/sapling-source-control-scalable/"&gt;Sapling: Source control that’s user-friendly and scalable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://engineering.fb.com/2023/04/06/open-source/buck2-open-source-large-scale-build-system/"&gt;Build faster with Buck2: Our open-source build system&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fbinfer.com/"&gt;A tool to detect bugs in Java and C/C++/Objective-C code before it ship&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://engineering.fb.com/2017/10/19/android/open-sourcing-racerd-fast-static-race-detection-at-scale/"&gt;Open-sourcing RacerD: Fast static race detection at scale&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jestjs.io/"&gt;Jest is a delightful JavaScript Testing Framework with a focus on simplicity&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>backend</category>
      <category>devops</category>
      <category>microservices</category>
      <category>kubernetes</category>
    </item>
  </channel>
</rss>
