4 ms·
Aya: your tRusty eBPF companion
- EddySchauHai 4y agoThis is awesome! If I can learn eBPF with Rust it'll be a good reason to use Rust at work down the line :) Anyone know of any tutorials using Rust and eBPF in a Docker container?
- tuetuopay 4y agoI advise you to follow the Aya book. It is surprisingly easy to follow and to get started. Then, either build directly inside docker or build targeting e.g. musl and it should work just as well. Just don't forget to set `ulimit -l unlimited` before attaching your probe, it bit me a few times when using large maps (like the one used by aya-log).
- deleted 4y ago[deleted]
- qualudeheart 4y agoThe way eBPF is described makes it sound fascinating. Thank you for sharing.
- ok_dad 4y agoWhere’s the name from?
- tuetuopay 4y agoAya is an awesome library. It works really really well and allows to get stuff done surprisingly quickly. The most surprising thing for me was how it made eBPF discoverable. There is the doc for libraries on docs.rs (or on https://aya.dev https://aya.dev for the bpf side) which allows for simple click-click discovery. And it allows for very quick iteration. The use friendliness is not an overstatement. I went from eBPF newbie to 100Gbps / 40Mpps XDP setup in what, days?
- intelVISA 4y agoBeen looking for an excuse to write some Rust and this might be it. Though I wonder if any XDP shops would use this over DPDK if they were Rust-oriented?
- tuetuopay 4y agoWell I don't know. In my opinion it will depend quite a lot on the use case. If the host is dedicated to running the DPDK app (like a software router), then I don't see them jumping ship right away. On the other hand, anytime where the host needs to run something else than the dataplane (because remember, dpdk is poll-mode, so it eats 100% of the allocated CPUs constantly), I see this becoming much much more common. Things like Cilium or all the various software-based overlay networks. This could provide great speedups while using the same language for both the userspace and the kernelspace (which is one thing Go will never be able to do). I also found that due to the tooling being so good you don't even notice it (it's just `cargo build` instead of the toolchain and library mess dpdk is, though it's improved quite a lot lately), it is very very great to spin up PoCs in a whim. You can easily express what you want with few LoCs and don't get the rest of your team afraid. Basically, at work, we're a Rust shop now (at lest the network part), and despite having prod DPDK apps right now, it's more than likely the next custom dataplane we'll prod will be eBPF + Rust based using Aya.
- bogomipz 4y agoIn case anyone was wondering, the link to the Aya book towards the end of this post is wrong. It points you to: https://aya-rs.dev/ https://aya-rs.dev/ Which has almost no content other than a spartan TOC. The actual book URL is here: https://aya-rs.dev/book/ https://aya-rs.dev/book/