It all started with a cold January morning, waking up at 5am.
It came as a surprise when my dear colleague Jim volunteered on my behalf to write this post, but after the feeling of apprehension started to fade, I found myself planning with excitement to give my beginner’s perspective on the whole “Serverless” topic.
Even though many developers have already been architecting serverless applications for some years, the fact that more than half of the talks at this conference had at least one “What is serverless?” slide, tells me that the adoption is indeed growing, but not as much as it should.
On the other hand, in my case — and most likely many others — getting to know the subject from a fresh perspective and multiple angles was greatly beneficial. In fact, after a few discussions with well-versed engineers, they mentioned that they have also got something out of this conference — it was a truly vertical slice on the matter, trying to spread the word, inform and keep us all up to date.
“It is serverless the same way WiFi is wireless.”
— Gojko Adzic
In order not to create any confusion for fellow initiates, serverless does not mean there are no servers — there definitely are — but is more about not having to think about or manage them. We can focus on our code and leave the infrastructure to the provider. If you want an intro, check out Karl's blog and video here.
That does not mean we don’t need to know anything about them, but our focus will be more on how to architect, combine and compose the lego parts (lambda functions, databases, caching systems, data storage, etc.) and less about dependencies, versions, system administration, and so on.
The key concept here is “Infrastructure as code” or IaC for short, which means that everything about our application’s architecture is stored in a configuration file, which will be version controlled, and will always yield the same results when our app is bootstrapped from it.
We can easily achieve this with tools such as the “Serverless Framework” or “Serverless Application Model” (AWS SAM). Read more about this on sls.zone. Although, if you do want to work against the grain (“codeless and serverless”), you can try out Azure’s Logic Apps, a tool for rapid prototyping and integrating a plethora of services together within an intuitive GUI—Matthew Fortunka’s talk.
The point that made the biggest impact on me, personally, was the confidence it gave me to start thinking about building any kind of application, without having the dreaded feeling that I don’t have enough experience in Back-End architecture and the frustrations that come along with it. We can easily scale and reiterate as we go along, while still maintaining focus on our actual codebase, and not on what version or Linux distribution we should use.
That is not to say that we shouldn’t learn about it, far from it — it would benefit greatly when looking at the big picture — but at least you have a starting point and the tools necessary to start creating.
Every speaker talked about saving money on infrastructure, because you will eventually have to discuss this with business-minded people, and who doesn’t want to spend less on things, especially if you’re not always using them!
While serverless architectures are paid for execution time, you can make sure you’re only spending money on what you’re actually using. And, on top of that, with technologies like AWS Lambda Layers you can reduce the cost even more by extracting your most used dependencies, or custom runtime out of your function’s ZIP file and put them into your preloaded “custom images”. One good example of using layers is to inject all your application monitoring and logging utilities into a “layer”.
An indeed impressive example of this was in Ian Massingham’s talk where a carefully planned migration to serverless lead from an annual payment of $1400 to just $0.06! Among other things, they were paying for an expensive ElasticSearch cluster that was being used just a few times per year. Serverless allows you to experiment! You build your application, you launch it, and if it doesn’t work (adoption or any other reason really, etc.), you haven’t wasted a large amount of money on resources you haven’t used.
Serverless is inherently more secure than traditional infrastructure, and this comes from National Cyber Security Centre Jamie — he would not disclose his last name and we weren’t allowed to take pictures, otherwise he would’ve had to kill us.
On a more serious note, we mostly think about security right about the time when it’s already too late — unfortunately this happens more than you think. Although you still have to write your code with security in mind, you can offload some of the responsibility to your providers. Let them deal with patches and zero-day exploits, because let’s face it, at some point someone is going to forget about updating those dependencies.
Leaving this in the hands of the experts who are managing the whole behind-the-scenes infrastructure is a huge plus, which again, let’s you focus on your code!
Simon Williams from Capgemini UK gave a wonderful talk on how much you can achieve in a short amount of time, from having nothing, to a production-ready, successful application.
Serverless architecture, as I’ve learned, pushes you towards a micro-service mentality, splitting your application into multiple running parts, that can be individually maintained (even by separate teams or written in different programming languages), swapped and scaled as your needs grow. Instead of trying to push releases a few times a week, you can aim for pushing multiple releases a day.
In summary, I really enjoyed the conference and I recommend you sign up for the next ServerlessDAYS event regardless of where you are in the world (there are many!).
At the end, I left Cardiff with a satisfying feeling that I can build anything with the knowledge I already have — now I just have to find some free time to do it! Also, getting a free book (AWS Lambda in Action: Event-driven serverless applications), signed by the author Danilo Poccia AND winning a prize in the raffle was truly the cherry on top!
I hope this post, although not that technical, but instead more conceptual, kindled your interest in doing more research on your own about the Serverless architecture (wink-wink sls.zone) and join the community at the next events; if you’re not a beginner, there is still a great deal of value to be had from attending them, advice and recommendations from leading experts in the industry, who kindly share their experiences with us.
If you’re interested in the discussed topics, and I highly suggest you check them out, go here ServerlessDAYS Cardiff 2019 to find more about the speakers and get access to their slides.