📟Exploring the Intricacies of Serverless Architectures.
Wrapping Your Head Around Serverless Architectures
Hi, I’m Wajid Khan. I am trying to explain computer stuff in a simple and engaging manner, so that even non-techies can easily understand, and delivered to your inbox biweekly. Join me on an under-the-hood tech journey.
When it comes to building an infrastructure, there is a wide spectrum of options, and serverless technology can be categorized as being on one end of that spectrum.
To ensure a thorough understanding of the options, let's not restrict ourselves to serverless, but delve into the entirety of infrastructures.
💡Gaining a better understanding of something often involves understanding what it is not.
If you have specific compliance, or security concerns, you may prefer having complete control over your infrastructure. Start with a physical server. You truly have full control here. You can select your hardware components and everything on top of that, the virtualization operating system, data, application, and services. It also implies that you handle everything related to it, such as updating, patching, configuring, and fixing it in case of any major issues.
💡There is nothing wrong with this infrastructure choice. The larger infrastructure doesn't always find it feasible since it demands significant capital, component procurement, technical expertise, and time investment for setup.
Perhaps you lack the space or security measures to accommodate a physical server, yet you still desire a significant level of control. This is where the use of virtualized servers becomes relevant.
Someone else manages the hardware, and you can create resources like virtual servers or storage whenever needed. Yet, you are still in control of a significant portion of this, starting from the operating system and moving upwards.
All cloud providers have infrastructure as a service (IAAS) offering, such as AWS EC2, Azure virtual machines, and Google Compute Engine.
Platform as a Service (PAAS) provides additional abstraction to the infrastructure layer. Serverless takes Platform as a Service to its highest level. You won't have control over the operating system or anything below it in this offer. However, you choose to manage data, application code, and scaling configurations.
With a serverless application, you won't ever think about what network your application is running on or see a deployed server. You are given a platform where you can run your functions whenever you need to, without having to worry about hosting or scaling. However, you must stay within the platform's memory and processing time limits.
💡The function runs on a pay-as-you-go basis, serving as the foundation of serverless architectures.
However, it is not the ultimate solution for serverless. Although it's primarily a serverless compute, it's important to acknowledge that serverless encompasses more than just compute. Serverless technology allows for the use of containers, databases, and data processing without the need for traditional servers.
So, what is serverless good for?
Well, a lot. It may require a small shift in thinking. For instance, when developing a serverless application, it won't be constantly running at a specific port. On the contrary, serverless functions react to events, and serverless architectures are typically event-driven.
This refers to a function or a small block of code that responds to a trigger, typically written with minimal code. Perhaps there is an upload of an image or a reception of an API call.
You may be familiar with the concept of microservices, which are particularly well-suited for serverless architectures. You want the least amount of code, correct? In the past, it was normal to bundle authentication, data querying, processing, and the front end into a single monolithic application.
However, with serverless, it is preferable to decompose these elements and use serverless functions to connect them all together.
Your front end will be hosted on a serverless container, allowing you to log in using an authentication service. Moreover, you might engage with API triggers that communicate with functions responsible for querying or processing data.
It is important to note that transitioning to a serverless architecture presents slightly more challenges than migrating a monolithic application from a virtual machine to a container. It needs to be handled with finesse and careful consideration.
Serverless architectures bring about a substantial change in our approach to application development and management. It's not only about getting rid of server management.
The idea of Serverless architectures is to embrace a new mindset that gives priority to agility, scalability, and cost efficiency, even if it means sacrificing some level of customization and control.
With this ever-changing technology, the opportunities are limitless and there are some potential drawbacks, but it has truly brought about a new era in architectural design and application development.
Hi, I’m Wajid Khan. I am trying to explain computer stuff in a simple and engaging manner, so that even non-techies can easily understand, and delivered to your inbox biweekly.