CatOps
5.08K subscribers
94 photos
5 videos
19 files
2.58K links
DevOps and other issues by Yurii Rochniak (@grem1in) - SRE @ Preply && Maksym Vlasov (@MaxymVlasov) - Engineer @ Star. Opinions on our own.

We do not post ads including event announcements. Please, do not bother us with such requests!
Download Telegram
Тут обнаружили интересный баг в `libidn2`, из-за которого фейлился ресолв доменов с символом _, котороый, кстати, впролне валидный.

И да, в заглавии статьи фигурирует systemd, но это скорее потому, что во-первых, одвинять во всех смертных грехах systemd — это правило хорошего тона. Во-вторых, systemd действительно зависит от libidn2.

Кстати, воркэраунд против этого бага: пересобрать systemd без поддержки libidn2.
#linux
В блоге Julia Evans вышла новая статья о том, как определить, почему ваш сервер дропает пакеты.

Ну как новая, 2 дня назад вышла. Но полезно. Вообще, рекомендую подписаться на Julia в Твиттере. Она ещё и классные комиксы рисует

#networking #linux
На Discovery Channel когда-то была передача "How it works", где на пальцах объясняли всевозможные процессы от постройки самолётов до пластиковых стаканчиков. И это очень круто: куда лучше понимать, как что-то работает, чем просто заучить какой-то паттерн

Так что сегодня будет 3 статьи подобного толка:

- Coding Geek разбирают как работают реляционные базы данных. На Хабре есть перевод на русский

- Классическая статья от Brendan Gregg (рекомендую подписаться в Тви) про load average, и c чем его едят

- Разбор, что такое IO. Ну и в догонку по IO статья о том, почему делать defer Close() — плохая идея

- И ещё одна, достаточно подробная статья о том, как нынче менеджится heap memory. К этой статья я ещё вернусь, но в немного другом контексте

Приятного чтения!
#linux #databases
В версии ядра Linux 3.9 (ага, давно) добавили такую фичу для сокетов как SO_REUSEPORT aka port sharding. Смысл в том, что несколько процессов могут слушать один и тот же порт, а ядро само разрулит, кому что посылать. Ну код должен со своей стороны эту фичу тоже поддерживать, конечно же

Так вот, зачем оно надо? А затем, что можно делать zero-downtime деплой даже не в кластер. Можно даже делать zero-downtime деплой на отдельновзятой машине в кластере. Конечно, это не так актуально, если у вас действительно всё кластеризировано, но всё равно интересно

Небольшая презентация об этом деле с примерами кода на Python и Ruby:
https://speakerdeck.com/joewalnes/linux-port-sharding

#linux
На CatOps опубликовали интересный пост о SO_REUSEPORT (https://xn--r1a.website/catops/329). Собственно хочу в догонку скинуть старый пост из github о том что не все так хорошо с SO_REUSEPORT на примере Haproxy.

Если коротко, то между прекращением приема сообщений и закрытием сокета может пройти какое-то время (несколько миллисекунд) и все подключения за этот период будут сброшены, потому что старый демон их уже не обрабатывает, но еще не закрыл сокет.
Вариант решения от Haproxy — дропать syn запросы на этот период. Вариант решения от GitHub (и nginx) использовать отдельный демон, который будет держать сокет открытым.
​​Хорошая статья про swap и memory management в Linux вообще.

https://chrisdown.name/2018/01/02/in-defence-of-swap.html

Тем более, что об эту тему каждый раз ломается куча копий

P.S: картинка отсюда

#linux #memory #swap
There were a lot of culture posts here lately, but no worries were still in the engineering domain!

So, today I want to share a neat detective/mystery story abut ZFS by Brendan Gregg.

It's called "ZFS Is Mysteriously Eating My CPU" and I won't add any more details here to keep the suspense.

Enjoy!

#performance #linux
​​Sometimes it is worth getting your head from clouds down to Earth.

Here is a great post-mortem story of a failed Ceph cluster.

The investigation led them down to more “invisible” underlying layers rather than just Ceph itself, but I won’t spoil more. This is an interesting and not that long read, so you can go through it yourself. Also, at least for me, every post-mortem looks like a detective story, not just a technical article.

P.S. I haven’t worked much with Ceph myself. When I was a very junior engineer, we had a few small Ceph clusters in a company I worked for. I was not involved in that project, though. However, I remember that once we had an issue with one of the clusters and my colleague spent a night fixing it.

The next day he said: “We didn’t quite lose the data. We just cannot retrieve it”. I think from that time this became a strong association for me with Ceph, even though Ceph is usually not the case.

#postmortem #ceph #linux
A nice overview of how Docker works on non-Linux hosts as well as an explanation, why I/O operations are so slow. Plus, some hints on how to make it faster for the local development.

tl;dr. Because Docker requires Linux capabilities, thus is has to have Linux VM to run Linux-based images on MacOS and Windows. This VM shares filesystem with the host, which is slow. There’s a new implementation VirtioFS, which is faster, but still not ideal.

We briefly discussed ways of running Docker on the new M-based Macs on our previous voice chat and this article has links to some tools we mentioned there, specifically: Rancher Desktop and Colima.

Also, I recall developers at my previous job complaining about slow-ish Docker performance, but IIRC VirtioFS was not widely adopted back then.

#docker #linux
👍10👀2
From our subscriber:

Till the end of June you can save up to 40% on the Linux Foundation courses with this promo code:

JUNEBBQ40

UPD. Also, AWS has extended the promo code for exam retake. So, if you fail the exam the first time, you can retake it for free. More details:

AWSRETAKE

#linux #education #kubernetes #aws
👍7
A blog post from DHH on why don't more people use Linux.

Technically, the answer is quite simple for the general public: no one uses an OS for the sake of an OS itself. People use computers to run specific software to help them with their routines. OS is secondary.

However, he raises another question: if you're not a part of the "general public", what if you're a person who writes code that then (most likely) is run on Linux, shouldn't you know your tools better in this case?

#culture #linux
👍6👀3
Many people know about resources in Kubernetes, because every second article talks about the importance of setting them correctly. Many people know that resources in Kubernetes are later translated into Linux cgroups, because this is a common interview question.

Yet, how many people know, how exactly are resource requests and limits are translated into cgroups?

#kubernetes #linux
👍21
Learnkube is a great resource, because they explain how Kubernetes works not only within its own abstractions, but in relation to other technologies.

Im this article they explain, how Kubernetes’ Security Context maps to the Linux primitives.

Tires article would be useful even if you’ve worked with both Linux and Kubernetes for some time, since recalling basic things from time to time is important.

#kubernetes #security #linux
👍7