<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mehul Arora on</title><link>https://bce40cb0.metalbear-com.pages.dev/contributors/mehul-arora/</link><description>Recent content in Mehul Arora on</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Copyright (c) 2022 MetalBear</copyright><lastBuildDate>Thu, 12 May 2022 08:50:45 +0000</lastBuildDate><atom:link href="https://bce40cb0.metalbear-com.pages.dev/contributors/mehul-arora/index.xml" rel="self" type="application/rss+xml"/><item><title>Hooking Go from Rust - Hitchhiker’s Guide to the Go-laxy</title><link>https://bce40cb0.metalbear-com.pages.dev/blog/hooking-go-from-rust-hitchhikers-guide-to-the-go-laxy/</link><pubDate>Wed, 17 Aug 2022 15:00:00 +0000</pubDate><guid>https://bce40cb0.metalbear-com.pages.dev/blog/hooking-go-from-rust-hitchhikers-guide-to-the-go-laxy/</guid><description>&lt;p>Most mainstream programming languages strive to fit into a few common standards, to increase interoperability and decrease adoption friction. Golang isn’t one of those (there &lt;a href="https://spectralops.io/blog/rust-vs-go-why-not-use-both/" target="_blank">are&lt;/a> &lt;a href="https://words.filippo.io/rustgo/" target="_blank">several&lt;/a> &lt;a href="https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang" target="_blank">articles&lt;/a> on the subject). In this blog post we’ll demonstrate how to overcome Go’s isolationist design and integrate with it from another language (in our case Rust).&lt;/p>
&lt;p>Why do we need to interop with Go? mirrord&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> works by &lt;a href="https://metalbear.com/blog/mirrord-internals-hooking-libc-functions-in-rust-and-fixing-bugs/" target="_blank">hooking system calls to the operating systems&lt;/a> and applying logic that decides whether to execute locally or remotely. To do that, mirrord side-loads (using &lt;code>LD_PRELOAD&lt;/code>) into the process, then hooks relevant functions.
To cover most common scenarios, mirrord hooks libc functions and this works for most common languages (Python, Go on macOS, Rust, Node to name a few) as they all rely on libc.&lt;/p></description></item><item><title>Getting Started With Ephemeral Containers</title><link>https://bce40cb0.metalbear-com.pages.dev/blog/getting-started-with-ephemeral-containers/</link><pubDate>Thu, 21 Jul 2022 00:00:00 +0000</pubDate><guid>https://bce40cb0.metalbear-com.pages.dev/blog/getting-started-with-ephemeral-containers/</guid><description>&lt;p>If you’re following the latest news on Kubernetes, you probably would have heard about Ephemeral Containers. Not sure? Fear not! In this blog post we will try to shed some light on this new feature soon to be stable&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup> in Kubernetes v1.25.&lt;/p>
&lt;h2 id="what-are-ephemeral-containers">What are Ephemeral Containers? &lt;a href="#what-are-ephemeral-containers" class="anchor" aria-hidden="true">#&lt;/a>&lt;/h2>
&lt;p>&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/" target="_blank">Ephemeral containers&lt;/a> let us run a container with a specific image in the context of an already running container in a Pod. This comes in handy when debugging/troubleshooting distroless images or images that lack certain utilities, where &lt;code>kubectl exec&lt;/code> won’t be helpful.&lt;/p></description></item><item><title>mirrord internals - hooking libc functions in Rust and fixing bugs</title><link>https://bce40cb0.metalbear-com.pages.dev/blog/mirrord-internals-hooking-libc-functions-in-rust-and-fixing-bugs/</link><pubDate>Mon, 04 Jul 2022 00:00:00 +0000</pubDate><guid>https://bce40cb0.metalbear-com.pages.dev/blog/mirrord-internals-hooking-libc-functions-in-rust-and-fixing-bugs/</guid><description>&lt;p>&amp;ldquo;Is mirrord some kind of &lt;a href="https://man7.org/linux/man-pages/man2/ptrace.2.html" target="_blank">ptrace&lt;/a> magic?”, that’s what I exactly thought when I was introduced to this idea of “mirroring traffic”. To my surprise, the idea and design behind mirrord are based on simple concepts implemented in a novel way! This is what I want to discuss in this blog post along with my experience as a Junior Engineer learning how to tackle bugs working on this badass project.&lt;/p>
&lt;h2 id="what-is-mirrord-">What is mirrord? 🪞 &lt;a href="#what-is-mirrord-" class="anchor" aria-hidden="true">#&lt;/a>&lt;/h2>
&lt;p>&lt;a href="https://github.com/metalbear-co/mirrord" target="_blank">mirrord&lt;/a> lets you run a local process in the context of a cloud service, which means we can test our code on staging, without actually deploying it there. This leads to shorter feedback loops (you don’t have to wait on long CI processes to test your code in staging conditions) and a more stable staging environment (since untested services aren’t being deployed there). There is a detailed overview of mirrord and what we strive to achieve with it in &lt;a href="https://metalbear.com/blog/reintroducing-mirrord/" target="_blank">this&lt;/a> blog post.&lt;/p></description></item></channel></rss>