Why we decided to go with Kubernetes

Luqman Hakim - Sep 1 - - Dev Community

Hi folks, today I'm gonna share why I am so invested in learning Kubernetes and applying it in my production environment that I'm working for right now.

We have a lot of problems as our application running in a monolith structure rather than microservices (literally only one server). As time goes by, our application increase in usage and functionalities thus making this is a backstab to our current server specs. RAM usage going high all the time. Application crashes quite frequent because the server specs cannot handle the current workloads.

I suggest to the team to make our application high available, meaning we can share the workload across multiple servers. If one of the applications crashes, we have time to recover it while maintaining the availability of the application.

Our application mainly running in three separate services.

  1. Main service - handling transactions, calculation etc.
  2. Batch service - sending emails, reminder, generate incremental numbers etc.
  3. Report service - generate reports for our client for their usage, audit etc.

Our initial application service

Initially, all these process running in one application. We know to make our application run in multiple servers, we need to separate out the batch service so that we will not sent our emails on notifications multiple times. So we separate out batch service so it will be running only on one server.

Now our application can run in high availability mode. Multiple main services will handle the transaction and incoming request from users but our report service still embedded in the main service, that is okay but as the time goes by, many users generating the report thus sometimes our main service crashes.

The next thing is we separate out our report service so that if a lot of users generating the report, the main service that handle transactions can still work as usual and maintaining our uptime.

Our application after we do a little overhaul

Now, all of our service running independently. Great! What if the servers crashes? Who's gonna recover it if the team is on holiday or still sleeping? (obviously every human being need to rest right?)

This when the Kubernetes infrastructure comes in. Autoscale, autorecover, all in one place. Like a one-stop-center for a production grade application right? To be honest, learning all these Kubernetes things are time consuming, pain, sleepless night but who cares? It will benefit us along the time. Cost? Err we might need to discuss it in a separate discussion. Cheers!

. .
Terabox Video Player