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 Shapira, Erica Windisch, Kelsey 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. 🙌
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!
Share this newsletter with your friends and coworkers!
Off-by-none is a weekly email newsletter that focuses on the technical details of building applications and products in the cloud using serverless technology. Together we can become better developers and product people by making fewer mistakes as we learn from each other. Off-by-none is the idea that we can become exceptional at what we do, if we are willing to put in the work. Join me on this journey as we help the community work to develop best practices, share our ideas, and learn to build better cloud-based software.
I respect your privacy and I will NEVER sell, rent or share your email address.