Going Cloud Native
During the month of January, Spider setup has been extended to deploy the full solution on Kubernetes!
Storyโ
Swarm was a very good start to play with application clustering and distributed system: simple to setup, easy to bring along... Like clustering for newbies.
But Swarm has lost the battle of Container Orchestration platforms. Kubernetes is the de facto standard nowadays, and everything runs on Kube.
I needed to provide Spider on Kube to be able to address more customers.
Migrationโ
And it took me... 2 weeks of my evening Spider job :-)
YES, two small weeks, and here it is, I can spawn Spider in any k8s, k3s, miniKube etc.
And it is a pleasure to work with. I just... works!!
Adaptationsโ
From Swarm to Kube, I had to adjust only a couple of points:
- The monitoring still uses Metricbeat and Filebeat, but is scoped to Spider namespace
- The monitoring needs a service account to be able to contact all instances of running PODs to gather metrics.
- Traefik is not setup as an Ingress, but as an internal reverse proxy for external communications.
- This makes Spider compatible with any default Ingress controller selected by administrators.
Unique valueโ
- Spider can be spun up in less than 2 minutes time.
- The whole process of setup and upgrade is completely automated and only requires ECK as pre-requisite, to setup Elasticsearch.
- Autoscaling of services is in place so that you don't have to worry about scale.
- You still benefit of everything that makes Spider, Spider, including the integrated monitoring, the security, and the wild performance.
Setupโ
For this first delivery, Spider setup for Swarm has been extended to generate native Kubernetes manifests.
Spider is not available as a Helmchart yet, but this is the next step :)
To deploy on Kubernetes, it is a one command, using Docker and Spider setup image:
- Configure your
setup.yml
- Run
make k-deploy
Spider will generate the keys and manifests, instanciate Elasticsearch and configure it, then deploy all objects to finally kindly ask you for the administrator account creation.
Over. You can connect and configure Whisperers!
Performanceโ
I made Swarm and Kube run in parallel for a few dats, processing 'almost' the same all the same communications.
No worry, the quality is the same :) But I was focused on performance comparison:
How do Kube compare to Swarm ?
Well, it does GREAT!!
- Inter services communications are faster. Response time is better.
- Maybe because Traefik is not any more used internally.
- External APIs are faster too!
- Calls to Redis are the same.
- Calls to Elasticsearch are faster (they stay in the cluster).
The ONLY drawback:
- The PODs take more memory than Swarm services! From 35 MB to 50MB!
- I don't have an explanation... But that's not big deal :) CPU usage is less important!
Cheers, Thibaut