My Serverless Cold-Start And How I Stay Warm!

Sheen Brisals
10 min readMar 10, 2022

It was just after 5 PM on a cold spring evening of 2017. I was in my comfy office chair on the eleventh floor of the LEGO Group’s London Hub. There was a dilemma inside me. Should I pack the bag and head to the comfort of home, or stick around for an hour and stroll to an evening meetup.

After a long stare at the building next door, watching a few people, all smartly dressed, calling it a day, and descending on elevators, I made one of the most important professional decisions of my life!

Reception area of the LEGO Group’s London office.
Source LEGO.com

The Special Meetup

Since I started to work in London, I regularly attended several meetups on different topics of interest — microservices, architecture, AWS, Java, Javascript, agile, to name a few.

That evening, as I was walking towards the meetup place, I had only a faint idea of Serverless — no practical knowledge nor any hands-on experience, but just the concept. My previous experience of building different kinds of applications with varied technologies helped me to understand the high-level concept, and that’s it.

As I reached the destination, the place was already busy and filling quickly for the 7 PM start. As a first-timer to this meetup and not knowing anyone, I grabbed a drink and sat down at the end of a middle row.

It was my first ever Serverless Meetup in London!

The special talk & talk

It was the second talk of the evening that caught my attention. The speaker explained how they were using Function-as-a-Service (FaaS) in implementing a multi-cloud solution both on AWS and Azure. Even though I was familiar with distributed applications and web services, what I heard and saw on the slides opened my eyes to a different world of computing.

Source Serverless London

Later, during the pizza hour, I bought myself some courage and approached the speaker. His name, as I remember, was Raj. At that time, he was working for an online merchant implementing checkout flows and deployment pipelines. All in serverless!

During our brief conversation, I tried to extract as much information as possible on working with serverless. Handling online checkout flow using serverless was intriguing at that time. So I grasped as much as I could during those precious few minutes.

As I walked out of the building, I had a smile on my face, clarity in my head, and confidence in my mind!

Soaking In Serverless

It was time to put serverless into practice! I began to write simple lambda functions. The main aim was to test event-driven execution flows and assess whether they were performant. I wrote those PoC lambda functions in Go, and they were very sleek.

Serverless Architectures

With the lambda part almost understood, my next quest was how to build an architecture with serverless technology. That’s when I came across the first edition of the book Serverless Architectures on AWS! It took my understanding to the next level.

Unlike today, with the limited resources we had a few years ago, this book became my go-to place. While reading, I realized that so much had already started to happen in the serverless space. I regretted I was late to the party!

S3, Lambda, and SQS combo!

Around that time, the modernization of the then shop.LEGO.com was also underway at the LEGO Group. The legacy platform had quite a few challenging data flows. Perfecting these flows and having the end-to-end journey completed within seconds was crucial. The question I and others in the team had was, could serverless handle it?

We started our experimentation — data feed gets dropped in S3, that invokes a lambda function, lambda then pushes to an SQS queue, and another lambda processes the message and updates a SaaS application.

Data pipeline. Source Author

Though it may sound trivial today, back in those days witnessing S3 triggering a lambda function itself felt like magic! In the initial version, we had to poll for messages from SQS, but soon after it became the event source for lambda. We then refactored to make it simple.

First ever serverless microservice!

Testing the early MVP data pipeline proved that the serverless solution was faster than existing legacy flows. As we started to understand the characteristics of SQS better, it helped to vary the speed of message flows between different pipelines.

While the trials proved successful, we had a different concern to address. It was to find a solution for a part of the legacy platform that failed miserably during a high season sales event.

Now that we have some early insights into serverless, the ease of development, and its efficiency, we took a bold step to bundle an API Gateway endpoint and a lambda function together as a replacement for that failed part. Unlike the data pipelines, this API and the lambda would face live traffic, and hence their performance and scaling were uncompromising. It was the very first serverless service that went live on LEGO.com!

First ever serverless microservice. Source Author

This maiden service was under close watch during the next big sale event. Seeing how new lambda instances spun up to cope with the increasing traffic was a treat to many eyes.

This humble first step set the foundation for the serverless journey of LEGO.com, myself, and many of my colleagues at the LEGO Group!

Travelling With Serverless

After my first visit to the Serverless London meetup, I became a regular. Though not spoken to them yet, the faces of Yan Cui, Ant Stanley, and Danilo Poccia became familiar. My only goal at that time was to gather as many serverless details as possible and take them back to the team as we started our journey into this little-known world of serverless!

Early influencers

Danilo Poccia

At one point, the Financial Times office hosted a few serverless meetups. Danilo was a speaker in one, and he had already authored a book on lambda at that time. That’s when I came across him for the first time but had to wait until Serverless Days Helsinki 2019 that I had the opportunity to interact with him. Since then, I have shared many conference stages with him and co-presented talks at AWS re:Invent as well. He has been a great supporter for bringing the serverless work that we’ve been doing for LEGO.com to the community.

Yan Cui

