Chapter 1: The Speed
of-Light Tax--The first time I watched a user in Jakarta wait eight hundred milliseconds for a product page to load, I realized something uncomfortable: my beautiful, perfectly normalized database was useless to half the planet. The query took twelve milliseconds in my Virginia data center. But by the time those bytes traveled through fifteen undersea cables, bounced off three satellite relays, and fought through a mobile network that dropped every fourth packet, the user had already closed the tab. They didn't see my elegant schema. They saw a spinning wheel and a back button.
And then they bought from a competitor whose database was five hundred miles closer.This chapter is about that distance. Not the abstract, map-drawing kind of distance, but the physics-bound, light-speed-limited, packet-loss-magnified kind that turns milliseconds into seconds and seconds into lost revenue. If you have ever wondered why your application feels snappy in San Francisco but sluggish in Singapore, or why your users in São Paulo keep complaining about timeouts while your New York office reports perfect performance, the answer is not your code. The answer is the geography of data.We will start with the brutal physics of fiber optics. Then we will calculate exactly how much money latency is costing you, using a simple formula that cloud providers hope you never learn.
We will introduce the ninety-ten rule, which explains why most applications are perfect candidates for read-only replication. We will define what "freemium" actually means in this book, with two clear tiers that eliminate the confusion found in other guides. And finally, we will establish our success metrics: taking P95 read latency from over five hundred milliseconds to under fifty, measured with nothing but open-source tools and a little curiosity.By the end of this chapter, you will know, to the dollar, whether replication is worth your time. And for most of you, the answer will be a resounding yes.The Speed of Light Is Too Slow (And That's Not the Worst Part)Let us start with a fact that feels like a joke but is entirely real: the speed of light in fiber…
This is the end of the free sample. Get the Hardback to keep going. Buy now →























