==============
Distributed systems enable multiple machines to work together as a single cohesive system, providing scalability, reliability, and availability across networks. Understanding distributed architectures, communication models, synchronization, fault tolerance, consistency, and replication is essential for engineers preparing for system design, backend engineering, and distributed systems interviews.
Distributed Systems Fundamentals
1. 분산 시스템이란?
A distributed system is a collection of multiple interconnected computers or nodes that work together to achieve a common goal. In a distributed system, these nodes communicate and coordinate with each other through a network, typically sharing resources and collaborating on tasks.
2. 분산 시스템을 구축할 때의 주요 과제는?
Some key challenges in building distributed systems include:
- 동시성 관리: 여러 노드에 걸친 동시 작업을 조정하면서 일관성을 보장하고 경쟁 상태(race condition)를 방지합니다.
- 일관성와 복제: 장애, 복제, eventual consistency 요구 사항이 있을 때 데이터 일관성을 유지합니다.
- 결함 허용(Fault Tolerance): 노드 실패, 네트워크 파티션 등 다양한 오류에 대비해 시스템이 정상 동작하도록 설계합니다. 보통 중복, 복제, 오류 탐지 메커니즘을 사용합니다.
- 확장성(Scalability): 시스템이 워크로드와 사용자 수 증가에 따라 성능 저하 없이 수평으로 확장될 수 있도록 합니다.
3. 분산 시스템과 탈중앙화 시스템의 차이점은?
Distributed System
- 여러 노드가 네트워크를 통해 연결되어 하나의 목표를 달성하기 위해 협력합니다.
- 자원을 공유하고, 동작을 조정하며, 통합된 서비스나 기능을 제공합니다.
Decentralized System
- 분산 시스템의 하위 개념으로, 단일 제어 지점이나 권한이 존재하지 않습니다.
- 제어가 여러 노드에 분산되어 있으며, 종종 피어‑투‑피어 방식으로 독립적으로 동작합니다.
4. Horizontal Scaling과 Vertical Scaling의 차이는?
- Horizontal Scaling(수평 확장): 스케일 아웃이라고도 하며, 더 많은 서버나 머신을 추가해 작업 부하를 여러 개별 유닛에 분산시키는 방식입니다.
- Vertical Scaling(수직 확장): 스케일 업이라고도 하며, 단일 하드웨어 혹은 소프트웨어 컴포넌트의 용량·성능을 증대시켜 확장하는 방식입니다.

5. 결함 허용(Fault Tolerance)이란? 어떻게 구현하나요?
Fault tolerance은 일부 구성 요소가 실패해도 시스템이 정상적으로 동작하도록 하는 능력입니다. 보통 다중 복제, 재시도, 오류 복구 및 탐지와 같은 기법을 활용합니다.
6. 분산 해시 테이블(DHT)이란?
A distributed hash table is a decentralized system that uses a linked look‑up service like a hash table. It offers a mechanism of data indexing by which keys are mapped with values and the distribution of storage and retrieval operations is spread over multiple nodes of a network.
7. 로드 밸런서의 역할은?
A load balancer distributes the incoming network traffic over multiple servers, avoiding a server failure that could cause website unavailability and some reliability issues.
8. 샤딩(Sharding)은 무엇이며, 분산 데이터베이스에 어떻게 도움이 되나요?
Splitting scheme applies while splitting the data into several servers or nodes of the distributed database. It embraces the parallel processing of multiple machines which reduces the workload through the nodes.
9. 분산 캐시가 시스템 성능을 개선하는 역할은?
The distributed caching practice consists of keeping in memory the most accessed data close to the different nodes in the system. It results in better system responsiveness by making reoccurred data available from the memory without the need to access a slower storage system like the database or thereby.
10. 메시지 큐란? 분산 시스템에서 어떻게 사용되나요?
A Message Queue is a form of communication and data transfer mechanism used in system design and distributed systems. It functions as a temporary storage and routing system for messages exchanged between different components, applications, or systems within a larger software architecture.
11. eventual message delivery 개념을 설명해주세요.
Eventual message delivery ensures that messages sent between nodes in a distributed system will eventually be delivered, even if there are temporary failures or network partitions. Unlike guaranteed message delivery, which ensures immediate delivery or notification of failure, eventual message delivery prioritizes system availability and scalability over immediate consistency.
12. 가십 프로토콜(Gossip Protocol)이란?
Gossip protocols are decentralized communication algorithms used in distributed systems for peer-to-peer communication and information dissemination. Nodes in the system randomly select a small set of peers to share information with, spreading messages throughout the network like gossip in a social network.
13. 클라우드 환경에서 분산 시스템을 배포·운영할 때 흔히 겪는 어려움은?
The list of challenges can be very extensive and encompasses many of them: safeguarding a cloud infrastructure and complying with the regulatory standards; managing elasticity and scalability efficiently; resolving issues with network delay and stability; and last but not least, integrating with other cloud‑native services and infrastructure.
14. ACID 특성은 무엇이며, 분산 시스템에 어떻게 적용되나요?
ACID is a group of properties called atomicity, consistency, isolation, and durability (ACID), which provides the assurance of database consistency. The ACID properties in distributed systems may be harder to support if network latency and/or partition tolerance arise, which make those systems non‑fault‑tolerant.

15. 분산 트랜잭션과 로컬 트랜잭션의 차이는?
- Local Transaction: Operations confined to a single database or resource, managed by a single transaction manager within one node.
- Distributed Transaction: Involves multiple databases or resources across different nodes, requiring coordination between multiple transaction managers for consistency across the distributed system.
(Reference)
16. 분산 시스템에서 흔히 쓰이는 동시성 제어 메커니즘은?
Some common concurrency control mechanisms in distributed systems include:
- Locking: Control access to shared resources by acquiring locks.
- Timestamp Ordering: Order transactions based on timestamps to maintain consistency.
- Two‑Phase Locking (2PL): Acquire locks in two phases to ensure serializability.
- Multi‑Version Concurrency Control (MVCC): Allow concurrent access to multiple data versions.
- Distributed Snapshot Isolation (DSI): Provide consistent snapshots of the database for transactions.
17. 분산 합의(Distributed Consensus)와 리더 선출(Leader Election)의 역할은?
- Distributed consensus is the process by which multiple nodes in a distributed system agree on a common value or decision, even when some nodes may fail. Consensus algorithms such as Paxos, Raft, and Zab are commonly used to achieve agreement and maintain consistency among nodes.
- Leader election plays an important role in many consensus algorithms. It is the process of selecting a leader among the participating nodes. The leader coordinates communication, makes or proposes decisions, and ensures that information is consistently replicated across other nodes. For example, Raft uses leader election to manage log replication and coordinate decisions among cluster members.
18. RPC와 RESTful 서비스의 차이는?
- RPC: By way of communication between distributed systems, the program operates remotely and is executed on the destination machine.
- RESTful services: a representational style of designing application networks that run on HTTP (through HTTP’s REST principles).
19. 네트워크 파티션을 어떻게 처리하나요?
Network partitions might be handled by different methods; among them are quorum.