Riding Rails on Kubernetes

By Prathamesh Sonpatki

Elevator Pitch

Last year, we decided to migrate our apps to k8s. After a year worth of effort, we have migrated all apps to k8s.

We will discuss what, how & why we did it. Starting with building the docker images to running migrations to autoscaling to rolling deployments, everything shall be discussed.

Description

Kubernetes a.k.a. k8s helps in managing the scaling and deployment of containerized applications. We decided to move to k8s because we wanted to scale our Rails apps on demand and better utilize the resources.

In this talk, I will discuss various steps involved in this process of migration to k8s. Even though k8s allows managing the containerized apps, running Rails apps on k8s has its own quirks. We tackled the challenges related to handling stateful parts of the app, rolling deployment, handling database operations, caching as well as logging.

In this talk, I will discuss these challenges and the approaches we took to handle them.

I will also discuss issues related to memory based and request based scaling. In the process of the migration, we also build an inbuilt tool to make the deployment easier and I will be discussing that as well.

The attendees will get an idea of what problems one can run into while running large Rails applications on k8s and how to approach them effectively. The attendees will also get an idea about some of the issues related to running Rails apps on containers, not just k8s.

This talk is for beginner to intermediate developers who have dealt with the deployment of the Rails apps. Even though you might not have used Docker, k8s or any other container tech, you will get an idea of how things work in the container world.

Notes

More and more Rails apps are moving to containers based on the scaling and optimization requirements. k8s is production-grade container technology for managing the apps. This talk will discuss various aspects of using k8s for managing Rails applications.

I have been leading the migration for last year for our client. We have 5 Rails apps and 9 Rails engines sharing a monorepo which we migrated to k8s over the course of last year. I have been involved with various decision-making processes for this migration and also in building the tooling around the migration process.

So I have enough experience to talk about this subject :)