VOOZH about

URL: https://thenewstack.io/have-some-cake-the-new-stateful-serverless-stack/

⇱ Have Some CAKE: The New (Stateful) Serverless Stack - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-10-12 07:03:42
Have Some CAKE: The New (Stateful) Serverless Stack
contributed,sponsor-cncf,sponsored,sponsored-post-contributed,
Serverless / Software Development / Storage

Have Some CAKE: The New (Stateful) Serverless Stack

Architecting an app for scale from the start used to mean choosing between starting fast vs. scaling fast later. The the CAKE stack lets you start with a configuration that will meet your needs for the long term.
Oct 12th, 2022 7:03am by Keith McClellan
👁 Featued image for: Have Some CAKE: The New (Stateful) Serverless Stack
Feature image via Pixabay
CNCF sponsored this post.

This is part of a series of contributed articles leading up to KubeCon + CloudNativeCon on Oct. 24-28.

Serverless application stacks have been stuck in a conundrum: Most applications need some kind of state store, but most state stores aren’t serverless. Rich data applications like payment apps, buy online/pick up in-store services and real-time online sports betting are incompatible with fully serverless architecture simply because, at some point, the database becomes a bottleneck.

With a serverless application, your scalability depends on your cloud provider’s ability to spin up more nodes as your load grows. Without a scalable database to receive the load from the application, though, at some point, there is not enough data-handling capacity to accommodate the current volume of traffic. When this happens, the bottleneck shifts directly to the database and the flow of data is impaired, or even stopped entirely, with potentially disastrous results.

There are, of course, distributed databases that can scale out automatically to meet increasing demand. The problem? Almost every distributed state store on the planet has a minimum scale required to operate. This is fine for users who already know they have a large-scale problem. But, when you’re just getting started, the cost in both time and money to ensure your application can scale out later is prohibitive when what you need most is to build a minimum viable product (MVP) as rapidly as possible.

Resolving the dilemma between scaling vs. starting when building a stateful, ground-up serverless application requires a serverless distributed database with true “scale to zero” capability. One that can automatically scale up and down to accommodate workload demand, while charging only for the amount of compute actually consumed. The first to deliver the ability to build fully stateful applications in a fully serverless way was CockroachDB Serverless.

KubeCon + CloudNativeCon conferences gather adopters and technologists to further the education and advancement of cloud native computing. The vendor-neutral events feature domain experts and key maintainers behind popular projects like Kubernetes, Prometheus, Envoy, CoreDNS, containerd and more.
Learn More
The latest from KubeCon + CloudNativeCon

Hello, CAKE Stack

Building fully stateful serverless applications require a new approach to your application stack, and so today we introduce the CAKE stack.

CCockroachDB Serverless
AAuthorization, authentication, session and user management
KKubernetes
EEvent-driven serverless platforms

C Is for CockroachDB Serverless

To power these next-generation serverless applications, we need a database that solves your scale-up and scale-down problems. And it needs to be a consistent data store so you can use it for your most business-critical applications. CockroachDB serverless does all of these things and more, all while giving you a generous free hosted scale with your workload serverless offering.

A Is for Auth

To enable all those different endpoints to have common access controls, we also need next-generation authorization, authentication, session and user management. Platforms like Keycloak and Authzed enable distributed session management for centralizing access across multiple frontends, all in a container-native way. When using CockroachDB as the backing store, it becomes resilient and redundant across instances with no potentially complex backend configuration changes required.

K Is for Kubernetes

Distributed systems are inherently complex, so we need a way to orchestrate all the moving pieces. The essential anchor of our new stateful serverless stack is Kubernetes, since the big K8s vendors are offering dynamic, low-friction scaling mechanisms for our orchestration layer. This allows us to move away from any serverless platform that would lock us into a specific Infrastructure as a Service. It instead gives our stack full portability across data centers, cloud regions or even cloud providers so we can spin up resources as close to our users as possible.

E Is for Serverless Frameworks

Of course, we need to host and deploy our serverless, event-driven architecture. At this point in the stack there are two moving pieces to select: serverless frontend and backend frameworks. For our presentation layer, we need a distributed hosting and content delivery platform to operationalize our data and make it available over APIs for ease of use. A platform like Directus or Vercel (both of which have added native CockroachDB support to their offerings recently) enables centralized data access across multiple consumption modes — native application, web, mobile, IoT, etc. — and built-in serverless functions. Put another way, it makes it easy to just code against the data in our database instead of having all our microservices talk to the database directly.

On the backend, platforms like Knative enable our serverless deployment workflow, allowing individual event processing pipelines and functions to scale elastically as required to meet user demands. No more tightly-coupled application monoliths or even complex services that still require intervention to scale. Now, each atomic function or workflow can scale up, and down, as necessary. No more overprovisioning for burst events and no more paying for unused capacity.

(And M Is for Modular)

The great thing about the CAKE stack is that it’s fully modular. Don’t like Knative? Use Lambda or Cloud Functions. Not a fan of Keycloak? Integrate with your favorite authentication platform. Now that we have the missing-link power of a truly serverless database at our fingertips, we can unlock the full potential of fully serverless applications. Let’s look at an example.

Imagine you’re building a platform that enables florists to work with local delivery drivers to supply fresh bouquets to local homes and businesses. This business is very bursty: Valentine’s Day is going to bring peak workloads, as are mornings on most business days. But you really don’t need much running overnight.

To start, you might just be working with a handful of drivers and florists in a single town. Your MVP certainly doesn’t need the infrastructure to run this nationwide during your initial launch. But, if you don’t build it that way from the start, you’ll have to re-architect when your business catches on coast-to-coast and you need to scale out. Using the CAKE stack, though, means that your apps, your data and your location all scale right along with your business and your usage — all in real time with no intervention, and also without running a bunch of infrastructure you don’t yet need in the meantime.

Architecting an app for scale from the start used to mean choosing between starting fast now vs. scaling fast later. Either taking on the complexity and cost of distributed architecture before you even have your first customer or starting out with an enormous amount of technical debt that can cause you to fail to scale once your customers do begin pouring in, or requiring massive rearchitecting.

Now, however, the serverless universe has matured to the point where you can start with a configuration that will meet your needs for the long term. All of the elements of the CAKE stack we have named here are even free to get started, with costs eventually incurring once your usage goes up, rather than having to pre-pay for a bunch of dormant infrastructure. Building an application using the CAKE stack means performance and costs scale so you can focus on onboarding the most important asset of all: your customers.

To hear more about cloud native topics, join the Cloud Native Computing Foundation and the cloud native community at KubeCon + CloudNativeCon North America 2022 in Detroit (and virtual) from Oct. 24-28.

👁 Image

The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure including Kubernetes, OpenTelemetry, and Argo. CNCF is the neutral home for cloud native collaboration, bringing together the industry’s top developers, end users, and vendors.
Learn More
The latest from CNCF
TRENDING STORIES
Keith McClellan is director of Partner Solutions Engineering at Cockroach Labs. Prior to Cockroach Labs, he held technical leadership positions in cloud native and big data companies including DataStax, Mesosphere (now D2IQ), and Platfora. Keith lives in the metro DC...
Read more from Keith McClellan
CNCF sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.