TMWL’ Sep 20— Redpanda, Auth0 Terraform Provider & Macbook WiFi

Programmers share what they’ve learned

Maria Kucharczyk
SoftwareMill Tech Blog

--

Every month we share what we’ve learned in our team. In September Michał, Grzegorz, and Jakub discovered:

  • what is Redpanda and why you need to get familiar with it,
  • how to “terraformize” Auth0,
  • what to do when your MacBook has an unstable wifi connection — McGyver style.

Redpanda is Apache Kafka in C ++ — by Michał Matłoka

This month I heard about Redpanda for the first time. In one sentence you can summarize it as Apache Kafka written in C++.

Redpanda leverages the Seastar library created by Scylla creators (Scylla is a Cassandra alternative written in C++). The system offers an API compatible with Kafka, so you can use any existing client tools.

However, when it comes to architecture and other features, there are significant differences.

  • First of all, there is no ZooKeeper (do you remember KIP-500 for Kafka?) and Raft algorithm is used for both data and metadata replication.
  • What is more, it offers a built in Prometheus endpoint for monitoring, where for Kafka you need to use projects like Kafka exporter. Tiered storage, k8s operator and a hosted, cloud version are among planned features.
  • The project team includes previous employees of Cockroach Labs, Akamai and Yandex and promises huge performance improvements. Authors declare that Redpanda passes Jepsen tests for data integrity.

However, Redpanda has also some drawbacks. The main one is… it is not ready yet. The first public release was made in September. Additional work still needs to be done.

What is more the project is not yet open source (but authors say it will be) and benchmarks are not yet published publicly. It is too early to say if the project will be worth using in production, but so far it seems it may be worth observing in the future.

Auth0 terraform provider — by Grzegorz Kocur

Nowadays, when we have services like Auth0 it’s possible to avoid writing your own user service and use an external service instead. Actually, Adam Warski, our CTO wrote an excellent blog post about Auth0 and when to use it.

But what if you want to follow the modern DevOps practices and have Everything As Code? How to “program” the external service and its configuration?

It turns out that’s possible — thanks to auth0 terraform provider.

It allows you to “terraformize” the auth0 and it’s configuration: add the Application (aka “client”), the API (aka “resource server”), etc.

At the beginning it was difficult for me to understand the difference between naming used in auth0 UI and the naming used by terraform provider, which uses the same name as in the raw API.

It’s a good idea to familiarize yourself with the auth0 management API to understand the provider better. It helped me a lot to create the resources exactly as I wanted: when I had troubles I just created a similar object using Auth0 UI and then used the API explorer to examine its configuration. Having it creating the proper terraform code was very easy.

For me personally somehow problematic was the lack of the Data Sources, but on the other hand it forced me to describe all resources as terraform code.

The power of aluminium foil — by Jakub Dzikowski

This month I learned how to fix the WiFi connection issues when a USB-C hub is connected to my MacBook.

Recent MacBooks have only USB-C ports which might be problematic when you need to connect devices with HDMI (external monitor) or USB (wireless headphones). In this case you need to buy a hub. And, at the beginning of 2020 I bought one. It worked great.

In September my MacBook installed a software upgrade. Then something weird happened. My WiFi connection dropped to 0.1 MB/s. It was unusable.

I had similar problems with my previous MacBook, so I started with a solution that worked previously. Reset WiFi config, remove some system files etc. It didn’t work. My WiFi was still very slow.

Then I plugged out my hub and the internet connection speed increased dramatically. I plugged it in and it dropped. It was the hub.

I heard about this kind of issues. However, the interesting thing was that the hub worked before. What happened? Did it get broken? Was it the software update? Did something else change?

Anyway, after a quick google I found a YouTube video where a guy wrapped the hub cable with aluminium foil. I decided to try and it worked. My WiFi speed was even better than before. No need to buy a more expensive hub.

Why does it work?

Poorly shielded cables may cause interference with WiFi signals, especially in the 2.4 GHz range (see this paper). It was my case. I use my laptop in a different room than my router where the 5 GHz network is too weak.

This interference might be effectively reduced by aluminium foil which blocks electromagnetic radiation. It just adds a shield to poorly shielded cables.

Was it the fault of a software update?

Partially, I guess. It seems that Apple has fixed some USB-C WiFi interference issues with software patches in the past. So, it might be a matter of software and a software update might cause this kind of problems.

Fun fact, aluminium foil reflects WiFi signal well and may be used to improve your WiFi range when you put it on the other side of the router, like a mirror. I tried it in the past.

You may want to read this thread on Stack Exchange on fixing USB-C/WiFi issues with aluminium foil: USB-C Dongles killing Wifi on 2016/2017 MacBooks — Who’s to blame? — Ask.

And what have you learned in September? Let us know! :)

BTW, we are always looking for outstanding professionals to join our team!

Questions? Ask us anything about remote work, how does the cooperation with us look like, what projects do we have, or about anything else - on the dedicated Slack channel 💡

--

--