Urgent.News

the world's headlines, one feed

Editions

Tech

Distributed Storage 101: How It Works and When You Actually Need It

Distributed storage isn't magic — it's a set of trade-offs. Here's how it actually works under the hood. Key Stats Metric Figure Orgs running distributed storage (mid-size+) ~68% Primary driver: HA/failure tolerance 74% Single-node disk failure recovery time 2–8 hours Teams that regretted distributing too early ~23% What Makes Storage "Distributed" Single-node: One process, one machine. If it…

Distributed storage is not magic; it involves trade-offs. It works by spreading data across multiple nodes, so individual failures don't cause data loss or downtime. The key advantages are availability, scalability, and geographic distribution.

Availability is achieved by handling hardware failures gracefully. For instance, if one disk crashes in a distributed system, the system automatically rebalances data and continues operating without downtime.

Scalability is another major advantage. While a single node can only handle a limited amount of data (around 500TB), adding more nodes allows distributed systems to scale to petabytes of data.

Geographic distribution enables compliance and low latency access for users in different regions. For example, a distributed storage system might have nodes in the US, Europe, and Asia to serve users in those locations efficiently.

Data placement in distributed systems is typically handled using consistent hashing. This technique hashes the object key to a position on a hash ring, where each node owns a range of the ring. Objects are stored on nodes whose range contains their hash. This approach minimizes the amount of data that needs to be moved when adding or removing nodes.

There are two main approaches to storing data in distributed systems: replication and erasure coding. Replication involves storing complete copies of data across different nodes. This is the simplest method but uses more storage space and is slower due to the need to write data to multiple locations. Erasure coding, on the other hand, splits data into fragments and computes parity information, allowing the system to tolerate failures with fewer storage overheads and faster write speeds.

Most production systems use a combination of both approaches, replicating hot data for fast access and erasure coding for cold data to save space. The consistency model also plays a crucial role in the trade-offs. Strong consistency (CP) ensures that every read returns the most recent write, at the cost of higher latency. Eventual consistency (AP), on the other hand, allows writes to be acknowledged immediately, even if reads might be briefly stale, leading to lower write latency and higher availability.

Most production systems are strong-consistent within a data center but eventual consistent across regions. The CAP theorem states that in the presence of a network partition, a system can only guarantee two out of the three properties: Consistency, Availability, and Partition tolerance. Most systems opt for CP or AP, but not all three simultaneously.

When considering distributed storage, it's important to weigh the benefits against the added complexity, costs, and potential for more problems to arise. Distributed storage is most beneficial when hitting a concrete wall, such as needing to store more than a single node can handle, or when downtime is unacceptable. Teams should typically start with a single-node deployment and only distribute when necessary.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.

Read the original at dev.to →

More in Tech

One Event-Loop Turn, One False Redis Capacity Error

This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry . Project Overview redis-py is the Python client for Redis.

  • Event loop race condition caused false Redis capacity error
  • Connection slot missing from in-use set and free queue
  • Fix ensures closed connections return to free queue immediately

Scheduling concurrency

Have been trying to look at 3 different languages: Go, Kotlin, Elixir/Erlang mostly to understand their concurrency models. This article concerns mostly about Go's preemptive scheduling.

  • Go 1.14 introduced signal-based non-cooperative preemption mechanism
  • SIGURG signal chosen for preemption due to specific criteria
  • Preemption eliminates need for checks, mirrors OS thread switching

🛻CSS Art: Smoothie Food Truck

This is a submission for Frontend Challenge - Comfort Food Edition, CSS Art . Inspiration 💠I was not sure I was going to enter this challenge at first, because I was not feeling inspired.