A Guide to Designing and Writing Serverless Cloud Applications
Evan Anderson

#Knative
#Serverless_Applications
Explore the theory and practice of designing and writing serverless applications using examples from the Knative project. With this practical guide, mid-level to senior application developers and team managers will learn when and why to target serverless platforms when developing microservices or applications. Along the way, you'll also discover warning signs that suggest cases when serverless might cause you more trouble than joy.
Drawing on author Evan Anderson's 15 years of experience developing and maintaining applications in the cloud, and more than 6 years of experience with serverless platforms at scale, this book acts as your guide into the high-velocity world of serverless application development. You'll come to appreciate why Knative is the most widely adopted open source serverless platform available.
With this book, you will:
Table of Contents
Part I. The Theory of Serverless
Chapter 1. What Is Serverless, Anyway?
Chapter 2. Designing from Scratch
Chapter 3. Under the Hood: Knative
Chapter 4. Forces Behind Serverless
Part II. Designing with Serverless
Chapter 5. Extending the Monolith
Chapter 6. More on Integration:
Event-Driven Architecture
Chapter 7. Developing a Robust Inner Monologue
Chapter 8. Too Much of a Good Thing Is Not a Good Thing
Part Ill. Living with Serverless
Chapter 9. Failing at the Speed of Light
Chapter 1 0. Cracking the Case: Whodunnit
Part IV. A Brief History of Serverless
Chapter 11. A Brief History of Serverless
Serverless has become a major selling point of cloud service providers. Over the last four years, hundreds of services from both major cloud providers and smaller service offerings have been branded or rebranded as “serverless.” Clearly, serverless has something to do with services provided over a network, but what is serverless, and why does it matter? How does it differ from containers, functions, or cloud native technologies? While terminology and definitions are constantly evolving, this book aims to highlight the essential attributes of serverless technologies and explain why the serverless moniker is growing in popularity.
This book primarily focuses on serverless compute systems; that is, systems that execute user-defined software, rather than performing a fixed-function system like storage, indexing, or message queuing. (Serverless storage systems exist as well, but they aren’t the primary focus of this book!) With that said, the line between fixed-function storage and general-purpose compute is never as sharp and clear as theory would like—for example, database systems that support the SQL query syntax combine storage, indexing, and the execution of declarative query programs written in SQL. While the architecture of fixed-function systems can be fascinating and important to understand for performance tuning, this book primarily focuses on serverless compute because it’s the interface with the most degrees of freedom for application authors, and the system that they are most likely to interact with day-to-day.
If you’re still not quite sure what serverless is, don’t worry. Given the number of different products on the market, it’s clear that most people are in the same boat. We’ll chart the evolution of the “serverless” term in “Background” of the Preface and then lay out a precise definition in Chapter 1.
Who Is This Book For?
The primary audience for this book is software engineers and technologists who are either unfamiliar with serverless or are looking to deepen their understanding of the principles and best practices associated with serverless architecture.
New practitioners who want to immediately dive into writing serverless applications can start in Chapter 2, though I’d recommend Chapter 1 for additional orientation on what’s going on and why serverless matters. Chapter 3 provides additional practical material to develop a deeper understanding of the architecture of the Knative platform used in the examples.
The order of the chapters should be natural for readers who are familiar with serverless. Chapters 5 and 6 provide a checklist of standard patterns for applying serverless, while Chapter 8 and onward provides a sort of “bingo card” of serverless warning signs and solution sketches that may be handy on a day-to-day basis. Chapter 11’s historical context also provides a map of previous technology communities to examine for patterns and solutions.
For readers who are more interested in capturing the big-picture ideas of serverless, Chapters 1, 4, and 7 have some interesting gems to inspire deeper understanding and new ideas. Chapter 11’s historical context and future predictions may also be of interest in understanding the arc of software systems that led to the current implementations of scale-out serverless offerings.
For readers who are new not only to serverless computing, but also to backend or cloud native development, the remainder of this preface will provide some background material to help set the stage. Like much of software engineering, these areas move quickly, so the definitions I provide here may have changed somewhat by the time you read this book. When in doubt, these keywords and descriptions may save some time when searching for equivalent services in your environment of choice.
About the Author
Evan Anderson is a founding member of the Knative project and has served on the technical oversight committee, trademark commitee, and in several working groups. He also worked at Google on Compute Engine, App Engine, Cloud Functions, and Cloud Run, as well as in the SRE organization. He’s currently a principal engineer at Stacklok.









