Wave

Profile

4censord

4censord studies computer science in Germany.


Articles

Migrating PVs in Kubernetes

4censord 3/10/2024

Migrating PVs in Kubernetes In kubernetes, data storage is provided by so called persistent volumes. Kubernetes itself contains a bunch of different options out of the box, notably HostPath and NFS. HostPath has the advantage of being incredibly simple. You just take a directory from your host, and make it available in a pod. But, because it is host specific, that does not work very well if you have more than one host and want to be able to tolerate host failures. NFS has the advantage of being standard, to the extend that every NAS or storage solution from the last 20 years supports it. But, perfomance often isn't great. And, unless you are using NFSv4, NFS has some challenges surrounding things like file locking. But those arent important for anything exept rare cases like databases… Kubernetes supports having multiple types of PVs, and groups them together in StorageClasses. When requesting a PV from kubernetes (using a pvc), you can specify which storageclass you want. If yo

ITTutorial

Continuing on an HTTP-Server in rust

4censord 3/3/2024

This post is basically a direct continuation of the recent Computerphile Video Coding a Web Server in 25 Lines - Computerphile The video explains the absolute basics of the HTTP protocol, and implements a very basic HTTP-server in rust. This blog-post will go into more detail about some HTTP headers, and some other HTTP request types, implementing some of them in the process. At the end of the video, our source-code looks like this: use std::io::BufRead; use std::io::Write; fn main() { let listener = std::net::TcpListener::bind("127.0.0.1:8081").unwrap(); for mut stream in listener.incoming().flatten() { let mut reader = std::io::BufReader::new(&mut stream); let mut line = String::new(); reader.read_line(&mut line).unwrap(); match line.trim().split(' ').collect::<Vec<_>>().as_slice() { ["GET", resource, "HTTP/1.1"] => { loop { let mut line = St

ITTutorial

Wave on Kubernetes

4censord 2/25/2024

Kubernetes is an increasingly more popular deployment option for services. Originally developed by Google0, Kubernetes provides functionality for multi host containerized deployment of applications. Today, i will take a look at deploying wave onto my Kubernetes.[1] This does not explain how to interact with Kubernetes Wave depends on some other services to be fully functional, namely A PostgreSQL server for persistent data storage A redis server for session storage and synchronization A reverse proxy for TLS termination An SMTP server for sending email. Dependencies Because we want to focus on running wave, let's just get the other stuff out of the way. All our stuff will be happening in the wave-dev namespace, so let's create that first: kubectl create namespace wave-dev PostgreSQL Deployed via helm from the bitnami/postgresql chart using the following values: # postgres.yaml --- auth: username: "wave" password: "wavepw12345" database: "wave" us

ITTutorial
Powered by Wave