Database in K8S or outside?

My (ordered) recommendation:

0) If I can use a Database-as-a-Service in my project, I do it. I love to delegate the most difficult problems to my cloud provider!

1) No DB-as-a-Service, I would go with a separate Kubernetes cluster for your database.

I do not mind extra MB and CPU for running a K8S master, if I can have a consistent API for all my infrastructure. Pinning your DB instances to the nodes, give you a-like-VM experience. I treat here the k8s as my distributed init. Why separated? You might want to use the newest k8s for running your app, the databases are more fragile, they do not like changes.

2) If not K8S, a separate VM/VMs, but, you know, life is too short for provisioning your machine with ssh, ansible, or salt.

3) You can as well go with DB in K8S with persistent volumes (ofc). If you do not have a lot of data, you can go pretty far with it.

Notice: you MUST (RFC2119) understand the consequences of such a decision. It also depends on your cost of the downtime, SLA, your backup/recovery strategy, budget, …, and the sanity of your cloud provider. You will not die immediately if you do that.

To sum up. The persistence is hard, it did not get easier while we got excited with K8S. In onCloud, we delegate it. OnPremise, we have to cope with it and take extra care of our SQL or noSQL databases.

There is hope. We have new databases, e.g., CockRoachdb or FaunaDB, that are more resilience and are better in hiding the complexity of the data replication/clustering (see Jepsen analyses). Who knows. We might get to a point, when we are not afraid to run databases even on the spot instances ;).

ps. Regarding running your own database on Azure, they like to restart your machines. The MS cloud will increase the speed of learning how to build your own robust database setup.

 

Make your command-line awesome

I cannot believe, but there are still people that do not use plugins framework for their command line.

If you are one of them, you need just 15 to 30 minutes to make your command-line superhero-efficient. Auto-completions (ssh, Makefile,…), better themes, look&feel, effortless jumping between directories you visited… You can impress your colleagues and get the job done faster.
… 

 

How to start fast your software project with minimum technical debt

Two weeks ago, my friend Dalia asked me what the best approach is to start new software project. Her friend was starting a new project in a startup. I realized that I could have given much more precise advice. That is the reason behind this post.

The following points are representing the starting points, not hard lines that you must keep. It is a software engineering, so you might modify my recommendation to adapt to your needs. The starting point will help you to find the best path.
…