Streaming an authenticated video to Safari video element with http2 enabled.

Photo by Sam McGhee on Unsplash


  1. A friend called me, to help the marketing agency he works at with an adult website where they couldn’t figure out why videos weren’t working on Safari.
  2. Safari sends a `Range` header and expects the content streamed to be served chunked when HTTP2 is enabled
  3. Files were hosted on AWS S3 and the php class that was implemented to serve S3 files as file streams didn’t implement `Content Range`
  4. Lowering server load and increasing speed by serving files from DO instead of S3
  5. Authentication; When Safari requests the video URL, it doesn’t send cookies with it. …

Making a Kubernetes cluster functional with a few extra add-ons

Photo by JR Korpa on Unsplash

In the previous article, I explained how to set up a HA K8s cluster.

But it’s just a bare installation of Kubernetes.

What’s missing

After setting up the cluster, except for K8s, it won’t have much on it. To make it work we need to deploy some extra applications.

The first and most important one is the CNI. We configured Kubernetes to use Flannel so now we have to add it to the cluster, otherwise nothing will work. In fact, checking the nodes they’ll result to be “Not Ready”.

kubectl get nodes -o wide

To add Flannel the command is very simple.

A look into handling networking when building on-premises K8s and Ceph clusters

Photo by Taylor Vick on Unsplash

Let’s take a look at how we need to wire all the servers to get the most out of them. The article continues from this one.


We have at least 9 servers that communicate with each other and even on standby there’s a lot of data travelling to and from any of them. In the storage article above, I explain the various data that goes through the cluster.

The dedicated servers you can rent online usually come with a 1Gbps network card (and network uplink).

1Gbps is about 128MB/s. And that’s the fastest our servers can go. That’s not good…

Understanding how persistent storage works in distributed systems

Photo by Fredy Jacob on Unsplash

May contain references to the previous article.


So I told Kubernetes to deploy a php application that generates pdf files, stores the “generated” status on the database and then renders them. Then I also deployed a MySQL database. I said, I want 2 replicas of the php application and 1 of my database.

Now consider the php application generating a file, storing to the database the fact that it generated that particular file and then rendering it.

When I ask again for that pdf file but this time, I ask my other php container on the second Pod, the application…

Overcoming infrastructural limits while setting up a production Kubernetes Cluster

Photo by Ryan Parker on Unsplash

After a thorough search considering ease of configuration, network and costs, We selected a hosting provider and set up a number of dedicated servers configured the way we wanted them.

For demonstration purposes I’ll assume we have 9 dedicated servers.

This is a follow up of my other article.

High Availability

So why 9 servers? Well, so far we can separate the parts that make the cluster into 3. We have the Storage, the Control plane, and the Worker nodes.

Worker nodes

There’s no doubt that the Worker nodes need to be more than one, otherwise there’s no point in using Kubernetes. …

How to install and configure Kubernetes on your own servers and create your custom cluster

Photo by Guilherme Cunha on Unsplash

This is the simplest design you can configure Kubernetes on (except minikube). It is not meant to be for production use as it does not offer high-availability on the cluster. More on the reasons later.

Just because it’s getting a lot of hype lately, it doesn’t mean that it is the right technology for your use case or that your company is ready to adopt it.

Kubernetes is not a way to lower costs on itself, in fact you’ll probably spend more on servers. What it does though, is guarantee a high availability for your projects, meaning that it will…

Jupyter Notebooks make it pretty easy and visual

A transparent human skull with the brain being visible. Unsplash — Jesse Orrico

One of the tools used for Machine Learning is TensorFlow. TensorFlow is a framework based on python. It’s purpose is to simplify operations between tensors. A tensor is a mathematical object which represents a vector of undefined length and dimensions.

What does a vector have to do with machine learning? They can be put in a way to simulate neural networks, how they really work in the human brain.

The most common example to explain machine learning is that of recognising shapes. When we see a cup, it is not always perfectly the same but we know it’s a cup…

How to create a Kubernetes cluster on VirtualBox the proper way

Kubernetes (background photo from Dhruv Deshmukh, Unsplash)

A few months after I joined Caffeina, the CTO (Stefano Azzolini) mentioned Docker in one of our weekly meetings. At the company I’m primarily a mobile developer but I didn’t really get what it was so I wanted to understand it. I started learning Docker and I created an infrastructure and some tools to help me deploy my projects and maintain them easily. Docker itself though doesn’t manage a cluster of servers. That’s where Kubernetes comes in.

What Kubernetes does is balance a project (multiple docker containers) automatically throughout the cluster nodes positioning the project inside the most adequate one…

IoT with Raspberry Pi

Internet of things illustrated (Photo found on google)

The project aims to use a Raspberry Pi as a standalone device that monitors the temperature, relative humidity, pressure, light intensity and air quality. To make this data useful though, I want to send the it to a server so I can analyze it later.

The Raspberry Pi doesn’t have these sensors on it out of the box, but they can be bought separately and soldered on it. I chose the Enviro pHAT and the Bosch BME680 modules from

Both the Enviro pHAT and the BME680 have sensors for the temperature and pressure, the first has additional sensors for…

Creating a cross platform app in Titanium

If you’re reading this article you probably know what Titanium is. If you don’t, To put it simply, Titanium is a framework which lets you develop a mobile app that will work on both Android and iOS (and Windows phone) reusing the same code or 90% of it.

The best part, the programming language is JavaScript and we all ❤ javascript.

Trimethyl is a set of tools and libraries that tries to lower that 10% gap between the two, other than making some APIs easier to use reducing implementation time.

Installing Titanium is easy, either install the IDE or execute…

Ani Sinanaj

Enjoying Stockholm and Sweden 🇸🇪

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store