The responses to Kelsey's tweet illustrate a fascinating disconnect between traditional and #serverless mindsets. If you approach "serverless" like any other compute platform, you're going to be disappointed. Here's why… 🧵
Let me start by clarifying what I mean by a "traditional" mindset. I don't mean "legacy", and I certainly don't mean "wrong". I think of it as the encapsulation and orchestration of compute processes within a single execution stack. This includes both VMs and containers.
The traditional mindset assumes some measure of vertical scaling (e.g. concurrency) within an environment, often relying on some form of statefulness/stickiness, and then graduating to horizontal scaling to achieve higher throughput. Again, nothing wrong with this approach.
There are, of course, limitations, especially as the size & scope of apps grow and certain workloads require specialized hardware. Multi-tier architectures separate out the data layer, and microservices break processes into smaller parts, but the compute mindset stays the same.
The serverless mindset approaches this differently. First of all, you must think of "compute" more broadly in terms of the platform and ecosystem's capabilities versus simply as a way to "execute code." There are lots of things FaaS can't do, because it doesn't need to.
A serverless approach should have you thinking about what's required for each discrete operation and how the platform/ecosystem can accomplish it. If the platform can't handle it, then (and likely, only then) should you write a discrete piece of custom business logic.
Discrete operations in a serverless application can then be orchestrated and/or choreographed into larger business workflows. Each operation can be scaled, secured, upgraded, and managed separately, allowing for tremendous flexibility and interoperability.
From a scalability perspective, each concurrent execution should be handled horizontally. This means that each invocation has the same resource allocations, theoretically providing the same predictability of performance. No noisy neighbors, shared memory, or CPU bottlenecks.
There are plenty of tradeoffs with this approach. Most notably the fact that each discrete operation becomes its own distributed application. This can introduce latency, additional points of failure, idempotency issues, etc. However, more mature platforms mitigate these for you.
There's also the developer experience issue. Managing and understanding hundreds or thousands of configurations for different services (all with their own limitations) along with the need to organize custom logic, maintain/monitor workflows, ensure security, etc., is non-trivial.
Also, while the "traditional" mindset doesn't exclude an event-driven approach (popular w/ containerized apps), serverless apps are *entirely* event-driven. Some events are processed synchronously, but the vast majority are asynchronous, disconnected from the client-server model.
This is why arguments like "Lambda only runs for 15 minutes", "cold starts take too long", "there's not enough CPU/RAM/Storage", etc., become mostly irrelevant when a serverless app is properly designed. Not because there aren't limitations, but because you design around them.
If you try to run a 4 hour ETL job in a Lambda function, that won't work. And here's the thing, it's not supposed to. Instead, the constraints force you to think in distributed patterns, like fan-out or scatter-gather. It's not as simple, but it's incredibly fast and scalable.
But this brings us to the wider industry problem. Most of the big players approach serverless with a traditional mindset, which IMO, is wrong. "Serverless" solutions that are backed by container orchestration systems like Kubernetes are 1 step away from becoming fully-abstracted.
That is to say, most people don't want/need to run their own K8s cluster, which is why EKS, AKS, & GKS are so popular. And once this happens, you've essentially just built a less efficient version of AWS Lambda that relies on dozens of abstractions to execute a few lines of code.
This may allow for less initial constraints, but ultimately moves your application further away from the metal. Alternatively, "microVMs" built with @awscloud's FireCracker or the isolates being used by @Cloudflare are much more interesting and will unlock new efficiencies.
There's a dissonance created by providers trying to meet customers where they are, but also hedging their bets on a wildly different future. I'm not criticizing them for that b/c you need to go where the gravity is. I just hope it's a means to an end, not a long term strategy.
Anyway, I truly believe "serverless" will eventually overtake container orchestration once more CSPs build microVM orchestration into their platforms like AWS Lambda. Until then, we'll need to live with a patchwork of solutions hopelessly trying to avoid "vendor lock-in". 🙄

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Jeremy Daly

Jeremy Daly Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @jeremy_daly

