Healthchecks with pgrep

An interesting pattern I noticed while exploring the deployment process at GitLab was the use of pgrep to perform healthchecks in the Dockerfile or even in Kubernetes (technically you could). First define a healthcheck file: #!/bin/bash set -e /usr/bin/pgrep -f <process-to-check> If there is something, the exit code is 0, else it returns exit code 1. That is a pretty nifty trick. Second, add this line into your Dockerfile: HEALTHCHECK --interval=30s --timeout=30s --retries=5 CMD /healthcheck In a kubernetes setting, simply configure your livenessProbe/readinessProbe and you should be good to go....

September 1, 2022 · 1 min

Leaving Vim

The betrayal GitLab monorepo is way too large to use with my existing neovim setup. Even with udpated solargraph config to index 20000 files, using fzf+ripgrep. The way ruby is written also involves patching and overriding gem functions/methods. After much frustration in trying to navigate the monstrous monorepo, I gave up and tried Rubymine. John Carmack’s interview on YouTube helped me feel less guilty about ditching vim. tldr; use the best tools for the job, dont be too constrained by the editor war/cultism....

August 20, 2022 · 2 min

Leaving Viki

On my last day at Viki, I bought a cup of ice latte from the very cafe where my director spoke to me and tried to find out which team I would have fit best in. He proposed the SRE team since I had expressed a deep interest in performance and scaling infrastructure components. However, I politely declined as I preferred to build up “proper” foundation as an SWE by building components of a distributed system....

August 5, 2022 · 1 min