Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Gizzard Quick Intro (Korean)
Search
Hyunseok Hwang
August 02, 2012
Technology
2
120
Gizzard Quick Intro (Korean)
Quick introduction for Gizzard which is a data store middleware from Twitter (Korean ver.)
Hyunseok Hwang
August 02, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
急成長する企業で作った、エンジニアが輝ける制度/ 20250227 Rinto Ikenoue
shift_evolve
0
140
2/18 Making Security Scale: メルカリが考えるセキュリティ戦略 - Coincheck x LayerX x Mercari
jsonf
0
220
php-conference-nagoya-2025
fuwasegu
0
150
Autonomous Database Serverless 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
17
45k
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
11k
4th place solution Eedi - Mining Misconceptions in Mathematics
rist
0
150
Amazon Q Developerの無料利用枠を使い倒してHello worldを表示させよう!
nrinetcom
PRO
2
120
クラウド食堂とは?
hiyanger
0
120
LINE NEWSにおけるバックエンド開発
lycorptech_jp
PRO
0
270
クラウド関連のインシデントケースを収集して見えてきたもの
lhazy
8
1.2k
スキルだけでは満たせない、 “組織全体に”なじむオンボーディング/Onboarding that fits “throughout the organization” and cannot be satisfied by skills alone
bitkey
0
190
MIMEと文字コードの闇
hirachan
2
1.4k
Featured
See All Featured
Docker and Python
trallard
44
3.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Six Lessons from altMBA
skipperchong
27
3.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
The World Runs on Bad Software
bkeepers
PRO
67
11k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
430
Navigating Team Friction
lara
183
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Building Your Own Lightsaber
phodgson
104
6.2k
Transcript
Gizzard Quick Intro 황현석
[email protected]
목차 •Gizzard? •DB Scaling 주요 방법 소개 •왜 Gizzard를 만들었나?
•Gizzard의 특징 •Gizzard 사용하기 •Gizzard use case
Gizzard A library for creating distributed Data Store (a.k.a Data
Store sharding middleware)
DB Scaling 주요 방법 •Replication •Partitioning •Sharding
Replication •동일한 데이터를 중복하여 저장 •목적 •데이터 안정성 (reliability) •가용성
(availability) •Fail over, Fault tolerance •LB: Read/Write Off-loading •Backup
Partitioning •DB 데이터를 쪼개어 저장 •유형 •Horizontal : row 단위
•Vertical : table 단위 •목적 •성능 (performance) •가용성 (availability)
Sharding •여러 개의 노드에 걸쳐 Horizontal Partitioning •일반적으로 Replication을 수반함
•Shared-Nothing + Aggregation Cost •Shard Key is Key! •목적 •성능 - 인덱스 크기와 밀접한 관련 •가용성
왜 Gizzard를 만들었나? by Twitter •애플리케이션에서 Sharding을 구현하는 것은 정말
어렵고 골치아픈 문제 •3rd Party Open Source Framework은 Web 특화적인 문제에 알맞지 않음
Gizzard의 특징
Middleware •웹 앱과 저장소 사이에서 네트워킹 서비스를 제공 •여러 개의
Gizzard를 띄워 TCP 커넥션 갯수 제한을 늘릴 수 있음 •Scala로 구현됨 (w/ JVM)
다양한 Back-end Data Store 지원 •네크워킹이 가능한 저장소라면 무엇이든 지원
•예. RDB(MySQL등), Lucene, Redis, ... •의도한 순서대로 저장하는 것을 보장 안함 •저장 순서가 중요한 앱에서는 사용 못함
Forwarding Table을 통한 Partitioning •Fowarding Table에 특정 Shard의 id 범위를
맵핑 : Range 기반 •사용자 정의 해싱 함수로 균형도 조정 : Fun(id) •Custom Consistent Hashing도 지원되지만 추천 안함
Replication Tree •Logical Shard •데이터의 논리적인 범위를 묶어주는 branch node
•write/read 확산 규칙을 포함 •다양한 전략 구사 가능 (Write-Only, Read-Only, Replicate 등) •Custom 전략도 가능
Fault-tolerant •No Single Point Of Failure •특정 Replica 가 죽어도
나머지 정상 Replica로 장애없이 서비스 •Replica가 살아나면 버퍼링된 데이터로 비동기 쓰기 시도 -> 일종의 저널링 시스템 사용 •특정 Shard의 모든 Replica가 죽어도 다른 Shard에는 영향 없음 •비동기 복구 전략 때문에 쓰기 트랜잭션은 순서와 무관 하게 수행 될 수 있어야 함
Migration •로드 분산을 위한 노드 추가 시 마이그레이션 지원 •마이그레이션이
완료될 때 까지 •쓰기 : WriteOnly, Datastore A •읽기 : Datastore A
쓰기 충돌 해결 •동일 레코드를 변경하려는 연산이 동시에 요청되었을 때
발생 •쓰기 연산이 순서에는 무관해야 •각 쓰기 연산이 독립적이고 멱등(idempotent) 하며 교환 가능하게 모델을 설계해야 함
Gizzard 사용하기 •서버 : Gizzard 기반의 분산 Key-Value Store 인
Rowz를 내려받아 커스터마이징 •클라이언트 : Thrift, Gizzmo, Custom Driver •https://github.com/twitter/gizzard/blob/ master/doc/using.md
Gizzard Use Case •T-bird •Distributed MySQL-backed DB by Twitter •https://github.com/twitter/haplocheirus
•Redis-backed storage engine for timelines by Twitter •https://github.com/twitter/flockdb •Distributed MySQL-backed Graph DB by Twitter
감사합니다. https://github.com/twitter/gizzard