Distributed Systems Basics

August 2, 2025

2 min read

Distributed Systems

A distributed system is a type of computing where multiple independent computers work together to achieve a common goal. The systems share resources and tasks across the network, but to an end user they appear as one coherent system. These systems are always decentralized, highly scalable, and have better fault tolerance than monolithic systems. Distributed systems are used everywhere - from blockchain to cloud computing, and even in everyday microservice architectures.

•••

Dağıtık sistemler, birbirinden bağımsız bilgisayarların ortak bir hedef için birlikte çalıştığı yapılar. Bu makineler aslında farklı yerlerde olsalar da kaynakları ve işleri birbirleriyle paylaşıp tek bir sistem gibi hareket eder. Kullanıcı açısından bakıldığında her şey sanki tek bir sistem üzerinden çalışıyormuş gibi görünür. Ama arka planda merkezi bir yapı yerine, her biri kendi başına çalışan ama koordineli olan birimler vardır. Bu sayede dağıtık sistemler, klasik tek parça (monolithic) sistemlere göre çok daha esnek, dayanıklı ve kolay ölçeklenebilir. Bugün blokzincir teknolojilerinden bulut bilişime, mikroservis mimarisinden veri akış sistemlerine kadar pek çok alanda dağıtık sistemlere rastlamak mümkün.

Want to see an example? Check out the Kafka Basics post to see a distributed system in action.

Consistency

The first topic you should know is consistency. At a high level, consistency refers to all nodes in a distributed system having the same data. Let’s look at this through a quick example of a very simple system.

chain

Suppose you have a database set replicated across three different availability zones. When you write to the database in zone A, zones B and C also need to be updated to keep the data synchronized across all zones. There are different levels of consistency to ensure that data stays in sync. The most straightforward is strong consistency, which guarantees that any time you read from the database, you get the most up-to-date data.

On the opposite end, we have weak consistency, which means a node might eventually have the correct data - but there's no strict guarantee about when that will happen. Generally, the stronger the consistency level you want, the more you sacrifice availability and latency. In high traffic applications like social media, eventual consistency is usually preferred since immediate accuracy isn't critical. However, in applications where correctness is critical - like banking - strong consistency is required, since even a small delay or mismatch could be costly.

•••

Dağıtık sistemlerde karşınıza ilk çıkacak kavramlardan biri “tutarlılık” (consistency) olur. Kulağa biraz soyut gelebilir ama aslında mantığı basit: Sistemdeki tüm makinelerin aynı veriyi görmesi gerekir. Mesela diyelim ki bir veritabanınız üç farklı bölgede (örneğin İstanbul, Frankfurt, Singapur) çalışıyor. Siz İstanbul’daki sunucuya bir veri yazdığınızda, Frankfurt ve Singapur’daki sunucuların da bu veriyi güncellemesi gerekir. Aksi takdirde her bölge farklı verilerle çalışır ve işler karışır. İşte bu noktada farklı tutarlılık düzeyleri devreye giriyor. En sıkı olanı güçlü tutarlılık (strong consistency): Ne zaman veri okursanız okuyun, her zaman en güncel hali karşınıza çıkar.

Öte yanda zayıf tutarlılık (weak consistency) dediğimiz bir model var; burada sistem “veri bir gün doğru olacak” der ama o günün ne zaman geleceğini söylemez :) Bu modellerin seçimi, sistemin türüne göre değişir. Güçlü tutarlılık size her zaman doğru veriyi verir ama erişim süresi uzar, sistem biraz yavaşlar. Bu yüzden sosyal medya gibi “anlık tutarlılık çok da şart değil” denilebilecek yerlerde sonunda tutarlılık (eventual consistency) modeli kullanılır. Ama iş bankacılık gibi kritik sistemlere gelince, tutarlılık olmazsa olmaz. Çünkü orada birkaç saniyelik bir sapma bile büyük sorunlara yol açabilir.