Off-by-none: Issue #7

Livin’ in the (serverless) future 🤖

Welcome to Issue #7 of Off-by-none. I’m excited to have you here! 🙌 Let’s talk about serverless.

Last week we talked about the future of serverless now that institutional investors are starting to get behind some related startups. This week I want to talk about a recent announcement from AWS that sheds even more light on what the future of serverless holds and why it will become the dominant force in cloud computing.

Let’s get started!

Why incremental changes can actually mean very big things… 🐘

Last week AWS announced that Lambda functions can now run up to 15 minutes. They also introduced the new “Applications” menu in the Lambda Console. On their own, these may seem like small improvements to AWS’s Lambda compute product. However, in my new post, What 15 Minute Lambda Functions Tells Us About the Future of Serverless, I argue that these announcement actually tell us a heck of lot more.

There are many arguments against serverless (some of them are even valid 😉). But these improvements give us insights into the ongoing battle to create a new kind of near limitless compute layer, one that could handle just about any use case. These are very exciting times.

When you realize that serverless might be more about business value… 📈

Every once in a while, someone will articulate something in a way that pretty much anyone (even company executives 😬) can understand. The Business Case For Serverless is a brilliant piece by Forrest Brazeal that should be sent to every C-level executive at your company. This piece covers everything from the total cost of ownership fallacy to the weak vendor lock-in argument. I also love how it doesn’t introduce serverless as an “all-or-nothing proposition”, but instead, can be adopted over time by using something like the Strangler Pattern.

When you’re looking for some serverless brain candy… 🍭

James Beswick’s (@jbesw) new post, Postcards from Lambda @ the Edge, is an exciting (and potentially sobering) look into the magical space that is Lambda@Edge. With all the recent buzz about Cloudflare Workers, it’s been easy to forget that AWS has had this for quite some time. The term “multi-region” is generally enough to induce panic attacks in many a developer. Lambda@Edge might be a good first foray into this uncharted (and mostly undocumented) territory. 👨‍🚀

Serverless DevOps: Why Serverless For Operations People is another great read where Tom McLaughlin thoroughly discuses how serverless makes teams more efficient by handing off operations to the cloud provider. Not only does this reduce operational costs, but it gives your team more time to solve business problems (you know, the things that actually make you money). 🤑

And Yan Cui is at it again, detailing some Common Node8 mistakes in Lambda. Node8 means access to async/await, but there are several ways in which we can (and most likely will) misuse this powerful new feature. This post is a must read for Node.js developers using serverless. 👩‍💻

Serverless Star of the Week ⭐️

There is a very long list of people that are doing #ServerlessGood and contributing to the Serverless community. These people deserve recognition for their efforts. So each week, I will mention someone whose recent contribution really stood out to me. I love meeting new people, so if you know someone who deserves recognition, please let me know.

This week’s star is Forrest Brazeal (@forrestbrazeal). I already mentioned Forrest’s amazing piece, The Business Case For Serverless, but Forrest is also a man on a (serverless) mission. As a Senior Cloud Architect at Trek10, Inc., an AWS consulting firm, Forrest works with real-world customers solving real-world serverless problems. But rather than keeping all that learning to himself, he is constantly sharing it with the community. Whether it be through his talks at conferences, his “Serverless Superheroes” blog series, his regular hosting of the Think FaaS podcast, or his FaaS and Furious cartoons, Forrest is doing great work to educate the masses about the benefits of serverless. And he’s also an AWS Serverless Hero.

Final Thoughts 🤔

For the last several years I have seen the same list of arguments against serverless: vendor lock-in, steep learning curve, not suitable for long running tasks, cold starts, poor logging, lack of observability, hard to test locally, response latency, etc.

Many of the above are valid concerns, but most are merely due to the fact that serverless is still in its infancy as a compute platform. Technical challenges aside, if we look beyond arbitrary limits, recycled cloud-based virtual machine arguments, and the semantics we use to describe it, we’ll see that something entirely new is being invented here. Serverless (or service-full) technology will continue to mature, and soon there will be little left to argue about.

How was this issue of Off-by-none? Feedback and suggestions are always appreciated. Contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, criticisms, and how you’d like to contribute to Off-by-none. Your input helps me make this newsletter better each week.

Go build some great serverless apps. Hope to see you all next time!


🚀 Project Update:

Lambda API: v0.8.1 Released

Lambda API v0.8.1 has been released to patch an issue with middleware responses and a path prefixing options bug. The release is immediately available via NPM. Read More...

