Building your applications for scale? Watch the masterclass to understand why you should consider Kubernetes


How do I autoscale? Is there a way to allot custom behaviour? What about incremental rollout? These were among the several queries on Kubernetes that Vishal Biyani and Vivek Sridhar answered as part of a masterclass at TechSparks 2018.

Vishal, Founder and CTO, InfraCloud Technologies, is an engineer focused on programmable and scalable infrastructure and is also a Google development expert. Vivek, Developer Advocate, DigitalOcean, is a tech enthusiast and passionate about working with startups and software developer communities.

Watch this TechSparks Masterclass on ‘Building your applications for scale’.

Vishal started by narrating an interesting case study on American fast food restaurant chain Chick-fil-A. They are closed on Sundays, but sales in six days are greater than their competitors’ sales in seven days. This is possible because they use technology very intelligently. The case study delved into what the chain is doing and why they make decisions the way they do. Vishal said they have a Kubernetes cluster deployed in every restaurant, which translates to over 2,000 clusters in the US. This, he believed was a very practical and phenomenal strategy that the fast-food chain had adopted.

A Kubernetes cluster has three or more machines, which means that if one of the machines doesn’t work, or the hard drive fails, or CPU bursts or any other unfortunate incident takes place, the business is not affected. This is because Kubernetes shifts the failed workload to another working workload so that when the replacement load arrives, you’re back to your original shape.

He continued with Chick-fil-A’s order management problems, and how they solved it using Kubernetes which ensured that latency wasn’t their enemy and delivered quick results. With Kubernetes, you don’t need to depend on an internet connection as most of the systems and data run locally in the restaurant itself. This is, of course, eventually filtered and sent to the cloud but it stores data in the computer locally as much as possible, so that it is easily accessible. Chick-fil-A makes a sandwich every 16 seconds and one box of nuggets every 25 seconds at peak hours. They’re able to deliver this quickly using intelligence.

This intent of the case study was to create awareness on using local source and community hardware which will help you build a scalable application and enable your business, instead of hindering it.

He went on to explain the significance of deploying Kubernetes and what the container is all about. “Container is not a new technology; it has been in the tech space for decades. It gives you isolation in terms of resources, file systems, CPU and memory, and also portable packaging. Container helps build applications by providing consistency.”

But when you have a container that gives you isolation and consistency, why do you need Kubernetes? Vishal went on to explain how having a container is just one part of the equation; you also need somebody to manage the run. There’s a chance that one from the thousands of machines may crash, it may lose storage data and while this happens, it’s difficult to manage the complexity. And that’s where Kubernetes comes in. You can tweak where and how to run it, what is the optimal time and place to run it, and so on. It manages networking and routing order across a set of thousands of machines.

“Our goal is to minimise the platform code and maximise the business code. I think with the kind of cloud-native technologies like Kubernetes, we actually can achieve this fairly smoothly,” said Vishal.

Kubernetes also provides job abstraction wherein one can write custom objects and allot custom behaviours. That’s not all, you can autoscale using workloads and nodes where you can match various intensities to match the actual capacity and also keep your data on-premise. Another feature is the incremental rollout which lets you test your product with a set of users before serving it to your entire audience. What Kubernetes does is, it unifies various concepts and gives you a platform and the levers for you to play around and suit your needs.

He also spoke about why it is important to measure your failures and how Kubernetes can help with it. “Unless you measure, you won't be able to improve and unless you improve, you won’t know where your bottom line is. If you won’t know that, you will either optimise for the wrong thing or optimise for something that doesn’t really matter. Kubernetes has a health check for every application according to the frequency you want to set it in,” he said.

Following the first session, Vivek took the audience through a demo on the steps to deploy a microservice application on Kubernetes. He spoke about YAML and why it is a core element in terms of deploying and scaling your applications and orchestrating your containers. Using the DigitalOcean platform, he demonstrated how you can use YAML to manage the process.

“If you’re thinking about scalability, you need to know how to orchestrate these YAMLs,” said Vivek.