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...
Bought separately
$145
Minimum price
$49.00
$69.00
About the Bundle
About the Books
PostgreSQL has quietly become the default database for a generation of SaaS companies, fintechs, and data-driven products, but the gap between "I can create a table" and "I can run PostgreSQL in production with confidence" is enormous. This book closes that gap.
Written for developers who can already write SQL but have never tuned an autovacuum, set up streaming replication, or diagnosed a bad query plan at 2 AM, this is a hands-on, project-driven guide to PostgreSQL as it's actually used in production. You'll move through schema design, indexing strategy, query optimization, transactions and concurrency, JSONB, and the extension ecosystem (PostGIS, pgvector, pg_partman, and more), then apply everything you've learned to three full end-to-end builds: a multi-tenant SaaS schema with row-level security, an analytics warehouse handling 200 million events, and a real-time ingestion pipeline processing 50,000 events per second.
Every chapter is anchored to a realistic problem, not an abstract concept. You won't just learn what a GIN index is, you'll build one to solve an actual full-text search problem. You won't just read about replication lag, you'll set up a primary and standby and watch the numbers move. Along the way, you'll pick up the operational instincts that separate developers who use PostgreSQL from developers who can design, build, and run a PostgreSQL system with confidence: how to read an EXPLAIN plan like a detective, how to size a connection pool, how to sleep soundly knowing your backups actually restore.
By the final page, you'll have written thousands of lines of SQL, broken and repaired several databases on purpose, and built the kind of pattern recognition that usually takes years of production incidents to earn.
MySQL runs GitHub, WordPress, Shopify, and most of the internet's long tail — and it punishes defaults you never read. This book walks the gap between "works on my laptop" and "works at 3 a.m. under load," with working code and real tools in every chapter.
You will design schemas that survive growth using normalization, keys, and constraints (Chapters 1–3); write and review SQL that scales, using `EXPLAIN`, `EXPLAIN ANALYZE`, the optimizer trace, and the eight query shapes that cause incidents (Chapter 4); reason about transactions, isolation levels, gap locks, and deadlocks (Chapter 5); and understand what InnoDB actually does — clustered indexes, page splits, buffer pool, redo log, doublewrite buffer, purge thread (Chapter 6).
Then the operational half: indexing that earns its keep, including invisible indexes and plan-diffing scripts (Chapter 7); stored programs, triggers, and the Event Scheduler (Chapter 8); JSON indexing with a webhook worked example (Chapter 9); CTEs, window functions, and full-text search (Chapter 10); users, privileges, TLS, encryption, and audit logs (Chapter 11); backup families, Percona XtraBackup, point-in-time recovery, and verification (Chapter 12); replication, failover, and `CLONE INSTANCE` (Chapter 13); sharding, partitioning, and InnoDB Cluster (Chapter 14); observability with Prometheus, mysqld_exporter, and Grafana dashboards (Chapter 15); and expand-and-contract migrations with gh-ost, pt-online-schema-change, Skeema, and Flyway (Chapter 16).
Chapter 17 ties it together: a staged walkthrough of building a production-ready database, with server configuration, runbooks, and a failover procedure you can paste into a wiki. The `shopcast` sample application grows from 1,000 to 100 million orders, so every optimization has a reason.
MongoDB in Practice is a hands-on engineering guide to designing, building, and operating MongoDB applications that survive contact with real users. Written for backend developers, data engineers, and technical leads who already know a little MongoDB and want to use it well, the book walks from the document model through schema design, the aggregation framework, indexing, replication, and sharding, all the way to observability, security, and disaster recovery.
Each chapter is built around three commitments: explain the mechanism (what the database actually does and why), show the code (real, runnable MongoDB Shell, Node.js, and Python examples you can adapt directly), and highlight the pitfalls (the patterns that look correct in isolation but cause serious pain in production). You'll learn how to decide between embedding and referencing data, how to design compound indexes using the ESR principle, how to build aggregation pipelines that read execution plans instead of guessing, and how to reason about atomicity, transactions, and consistency without breaking your application under load.
By the end, you'll have a clear mental model of how MongoDB stores data, how to design for it, and how to keep it running when the load spikes at 3 a.m.
CouchDB in Practice is an end-to-end operations guide for engineers who need to run Apache CouchDB in production rather than demo it. It starts with the architecture — the Erlang/BEAM runtime, the separate query-server process, node and cluster modes — then moves through the document model (revision trees, deterministic winner, `_conflicts`) and the HTTP/JSON API with complete CRUD transcripts you can run with `curl` and `jq`.
The middle chapters cover the parts teams most often get wrong: Mango selectors and index design with `_explain` for debugging, map/reduce views and key shaping for range queries, validation functions for enforcing invariants at the edge, attachments and their revision/backup implications, and the `_users`/admin/TLS security model with a hardened configuration reference.
The distributed core gets full treatment: the replication protocol and persistent replication, cluster topology, shard arithmetic, quorum settings, adding and removing nodes, moving shards, zones, and capacity planning. Conflict resolution includes the winner algorithm, a complete resolution service, and synthetic conflict-generation tests. Day-two chapters cover backup strategies (replication, file-level, logical dumps) with a recovery drill, Docker and Kubernetes deployment with OS hardening, and monitoring via the Prometheus endpoint, `/_stats`, alert rules, and a symptom-to-cause troubleshooting workflow.
Every chapter pairs explanation with runnable commands, failure-mode exercises, and a recap checklist. Three walkthroughs tie it together: an offline-tolerant field-data application, a multi-region replicated service, and a CI-backed integration-test environment. Appendices cover the CouchDB 3.5.3 security advisories and CVE details.
There is a vast gap between running the Apache Kafka quickstart and running Kafka in production. This book closes that gap.
Mastering Apache Kafka takes you from the original log abstraction invented at LinkedIn in 2010 all the way to designing, securing, tuning, and operating real-time streaming platforms at scale. Instead of stopping at toy examples, it gives you practical, production-grade guidance shaped by how the world’s leading engineering teams actually use Kafka.
Every chapter opens with a documented, real-world scenario from companies like Netflix, Uber, Airbnb, LinkedIn, Goldman Sachs, and Shopify. You see the problem they faced, why event streaming solved it, and how to apply the same thinking to your own systems. Every statistic is backed by its source and publication date, so you can trust what you read.
The book is fully current with the modern Kafka platform, including KRaft-based metadata, the next-generation consumer group protocol, share groups for queue-style workloads, and tiered storage, up to the Kafka 4.4.0 release.
Inside, you will learn how to:
Each chapter builds on the last toward a complete capstone project: a real-time order processing and fraud detection pipeline you assemble piece by piece.
Written for software engineers, data engineers, and solution architects, this is the guide for anyone ready to move from beginner to production-ready Kafka expertise.
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.