An Introduction to Serverless Microservices

Thinking about microservices, especially their communication patterns, can be a bit of a mind-bending experience for developers. The idea of splitting an application into several (if not hundreds of) independent services, can leave even the most experienced developer scratching their head and questioning their choices. Add serverless event-driven architecture into the mix, eliminating the idea of state between invocations, and introducing a new per function concurrency model that supports near limitless scaling, it’s not surprising that many developers find this confusing. 😕 But it doesn’t have to be. 😀

In this post, we’ll outline a few principles of microservices and then discuss how we might implement them using serverless. If you are familiar with microservices and how they communicate, this post should highlight how these patterns are adapted to fit a serverless model. If you’re new to microservices, hopefully you’ll get enough of the basics to start you on your serverless microservices journey. We’ll also touch on the idea of orchestration versus choreography and when one might be a better choice than the other with serverless architectures. I hope you’ll walk away from this realizing both the power of the serverless microservices approach and that the basic fundamentals are actually quite simple.  👊

Audio Version:

Continue Reading…

Off-by-none: Issue #3

They say that breaking up (an app) is hard to do

Hello, All! Welcome to Issue #3 of Off-by-none. I’m so happy that you’re here to talk about #serverless. ⚡️

Last week we talked about serverless security and how important it is to educate developers, especially now that they are much closer to the execution stack and typically lack the necessary security training. This week, I want to start a discussion about what to do as more and more complexity begins creeping into our serverless applications. This is a long discussion, so we’ll just skim the surface today, but over the next few weeks, I’d like to expand on this topic and see where it leads us.

Let’s dive in! 🏊‍♂️

When your monolith starts to get out of hand… 🔥

A very popular use case for serverless is to create microservices (or even nanoservices). And before you respond with the obvious, “well of course, who would create monoliths with serverless?” Let me just say, a lot of people create monoliths in serverless. While there is much discouragement about doing so, in some narrow use cases, it can make sense. However, for most serverless workloads, splitting up your services into small, composable units, is a much better choice.

I’ve written extensively about serverless microservice patterns for AWS, and I’m personally a huge fan of microservice architectures in general. But microservice architectures are complex, and require coordination and communication between services to operate efficiently at scale. We strive for low coupling and high cohesion in our services, constantly wrestling with our choices of synchronous versus asynchronous communication, eventual consistency, orchestration versus choreography, service boundaries and much more.

Serverless introduces us to new ways to interconnect these microservices. We can use the more traditional pub/sub or message bus approach with things like SNS. Plus we can still queue information with SQS and use competing consumers to process our messages. But serverless is also an event-driven architecture, which goes beyond the service-oriented architectures (SOAs) of the past. Our services can be triggered by streamed events from Kinesis or DynamoDB, react to things like file uploads, configuration changes, alarms and much much more. They can drive the caching and routing behavior of CDNs with dynamic and distributed worker functions. They can coordinate massively distributed jobs at almost any scale and still aggregate the results using state machines, durable functions, or other available patterns.

This is a new way to think about and design our applications, and it isn’t easy. My most recent project has left me scratching my head a number of times about the best way to choreograph the communication between services. I’m even rereading Sam Newman’s Building Microservices to try and make sense of some of these paradigm shifts while still applying the best practices that more traditional microservice architectures have taught us. There is a lot to take in, so don’t feel bad if some of this stuff perplexes you. 😕

There are several good articles and talks that I link to in today’s newsletter, so explore these to see how others are dealing with these services at scale. I’ve been working on a few pieces that attempt to boil all this down for you, but they’re not quite ready for primetime. I hope this gets you thinking about this topic, and please feel free to share with me other resources you’ve found on the subject.

When you want to learn from the experts… 👨‍🔬

ServerlessDays Portland was yesterday, and it looks like it was another successful event. (BTW, I’m on the planning committee for ServerlessDays Boston, so follow us on Twitter and stay tuned for announcements).

Obviously Chris Munns was there, and gave a talk about “Serverless and DevOps?” and was kind enough to put the slides online. I’m hoping that the event was filmed and we’ll see some of the videos pop up online soon. It’s always great to see talks by Charity Majors, Nitzan ShapiraErica WindischKelsey Hightower and others.

Speaking of videos of serverless talks, A Cloud Guru just dropped the mother load! A ton of ServerlessConf 2018 talks are now available for your viewing pleasure! Grab a pen and a notebook, some popcorn, and get ready to binge watch hours of brilliant serverless talks. 🍿😳📺