1 Jan
Here is my Ode to the Cloud 2021. Happy New Year, everyone! 🍾🥂🎆 #cloud #serverless
Two thousand twenty-one, a strange year we have seen,
Mixed with lots of highs and lows, and bags of in between.
And even though, most of us, just want to scream out loud,
Plenty of interesting things, did happen in the #cloud.
Jassy went to Amazon 'cause Bezos went to space,
And all without missing a beat, Selipsky took his place.
Munns decided startups, is where his help should aim,
So Talia, James, and others, all stepped up their game.
Read 28 tweets
4 Nov 21
Yesterday I turned 43 and realized I've been in #tech for 24 years (I got paid to create my first "professional" website in 1997). Here's 24 things I've learned over the past 24 years. Perhaps you'll find them useful on your journey. 🧵
24. Plan work around your life, not life around your work - I worked 70+ hr weeks in my 20s & early 30s. While I'm sure there's a correlation between that & my "successes", there's also a lot of regret for missed time with family & friends.
23. Be a T-shaped human - There are 3 types of knowledge: the shit you know, the shit you know you don't know, and the shit you don't know you don't know. Specialize in a few things, and gain wisdom by learning the basics of many others.
Read 25 tweets
1 Oct 21
Everyone got so excited about Graviton2 Lambda functions & Step Functions AWS-SDK integration yesterday that you might have missed this one about triggering Lambda functions from SQS queues in *different* accounts. This is important, a short 🧵 #serverless aws.amazon.com/about-aws/what…
Having multiple AWS accounts to handle different parts of your application (from both a lifecycle and service perspective) isn't just good practice, it's also AWS recommended. 👍 2/9
This is because AWS account separation is the best isolation model for security, scalability, regional controls, service limit management, billing 👈, and much more. 3/9
Read 9 tweets
2 Dec 20
Very cool #reInvent session by @sliedigaws about building out distributed applications using different #EventBridge patterns. Let's recap this quickly to see how we can use them to build out our #serverless apps. 🧵
The "single-bus, single-account" pattern is a super simple way to get started, especially if you have a small team. Create logical service boundaries and use a single event bus to decouple the services. This is one of my favorite ways to prototype #serverless applications.
The "single-bus, multi-account" pattern is my go-to for larger apps, and works great for multi-team orgs w/ service-level ownership reqs. Create a *global* event bus, grant access to service accounts for putEvents, and forward events to service-owned buses for rules & routing. 👍
Read 9 tweets
16 Oct 20
Excellent post by @mipsytipsy on the future of Ops careers, even if it’s a bit critical of "Lambda: A Serverless Musical". 😉

While I 100% agree that #serverless isn’t headed towards the ridiculous notion of #NoOps, I have some thoughts on the article. 🧵
thenewstack.io/the-future-of-…
Context is *extremely* important. The repeating line in the musical of "I'm going to reduce your… ops!" is in the context of setting up and maintaining a Kubernetes cluster. If it's not obvious the first time with "Hey yo, I'm unlike containers, no patching, no maintainers"...
…then the second time around adding "No pods or orchestrators" should make it abundantly clear. Since I consider myself a #serverless purist, I try to avoid the "K" word, but the line "I know all this stuff with K8s is excitin'" should settle any further misunderstanding.
Read 13 tweets
6 Feb 20
.@alexbdebrie has another excellent post that details the benefits and downsides of using a Single-Table design with @DynamoDB. While I completely agree with him on the “benefits”, I have some thoughts on his “downsides” that I’d like to address. 🧵 alexdebrie.com/posts/dynamodb…
Downside #1: “The steep learning curve to understand single-table design”

There is no doubt that “thinking in #NoSQL” is a complete departure from traditional #RDBMS, but understanding how to correctly denormalize data is applicable to both single- AND multi-table designs.
If you are using a multi-table design in @DynamoDB that implements 3NF, then just STOP! Seriously, this is *beyond* wrong (I think presidents have been impeached for this). This is not what #NoSQL was designed for and you will get ZERO benefit from doing this. Spin up an RDBMS.
Read 28 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(