Skip to main content

2 posts tagged with "architecture"

View All Tags

Geo-Distributed, Low-Latency Service Architecture

· 10 min read
Sanjoy Kumar Malik
Solution/Software Architect & Tech Evangelist
Geo-Distributed, Low-Latency Service Architecture

In the early stages of a product’s life, the world is small. Your users are likely concentrated in one region, and your stack lives in a single data center. But as a service scales, a fundamental physical reality begins to intrude upon the user experience: the speed of light.

When a user in Singapore attempts to access a service hosted in North Virginia, the packets must travel roughly 15,000 Kilometers. Even at the theoretical limit of light in a vacuum, the round-trip time (RTT) is approximately 100 milliseconds. In the messy reality of fiber optics and router hops, this often balloons to 200ms or 300ms. For a modern interactive application, this isn't just a delay; it is a structural barrier to engagement and retention.

Latency Becomes a First-Order Constraint

Every large system eventually encounters a moment when latency stops being an abstract metric and becomes a user-visible problem. Pages feel slow. Interactions feel unresponsive. Customers in distant geographies complain about “sluggishness.” At this point, latency is no longer a tuning problem. It is a structural constraint.

In early-stage systems, latency is often treated as an operational concern. Add caching. Optimize queries. Scale vertically. These tactics work until they don’t. Once users are distributed across continents, physical distance introduces an irreducible delay. No amount of local optimization can overcome the speed of light.

This is where many teams make a critical mistake: they treat “adding regions” as a deployment decision rather than an architectural one. They assume geo-distribution is primarily about spinning up infrastructure closer to users. In reality, geo-distribution reshapes how data is owned, how consistency is defined, how failures manifest, and how teams operate.

Distance introduces hidden costs: coordination latency, replication lag, partial failures, and operational complexity. These costs compound as systems grow. Geo-distribution is therefore not a best practice to be adopted early. It is an inflection point and a response to scale that forces explicit architectural trade-offs.

Data Duplication - Necessary Evil or Architectural Smell?

· 7 min read
Sanjoy Kumar Malik
Solution/Software Architect & Tech Evangelist
Data Duplication - Necessary Evil or Architectural Smell

Types of Data Duplication

Data duplication manifests in various forms, each tailored to specific needs in system design. Understanding these types helps architects decide when and how to employ them.

First, read-optimized copies. These are denormalized replicas designed for query efficiency. In relational databases, this might mean materializing views or using NoSQL stores like Cassandra for fast reads. For instance, in a social media app, user profiles are duplicated across edge caches to minimize database hits, ensuring sub-millisecond response times.

Next, cache-like projections. These are transient duplicates, such as Redis caches holding subsets of data from a primary store. They are not meant to be permanent but act as accelerators. In event-driven systems using Kafka, projections might create specialized views, like a user's feed aggregated from multiple sources, duplicated for quick access.

Finally, derived and aggregated data. This involves computing new data from originals, like summaries or roll-ups. In analytics platforms, tools like Apache Spark duplicate raw logs into aggregated tables for BI dashboards. Think of financial systems where transaction data is duplicated into ledgers for real-time reporting, derived from core accounting records.

Each type serves a purpose, but they all introduce redundancy. The art lies in choosing the right form without overcomplicating the ecosystem.

Benefits When Done Intentionally

When architects embrace data duplication thoughtfully, it yields significant advantages, transforming potential liabilities into strengths.