Also, don’t forget that there is an AWS webinar on September 19, 2018 at 9 AM PT about Serverless Application Debugging and Delivery. I think it will be interesting, so I’m planning on watching.

When you have a few extra minutes to read on the train… 🚂

Chris Armstrong over at Gorilla Stack wrote a great piece called Splitting your Serverless Framework API on AWS. The CloudFormation 200 resources limit has bitten many of us when we start to build and launch complex serverless applications. Chris outlines some strategies to break up your Serverless apps by using a “base stack” to create your API Gateway and then integrate child stacks as your app grows. 👍

If there’s one company that has gone all in on serverless, it’s Nordstrom. Last week they launched a new blog on Medium (with a really creative title 😉) called Tech at Nordstrom. In their first real post, Google Cloud Next 2018: Is this the year that Google embraces serverless?, Rob Gruhl talks about how Nordstrom invokes over 200 million serverless functions every day and outlines a great wishlist for Google Cloud. ⛅️

Finally, Raees Bhatti teaches us how to Use Cloudflare Workers + Serverless Framework to add reliability and uptime to your FaaS. This is a great follow up to Troy Hunt’s article we mentioned last week that allowed him to support 141M monthly queries of 517M records for just 2.6 cents per day. 💸

What happens when Ory Segal bumps into Simon Wardley at SFO? ✈️

💥 Pure magic. Ory and Simon spend just over 30 minutes Musing on Serverless and Application Security in this excellent “informal” interview. Simon Wardley is the creator (and namesake) of Wardley Maps, which helps you anticipate market and ecosystem developments so you know where to go and why. He is a huge proponent of serverless and makes a number of compelling arguments as to why it will be the next big thing. There is both an audio version and transcript of this interview. It is an excellent discussion that is packed with valuable information and definitely worth a listen/read.

Serverless Star of the Week ⭐️

There is a very long list of people that are doing #ServerlessGood and contributing to the Serverless community. These people deserve recognition for their efforts. So each week, I will mention someone whose recent contribution really stood out to me. I love meeting new people, so if you know someone who deserves recognition, please let me know.

This week’s star is Andrea Passwater (@andreapasswater). Andrea is the Lead Content Strategist over at Serverless, Inc., creators of the amazing Serverless Framework. While Andrea describes herself as someone who “doesn’t code“, she has done a pretty good job stitching together some serverless applications to help automate her marketing tasks (see her Serverlessconf 2018 Lightning Talk). However, I didn’t choose Andrea just because she showed us how easy it is for “non-developers” to get started with serverless, but because of the valuable content she helps to create and disseminate.

“You probably aren’t just changing the way developers work. You could eventually start a mass automation movement that changes the way everyone works.” ~ Andrea Passwater

I’ve met thousands of developers over my career, and there are a select few that can present technical information in a way that can inspire others to change their mindset and explore new things. Andrea is not only coordinating this type of content (through the Serverless blog, [cron]incle newsletter, and Twitter), but is also doing a great job of distilling down technical content for the masses. Anything that helps lower the barrier to entry for serverless is a win in my book.

