Issue: How I can downsize my cost?

Image for post

All applications are necessary to run every time. We should turn off the switches.

My pain point is very simple. It is about how to reduce my cost for infrastructure. I am going to put many applications on the infrastructure. But it is not necessary to keep running the applications any time. I want my applications to run at only when I need. Even though, I cannot watch every incoming requests for these application all the time… How can I turn off my application when it is not needed?

Solution: “serverless”, more specifically “autoscaler”

“Serverless” all-in-one model (as first step to learn)

I think that serverless is the final resort for this issue. The pioneer of serverless, AWS says;

It eliminates infrastructure management tasks such as server or cluster provisioning, patching, operating system maintenance, and capacity provisioning.

To make it short, serverless means** “server maintenance” -less**. Actually, there are servers. Servers never disappear. Applications run on servers. What disappears is maintenance labor. In serverless environments, application developers don’t need to think about server maintenance and can focus on development.

Serverless is just an adjective, so this word itself doesn’t mention any specific software, hardware or vendor.

AWS lambda is one of serverless application platform in public cloud. AWS lambda has original mechanism for scaling applications to increase concurrency. 10 minutes after previous call, AWS lambda’s resource recycle (application stop) automatically happens according to this article.

Of course, other implementations exist. We can use serverless application platform in on premise. For example, OpenFaaSOpenWhisk and kubeless are all serverless application platform that runs applications in on premise environment. They provide all-in-one stack in one platform.

One step deeper “serverless”: Key is “autoscaler”

Go deeper inside “serverless”. When we try Do-it-yourself stack of “serverless”, the easiest way is to use container and Kubernetes. Those are the building blocks of software stack. Container is for maintenance automation of applications. Kubernetes is for orchestration of multiple containers and multiple servers.

On top of container technology and Kubernetes, autoscaler comes. It is important that Kubernetes introduces container autoscaler such as HPA (Horizontal Pod Autoscaler). When workload increases, Kubernetes detects it and automatically increases a number of containers. This is amazing step toward serverless world.

#serverless-architecture #dapr #apache-kafka #keda #kubernetes

“Serverless”: KEDA for scaling down your containers to zero
1.20 GEEK