generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
layout: post | ||
title: "[etcd] [Docs Learning] etcd versus other key-value stores" | ||
date: 2023-06-26 | ||
categories: | ||
- etcd | ||
- docs | ||
tags: [ | ||
etcd, | ||
docs, | ||
learning, | ||
kv, | ||
api, | ||
keyvalue, | ||
] | ||
--- | ||
> [etcd ๊ณต์ Docs](https://etcd.io/docs/v3.5/learning/) ์ Learning ๋ฌธ์๋ฅผ ๋ณด๊ณ ๊ณต๋ถ ๋ฐ ํด์ํ ๋ด์ฉ์ ๊ธฐ๋กํฉ๋๋ค. | ||
> | ||
[Docs](https://etcd.io/docs/v3.5/learning/why/) | ||
|
||
**etcd** ๋ `/etc` + `distritubed system` ์์ ์ ๋ํ์ผ๋ฉฐ, configuration ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ธฐ ์ํด์ ๋ง๋ค์ด์ก๋๋ฐ ์ฌ๊ธฐ๋ค๊ฐ ๋ถ์ฐ์์คํ ์ ๋ํด์ etcd๊ฐ ๋์๋ค! | ||
|
||
**network partition ์ ์ ๋ ํ์ฉํ์ง ์์ผ๋ฉฐ, ๊ฐ์ฉ์ฑ์ ๊ธฐ๊บผ์ด ํฌ์ํจ** | ||
|
||
## Use cases | ||
|
||
- Container Linux by CoreOS | ||
- Locksmith ์์ etcd ๋ฅผ ์ฌ์ฉํด์ `๋ถ์ฐ ์ธ๋งํฌ`๋ฅผ ๊ตฌํํด์ ํด๋ฌ์คํฐ์ ํ์ ์งํฉ๋ง ๋ฆฌ๋ถ๋๋๋ก ํจ | ||
- Kuberentes ์์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ธฐ ์ํด ์ฌ์ฉ๋จ | ||
|
||
## Comparison chart | ||
|
||
<img width="1624" alt="image" src="https://github.com/hhhyunwoo/hhhyunwoo/assets/37402136/a8909558-e45b-410f-81e1-e0bb97a5db97"> | ||
|
||
### ZooKeeper | ||
|
||
- `distributed system coordination` and `metadata storage` ๋ฅผ ํด๊ฒฐ | ||
- etcd๊ฐ **zookeeper** ์์ ๊ตฌํ๋ ์ข์ ์ ๋ค์ ๋ง์ด ์ฌ์ฉํจ | ||
- `์์ฒด RPC ํ๋กํ ์ฝ`์ ์ฌ์ฉํ๋๋ฐ, ์ธ์ด ๋ฑ๋ฑ **๋ถํธํ ๋ถ๋ถ**์ด ๋ง์ | ||
- zookeeper ๊ณ ๋ คํ๋ ์ฌ๋๋ค! **etcd ์จ๋ผ** | ||
|
||
### Consul | ||
|
||
- **Service Discovery**๋? | ||
- MSA ํ๊ฒฝ์์ ์๋น์ค ๊ฐ ํธ์ถ์ด ์ฆ์. ๊ทผ๋ฐ ํด๋ผ์ฐ๋ ํ๊ฒฝ์์๋ ์ปจํ ์ด๋ ๊ธฐ๋ฐ์ด๊ธฐ ๋๋ฌธ์ ์๋น์ค์ IP๊ฐ ๋์ ์ผ๋ก ๋ณ๊ฒฝ๋๋ ์ผ์ด ๋ง๋ค. | ||
- ์ด๋ ์๋น์ค ํด๋ผ์ด์ธํธ๊ฐ ์๋น์ค๋ฅผ ํธ์ถํ ๋ ์๋น์ค์ ์์น (์ฆ, IP์ฃผ์์ ํฌํธ) ๋ฅผ ์์๋ผ ์ ์๋ ๊ธฐ๋ฅ์ด ํ์ํ๋ฐ, ์ด๊ฒ์ด `Service Discovery` ์. | ||
- e2e service discovery framework | ||
- consul 1.0 ์์ scale out ์ด ์๋จ | ||
- **etcd ์๋ ๋ค๋ฅธ ๋ฌธ์ ๋ฅผ ํธ๋ ํ๋ซํผ์ธ๋ฐ, e2e cluseter service discovery ๋ฅผ ์ฐพ๋๋ค๋ฉด consul ๋ ๊ด์ฐฎ์ ์ ํ!** | ||
|
||
### NewSQL (Cloud Spanner, CockroachDB, TiDB) | ||
|
||
- data center ๋ผ๋ฆฌ์ horizontally scale out ์ ์๋ํ DB ๋ค | ||
- ๋ช GB ์ด์์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ๊ฑฐ๋, full SQL ์ฟผ๋ฆฌ๊ฐ ํ์ํ๋ฉด NewSQL ์จ๋ผ | ||
|
||
## Using etcd for metadata | ||
|
||
์์ฉํ๋ก๊ทธ๋จ์ด ํ๋ก์ธ์ค๋ฅผ ์กฐ์ ํ๋ ๊ฒ๊ณผ ๊ฐ์ด ๋ฉํ๋ฐ์ดํฐ ๋๋ ๋ฉํ๋ฐ์ดํฐ ์์๋ฅผ ์ฃผ๋ก ๊ณ ๋ คํ๋ ๊ฒฝ์ฐ ๋ฑ์ ์ ํ. | ||
|
||
์ ํ๋ฆฌ์ผ์ด์ ์ ์ฌ๋ฌ ๋ฐ์ดํฐ ์ผํฐ์ ๊ฑธ์ณ ๋๊ท๋ชจ ๋ฐ์ดํฐ ์ ์ฅ์๊ฐ ํ์ํ๊ณ ๊ฐ๋ ฅํ ๊ธ๋ก๋ฒ ์ฃผ๋ฌธ ์์ฑ์ ํฌ๊ฒ ์์กดํ์ง ์๋ ๊ฒฝ์ฐ `NewSQL ๋ฐ์ดํฐ๋ฒ ์ด์ค`๋ฅผ ์ ํ | ||
|
||
## Using etcd for distributed coordination | ||
|
||
์ด๋ก ์ ์ผ๋ก, ๊ฐ๋ ฅํ ์ผ๊ด์ฑ์ ์ ๊ณตํ๋ ๋ชจ๋ ์คํ ๋ฆฌ์ง ์์คํ ์์ ์ด๋ฌํ ๊ธฐ๋ณธ ์์๋ฅผ ๊ตฌ์ถํ ์ ์์ง๋ง, ์๊ณ ๋ฆฌ์ฆ์ ์กฐ๊ธ ๋ฏธ๋ฌํ๋ค. ์๋ํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ด๋ Lock ์๊ณ ๋ฆฌ์ฆ์ ๊ฐ๋ฐํ๋ ๊ฒ์ ์ฝ์ง๋ง ๊ฐ์์ค๋ฝ๊ฒ ์ค๋จ๋ ์ ์์. | ||
|
||
๊ฒ๋ค๊ฐ, ํธ๋์ญ์ ๋ฉ๋ชจ๋ฆฌ์ ๊ฐ์ etcd์ ์ํด ์ง์๋๋ ๋ค๋ฅธ ๊ธฐ๋ณธ ์์๋ค์ etcd์ MVCC ๋ฐ์ดํฐ ๋ชจ๋ธ์ ์์กดํ๋ค. ์ฆ, ๋จ์ํ ๊ฐํ ์ผ๊ด์ฑ์ผ๋ก๋ ์ถฉ๋ถํ์ง ์์ | ||
|
||
`Distributed Coordination` ์ ๊ฒฝ์ฐ etcd๋ฅผ ์ ํํ๋ฉด ์ด์์์ ๋ฌธ์ ๋ฅผ ์๋ฐฉํ๊ณ ์์ง๋์ด๋ง ์์ ์ ์ ์ฝํ ์ ์์! |