On a more personal note, I have two daughters in middle school, one who loves science, and the other who loves math. In a male-dominated tech industry, women like Andrea (who also started the #WomenWhoServerless meet ups) serve as role models to girls and young women all around the world who want to get into technology. You need to know that you’re making a positive impact, and that you have the undying gratitude of dads like me.  🙌

Final Thoughts 🤔

As I mentioned in the beginning, I just wanted to start this conversation about managing complexity in our serverless applications. As we begin to reach scale, there are a lot of things to start thinking about, especially when it comes to coordination of microservices. We’ll explore this in more detail in the weeks to come, but it never hurts to get a head start.

Also, it’s important to remember as we start to talk about serverless scale, that serverless has other use cases that apply to much smaller tasks as well. Think about the little things that Andrea Passwater automated to make her job a bit easier. Thinking Serverless (Big and Small) goes into some more detail about some of the smaller use cases as well.

I hope you enjoyed this issue of Off-by-none. Feedback is always greatly appreciated and helps me make this newsletter better each week. Contact me via Twitter, LinkedIn, Facebook, or email and let me know your thoughts, angry rants, or even how you’d like to contribute to Off-by-none.

Go build some great serverless apps. Hope to see you all next week!


Managing MySQL at Serverless Scale

“What? You can’t use MySQL with serverless functions, you’ll just exhaust all the connections as soon as it starts to scale! And what about zombie connections? Lambda doesn’t clean those up for you, meaning you’ll potentially have hundreds of sleeping threads blocking new connections and throwing errors. It can’t be done!”  ~ Naysayer

I really like DynamoDB and BigTable (even Cosmos DB is pretty cool), and for most of my serverless applications, they would be my first choice as a datastore. But I still have a love for relational databases, especially MySQL. It had always been my goto choice, perfect for building normalized data structures, enforcing declarative constants, providing referential integrity, and enabling ACID-compliant transactions. Plus the elegance of SQL (structured query language) makes organizing, retrieving and updating your data drop dead simple.

But now we have SERVERLESS. And Serverless functions (like AWS Lambda, Google Cloud Functions, and Azure Functions) scale almost infinitely by creating separate instances for each concurrent user. This is a MAJOR PROBLEM for RDBS solutions like MySQL, because available connections can be quickly maxed out by concurrent functions competing for access. Reusing database connections doesn’t help, and even the release of Aurora Serverless doesn’t solve the max_connections problem. Sure there are some tricks we can use to mitigate the problem, but ultimately, using MySQL with serverless is a massive headache.

Well, maybe not anymore. 😀 I’ve been dealing with MySQL scaling issues and serverless functions for years now, and I’ve finally incorporated all of my learning into a simple, easy to use NPM module that (I hope) will solve your Serverless MySQL problems.

Continue Reading…

Serverless Microservice Patterns for AWS

I’m a huge fan of building microservices with serverless systems. Serverless gives us the power to focus on just the code and our data without worrying about the maintenance and configuration of the underlying compute resources. Cloud providers (like AWS), also give us a huge number of managed services that we can stitch together to create incredibly powerful, and massively scalable serverless microservices.

I’ve read a lot of posts that mention serverless microservices, but they often don’t go into much detail. I feel like that can leave people confused and make it harder for them to implement their own solutions. Since I work with serverless microservices all the time, I figured I’d compile a list of design patterns and how to implement them in AWS. I came up with 19 of them, though I’m sure there are plenty more.

In this post we’ll look at all 19 in detail so that you can use them as templates to start designing your own serverless microservices.

Audio Version:

Continue Reading…

🚀 Project Update:

Lambda API: v0.8 Released

Lambda v0.8 is finally here and was well worth the wait! New features include allowing middleware to accept multiple handlers, new convenience methods for cache control and signing S3 URLs, and async/await support for the main function handler. And best of all, new LOGGING and SAMPLING support for you to add more observability into your APIs and web applications. Read More...

Aurora Serverless: The Good, the Bad and the Scalable

Amazon announced the General Availability of Aurora Serverless on August 9, 2018. I have been playing around with the preview of Aurora Serverless for a few months, and I must say that overall, I’m very impressed. There are A LOT of limitations with this first release, but I believe that Amazon will do what Amazon does best, and keep iterating until this thing is rock solid.

The announcement gives a great overview and the official User Guide is chock full of interesting and useful information, so I definitely suggest giving those a read. In this post, I want to dive a little bit deeper and discuss the pros and cons of Aurora Serverless. I also want to dig into some of the technical details, pricing comparisons, and look more closely at the limitations.

Audio Version

Continue Reading…

A Tale of Two Teams

Audio Version:

It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness… ~ A Tale of Two Cities by Charles Dickens

There is a revolution happening in the tech world. An emerging paradigm that’s letting development teams focus on business value instead of technical orchestration. It is helping teams create and iterate faster, without worrying about the limits or configurations of an underlying infrastructure. It is enabling the emergence of new tools and services that foster greater developer freedom. Freedom to experiment. Freedom to do more with less. Freedom to immediately create value by publishing their work without the traditional barriers created by operational limits.

Continue Reading…

25 Serverless Peeps You Need To Follow

In my never ending quest to consume all things serverless, I often find myself scouring the Interwebs for new and interesting serverless articles, blog posts, videos, and podcasts. There are more and more people doing fascinating things with serverless every day, so finding content is becoming easier and easier. However, this increase in content comes with an increase in noise as well. Cutting through that noise isn’t always easy. 🙉

Great content with valuable insights

I personally love reading articles that introduce new use cases or optimizations for serverless. Stories about companies using serverless in production and how their architectures are set up are also extremely interesting.. I’ve been working in the serverless space for several years now, and have come across a number of people who produce and/or share really great content. I’ve put together a list of 25 people that I follow and enjoy their content regularly. Hopefully these people will help you learn to love serverless as much as I do. ❤️⚡️

Continue Reading…