The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Build RESTful APIs using PostgreSQL, sqlc, pgx, Docker, OpenAPI and Kubernetes
Getting a REST API running in Go is easy.
Building one that is structured well, handles concurrent requests correctly, manages database changes safely, can be tested, containerized, documented, and deployed is where things become interesting.
Building Production Web APIs with Go takes you through that journey step by step.
You begin with a tiny HTTP server and gradually develop it into a complete library API backed by PostgreSQL. Rather than presenting a finished architecture and asking you to copy it, the book introduces problems as the application grows, then shows how to solve them. You see not only what the final code looks like, but why the design changes are necessary.
Along the way, you will learn how to:
net/http, and ChiThe example application is deliberately realistic. A seemingly simple operation—allowing a user to borrow a book—eventually exposes concurrency problems and leads naturally to transactions, PostgreSQL row-level locking, and database constraints. The emphasis throughout is on understanding the engineering decisions behind the code rather than simply copying recipes.
This book is for developers who already know the basics of Go and SQL and want to learn how the pieces of a real backend application fit together.
It is not a beginner’s introduction to the Go language, nor is it a comprehensive reference to PostgreSQL, Docker, or Kubernetes. Instead, it concentrates on the practical decisions involved in taking a small Go application toward a production-oriented architecture.
If you can write basic Go programs and understand simple SQL queries, this book will help you make the transition from “I can build an API” to “I understand how to engineer a backend.”
Interested in this book? Show your support by saying what you'd like to pay for it!
About the Book
Building one that is well structured, handles concurrent requests correctly, manages database changes safely, and can be tested, containerized, documented, and deployed is where things get interesting.
Building Production Web APIs with Go takes you through that journey step by step.
You start with a tiny HTTP server and grow it into a complete library API backed by PostgreSQL. Rather than presenting a finished architecture and asking you to copy it, the book introduces problems as the application grows and then shows how to solve them. You see not only what the final code looks like, but why each design change is necessary.
The example is deliberately realistic. A seemingly simple feature, letting a user borrow a book, eventually exposes a concurrency problem. Solving it leads naturally to transactions, PostgreSQL row-level locking, and database constraints.
WHAT YOU'LL LEARN
Developers who already know the basics of Go and SQL and want to see how the pieces of a real backend application fit together. If you can write basic Go programs and understand simple SQL queries, this book will help you move from "I can build an API" to "I understand how to engineer a backend."
This is not a beginner's introduction to the Go language, and it is not a comprehensive reference to PostgreSQL, Docker, or Kubernetes. It concentrates on the practical decisions involved in taking a small Go application toward a production-oriented architecture.
About the Author
Iede Snoek is a senior backend architect and software developer with more than 30 years of experience building production systems. He has worked extensively with C#, Python, Go, PostgreSQL, Azure, Docker, Kubernetes, and backend API architecture.
He writes about software development and architecture at CodeNomad.nl and develops open-source libraries for .NET and Rust. His particular interest is in the reasoning behind good software design: not simply how to make code work, but how to make systems maintainable, reliable, and understandable.
Iede has a Master's degree in Musicology from Utrecht University and also studied computer science subjects including parallel programming, formal methods, and architecture. Building Production Web APIs with Go combines his interest in teaching with three decades of practical backend development experience.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.