VanOnGo goes serverless
In order to understand what AWS serverless technology is, we talked to Vladimir Inyutochkin, Devops Engineer at VanOnGo.
What is AWS serverless technology?
AWS has several serverless technologies, at VanOnGo we actively use two of them - AWS lambda and AWS fargate. But first, let's remember the classic scheme.
When we work according to the classical scheme with the cloud, we pay a certain amount, and we are allocated a certain set of resources for this, on an ongoing basis, which are ultimately calculated on specific devices. That is, Amazon has data centers with a huge number of servers, with air conditioning, with backup power, and so on. This infrastructure consumes electricity and requires comfort from employees. So, if we work according to the classic scheme, we book these resources and wait for a request from the client. And the resources are idle at this time. Amazon, of course, has algorithms to optimize all this, like any cloud provider, but they still do not have 100% efficiency. It was a classic scheme.
And what is the essence of serverless? The essence of serverless is that we leave some very, very inexpensive resource, in our case it is AWS API gateway, waiting for requests. It sees - there is a request from the user, we will give him access to our admin. After that, instead of sending it to a ready-made environment that is waiting for this request, it sends this request to AWS, and the latter, on some free physical machines, where there is still a free resource, in terms of processor, memory, processes the answer. Thus, our efficiency on physical hardware increases at least by several times. Why is this important? Because all these components consume a large amount of resources and, accordingly, leave a considerable carbon footprint.
This is somewhat reminiscent of our OnGO Fleet and our non-logistic fleets, when a certain customer has underloaded cars and we actually load them with our orders. Ok, you said that we use two more products - serverless lambda and serverless fargate. Tell us about them, please.
The essence of lambda is that we abstract our code, which my colleagues are working on, from the environment in which it all runs - from the operating system, from the file system, as much as possible. Then, we use the isolated environment that AWS itself creates to process one single request, which then arrives in this lambda.
There is a so-called "function of the service" concept. This is available in several other providers, but as far as I know, it is best implemented in AWS. In AWS, it is all quite efficient in terms of resources used and, accordingly, costs.
What does this mean for the company?
For us, it's an advantage, particularly in that we save money. This is because, if we were paying for the stand by run time of all our lambda functions, if they were there, let's say, in a container format, they would be running, and we would be paying very high bills. And so we save money, we save electricity, we save space for AWS, that is, we as a client do not create too much demand for data center expansion. Also, as a result, we reduce the overall carbon footprint.
So we can say that this is a pay as you use business model, right?
Yes, absolutely, it is completely pay-as-you-go. That is, their stand by resource is essentially an API gate, which, as I said - stands and waits, but since it is, in general, one for all, it (API gate - ed.) intelligently differentiates requests through DNS by client.
Now let's learn more about fargate.
Fargate is a part of Amazon service called ECS - elastic container service, it has two modes. These are just stand by resources that you buy from them and then use those containers that you consider necessary on these redeemed resources through the ECS API. We work on the contrary - we work in fargate mode. This is also pure serverless, but it is designed to use containers, not functions, as in lambda. For example, we run solver through fargate.
An interesting point, in fact, is that the technology is only called serverless, it still uses some physical servers, just in the mode of providing residual inventory?
Yes, serverless is not an ideal term. In any case, the computation must be done ultimately on some physical device that is connected to the internet through other devices. But it is called serverless because the client does not worry about server maintenance, it is taken care of by the provider. It does it automatically, it does it very efficiently, taking into account its best practices, under the custom firmware of this very hardware.
As a result, it also saves a lot of human resources, maintenance resources, extends the life of computers, because computers and other devices also have their own lifecycle, and on the scale that Amazon operates, these lifecycles can be managed, and they do it quite effectively.
That is, this is actually a win-win-win situation. Win for Amazon, that they reload their capacities (they have no waiting time or it is reduced). Win for VanOnGo, because we buy the amount of computing power we need and when we need it, and, accordingly, pay less for it. Win for the planet and society, because the carbon footprint of this cooperation is reduced.
Yes, and here there is such a thing as lifecycle management of devices. Because if you tried to put the old "hardware" in the classic model, then hardly anyone would sell it in this way, roughly speaking, three years after the release of the processor family. Not a single corporate customer who buys devices or wind turbines would start any really serious loads even on devices that are more than 3 years old. It would be economically inefficient for them.
How much effort is needed to use this technology on our part, as a customer of Amazon?
On our part, it requires more effort, it requires higher qualifications of engineering staff, which means that we need to hire people who know how to learn. That is what we are doing in the company now, 40 hours a week. But this is a big plus for the skills and abilities and knowledge of our engineers.
This is a cool thing, it means that as a team we can learn anything and use any technology as well as generate new ones.