Even during the early days, Yan was a wizard. He used to show his customary serverless architecture diagrams that I stare at in amazement! When he was based in London, I’ve had several conversations with him and cleared many queries on serverless. Later, I traveled to many conferences and appeared as a guest on his podcast. He is one of the early Serverless Heroes with a wealth of knowledge, yet, a simple and humble human being!

Jeremy Daly

Search for implementation patterns in serverless was how I came across Jeremy Daly. Initial comments exchanged on his blog then developed into a serverless community collaboration. His depth of knowledge and the clarity with which he speaks amazes me all the time. Since meeting at Serverless Days Milan a few years ago, we spoke at many conferences. I had the privilege to be one of his early guests on Serverless Chats, and several of my articles regularly feature in his weekly off-by-none newsletter.

Support of The LEGO Group

The trust and encouragement from the leadership team and the stakeholders made our serverless adoption a great success.

Many in the tech community were curious to learn about the modern technology adoption and how serverless was put into practice at LEGO.com. Responding to this curiosity took me to several places. I am always thankful for all the support I receive from the LEGO Group during my travels.

Many more collaborations

As I continued to talk and write about our serverless experience, I’ve had the privilege of interacting with many great people from the industry. As new tech contributors join the community, the list is constantly growing.

Source AWS

Several product teams from AWS, serverless developer advocates, solution architects, and many more continue to contribute to this journey.

Staying Warm

To keep up with serverless, or any technology for that matter, you have to be passionate. Beyond my passion for serverless, there are a few simple things that make me stay grounded and in touch.

Being inspired

Technical inspirations, which often make me envious, come from different sources. For example, when Ben Kehoe talks about IAM or Alex DeBrie dives deep into DynamoDB, I feel the urge to listen.

Inspirations often come from different directions and topics that we least expect. Farrah Campbell is a Senior PM at AWS who is known to many in the AWS serverless community. I came to know Farrah even before she joined AWS. I was one of the few people listening to her talk at the Serverless Architecture Conference in 2019. Besides her jokes about JSON and Cassandra, I was moved by her talk on that day.

Many of us take our education and entry into the profession for granted, but knowing the people around us and the journey they’ve been through to get to where they are, are real inspirations.

Being an influencer

Something I learned over the years is that to become an influencer to someone, you don’t need a title. “The leader who had no title” may not be everyone’s favorite book, but it certainly made me think of the role each of us plays.

The AWS Serverless Hero title gets me recognition but that’s not enough to influence others.

While working with engineers, a gentle nudge to write about something, assisting to deliver a talk, introducing to a serverless feature, or helping to do their first solution design are some of the ways to make a positive impact in someone else’s life.

Technology awareness

With the speed of innovation, it’s impossible to know and understand everything. Even in one particular area, be it web, AWS, or serverless, there are several things that I don’t know. I accept it! Developing a general awareness helps decide whether to dive deep into certain parts or stay shallow.

If I try to be a jack of all trades, I am equally aware that I will become master of none!

As the serverless community grows, several new avenues are open for enriching our knowledge. Making use of these is an essential part of growing in serverless.

Community contribution

Sharing what I know with others is one of the best things I like in life, and I continue to do. In the tech world, not everyone is on par with everything. Not all messages reach everyone or everywhere. Even if there are materials about a topic already in place, there is still room for something more and better.

Effective speaking or writing is all about packing the content in the right way for the right audience. After all, when we talk about technology, we want everyone to understand and adopt, don’t we?

A couple of years ago, I gave the following talk on Amazon EventBridge. Many reached out to appreciate that it was an interesting and useful talk. I merely packaged EventBridge in such a way that it connected with the audience!

Knowing my limits

Even the infinite-scale serverless services have limits. A lambda function has limits. So do I!

Besides doing a PoC or personal learning, I no longer code on a daily basis — a conscious decision I made to split my time on reading, writing, architecture, mentoring, travel, and among other personal interests.

Being humble

It’s an ongoing effort to become a better person. Often I meet engineers of two extreme ends. Some ask questions on in-depth technical matters that I struggle to understand, let alone answer. On the other end, many approach me with no knowledge of serverless but looking for an entry point into serverless for their teams and organizations. Such conversations make me realize the huge potential we as a serverless community have in front of us.

When we connect with teams that migrate workloads from legacy to serverless or coming from a traditional development environment, we need to get to their level first before uplifting them to the advances of serverless.

Will I Timeout?

Of course, I will. What doesn’t in this world? That question in itself is a motivation to stay warm and not run out of resources!

As technology evolves, we, as engineers, take sides. For me, it was OO and C++ during the 90s, Java and web services soon after, and cloud and serverless in the last decade and now. The lessons I learned over the years are to be passionate, flexible, and adaptive to stay afloat in the industry.

For now, I love serverless, and I am grateful for the opportunities. Going forward, I will strive to stay warm and radiate the warmness of serverless around!

--

--

Sheen Brisals
Sheen Brisals

Written by Sheen Brisals

Co-author of Serverless Development on AWS (O'Reilly, 2024) | Engineer. Architect. Leader. Writer. Speaker. AWS Serverless Hero.

Responses (1)