Skip to content

Commit

Permalink
Add new post
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhyunwoo committed Jul 8, 2023
1 parent 83c0cb2 commit dd1a926
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions _posts/2023-07-08-sre-ch1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
layout: post
title: "[SRE] Ch02. The Production Environment at Google, from the Viewpoint of an SRE"
date: 2023-07-08
categories:
- Study
- Book
- SRE
tags: [
sre,
google,
devops,
study,
book,
reliable,
]
---
## Hardware

- ๊ตฌ๊ธ€์˜ ๋Œ€๋ถ€๋ถ„์˜ ์ปดํ“จํ„ฐ ์ž์›์€ ๊ตฌ๊ธ€์ด ์ „์› ๊ณต๊ธ‰, ๋ƒ‰๊ฐ ๊ธฐ๋Šฅ, ๋„คํŠธ์›Œํฌ ๋ฐ ์ปดํ“จํ„ฐ ํ•˜๋“œ์›จ์–ด ๋“ฑ์„ `๋ชจ๋‘ ์ง์ ‘ ๋””์ž์ธํ•œ ๋ฐ์ดํ„ฐ์„ผํ„ฐ`์— ์žˆ์Œ
- **Machine**
- ํ•˜๋“œ์›จ์–ด (or VM) ์„ ์˜๋ฏธ
- **Server**
- ์„œ๋น„์Šค๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์˜๋ฏธ

![image](https://github.com/hhhyunwoo/hhhyunwoo/assets/37402136/617541b0-caa6-4eb4-8874-253e09369cef)

- ๊ตฌ๊ธ€ ๋ฐ์ดํ„ฐ์„ผํ„ฐ์˜ Toplogy
- ์ˆ˜์‹ญ ๋Œ€์˜ ๋จธ์‹ ์ด ๋ž™์— ์žฅ์ฐฉ๋˜์–ด์žˆ์Œ
- ๋ž™์€ ์ผ๋ ฌ๋กœ ๋Š˜์–ด์„œ ์žˆ์Œ
- ํ•˜๋‚˜ ๋˜๋Š” ์—ฌ๋Ÿฌ ๋ž™์ด ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๊ตฌ์„ฑ
- ๋ฐ์ดํ„ฐ ์„ผํ„ฐ ์„ ๋ฌผ ๋‚ด์—๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ ํด๋Ÿฌ์Šคํ„ฐ๊ฐ€ ์žˆ์Œ
- ๊ทผ๊ฑฐ๋ฆฌ์˜ ์—ฌ๋Ÿฌ DC ๊ฑด๋ฌผ์ด ๋ชจ์—ฌ ์บ ํผ์Šค๋ฅผ ์ด๋ฃธ

## Hardware๋ฅผ ์กฐ์œจํ•˜๋Š” ์‹œ์Šคํ…œ ์†Œํ”„ํŠธ์›จ์–ด

### ๋จธ์‹  ๊ด€๋ฆฌํ•˜๊ธฐ

![image](https://github.com/hhhyunwoo/hhhyunwoo/assets/37402136/e9c6b532-b6dd-4809-807b-a00244bb0cfd)

- **Borg**
- `Large-scale cluster management at Google with Borg`
- https://research.google/pubs/pub43438/
- Kubernetes์˜ ์ „์‹ 
- Apache Mesos์™€ ์œ ์‚ฌํ•œ ๋ถ„์‚ฐ ํด๋Ÿฌ์Šคํ„ฐ ์šด์˜ ์‹œ์Šคํ…œ
- ํ•ด๋‹น ์‹œ์Šคํ…œ์„ ์ด์šฉํ•ด์„œ ๋จธ์‹ ์„ ๊ด€๋ฆฌํ•จ
- BNS (Borg Naming Service), ๋ฆฌ์†Œ์Šค ํ• ๋‹น ๋“ฑ๋“ฑ..

### Storage

![image](https://github.com/hhhyunwoo/hhhyunwoo/assets/37402136/f74e2ff1-d090-4a73-acf1-4bf221f4711e)

1. ๊ฐ€์žฅ ๋‚ฎ์€ `D ๊ณ„์ธต`์€ ํด๋Ÿฌ์Šคํ„ฐ ๋‚ด์˜ ๊ฑฐ์˜ ๋ชจ๋“  ๋จธ์‹ ์ด ์‹คํ–‰ํ•˜๋Š” ํŒŒ์ผ ์„œ๋ฒ„.
2. D ๊ณ„์ธต ์œ„์˜ `Colossus` ๋Š” **GFS**(Google File System)์˜ ํ›„์† ์ œํ’ˆ์œผ๋กœ์„œ ์ „ํ†ต์ ์ธ ํŒŒ์ผ ์‹œ์Šคํ…œ์ฒ˜๋  ๋™์ž‘ํ•˜๋ฉฐ ๋ณต์ œ์™€ ์•”ํ˜ธํ™”๊นŒ์ง€ ์ง€์›
3. DB์™€ ์œ ์‚ฌํ•œ ์„œ๋น„์Šค๋“ค
1. **Bigtable** : ํŽ˜ํƒ€๋ฐ”์ดํŠธ ํฌ๊ธฐ์˜ DB๋ฅผ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” NoSQL. ๋ฐ์ดํ„ฐ๊ฐ€ ๋ถ„์‚ฐ๋˜์–ด ์˜๊ตฌ์ ์œผ๋กœ ์ €์žฅ๋จ. Eventually Consistent ํ•œ DB
2. **Spanner** : ์‹ค์‹œ๊ฐ„ ์ผ๊ด€์„ฑ์ด ์žˆ์–ด์•ผ ํ•˜๋Š” ๊ณณ์— SQL ์ธํ„ฐํŽ˜์ด์Šค ์ œ๊ณต
3. **Blobstore** : ๋Œ€๋Ÿ‰์˜ ๋น„์ •ํ˜• ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Œ

### Networking

- `Bandwidth Enforcer` (BwE)
- ๊ฐ€์šฉ ๋Œ€์—ญํญ์„ ๊ด€๋ฆฌํ•ด์„œ ํ‰๊ท  ๊ฐ€์šฉ ๋Œ€์—ญํญ์„ ๊ทน๋Œ€ํ™” ํ•จ
- `GSLB` (Global Software Load Balancer)
- DNS ์š”์ฒญ์— ๋Œ€ํ•œ ์ง€์—ญ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ ์ˆ˜ํ–‰
- ์‚ฌ์šฉ์ž ์„œ๋น„์Šค ์ˆ˜์ค€์—์„œ์˜ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ ์ˆ˜ํ–‰
- RPC ์ˆ˜์ค€์—์„œ์˜ ๋กœ๋“œ๋ฐธ๋Ÿฐ์‹ฑ

## ๊ธฐํƒ€ ์‹œ์Šคํ…œ ์†Œํ”„ํŠธ์›จ์–ด

### ์ž ๊ธˆ ์„œ๋น„์Šค

- **Chubby**
- ๋ถ„์‚ฐ Lock ์‹œ์Šคํ…œ์œผ๋กœ ๋ถ„์‚ฐ๋œ ์„œ๋ฒ„๋“ค ์‚ฌ์ด์—์„œ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์ž์› ๊ณต์œ  ๋ฌธ์ œ ํ•ด๊ฒฐ
- Paxos ํ”„๋กœํ† ์ฝœ ์‚ฌ์šฉ
- Consensus Algorithm
- RAFT

### ๋ชจ๋‹ˆํ„ฐ๋ง๊ณผ ์•Œ๋ฆผ

- **Borgmon**
- `๋ชจ๋‹ˆํ„ฐ๋ง`ํ•˜๋Š” ์„œ๋ฒ„๋“ค๋กœ๋ถ€ํ„ฐ ๋‹ค์–‘ํ•œ ์ง€ํ‘œ๋“ค์„ ์ˆ˜์ง‘

## ์†Œํ”„ํŠธ์›จ์–ด ์ธํ”„๋ผ์ŠคํŠธ๋Ÿญ์ณ

๊ตฌ๊ธ€์˜ ์†Œํ”„ํŠธ์›จ์–ด ์•„ํ‚คํ…์ฒ˜๋Š” ํ•˜๋“œ์›จ์–ด ์ธํ”„๋ผ๋ฅผ ์ตœ๋Œ€ํ•œ ํšจ๊ณผ์ ์œผ๋กœ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ๋””์ž์ธ๋จ.

- **Stubby**
- ๋‚ด๋ถ€ `RPC ํ†ต์‹ `์„ ์œ„ํ•ด ๋งŒ๋“  ์‹œ์Šคํ…œ
- ์˜คํ”ˆ ์†Œ์Šค๋กœ gRPC๋ฅผ ๋งŒ๋“ฌ
- RPC (Remote Procedure Call)
- RPC ๊ฐ„์˜ ๋ฐ์ดํ„ฐ ์ „์†ก์€ Protocl Buffers ๋ฅผ ์ด์šฉํ•จ.
- Protobufs ๋Š” Apache์˜ Thrift์™€ ์œ ์‚ฌ
- Protobufs ๋Š” XML ์„ ์ด์šฉํ•ด ๊ตฌ์กฐํ™”๋œ ๋ฐ์ดํ„ฐ๋ฅผ ์ง๋ ฌํ™”ํ•˜๋Š” ๋ฐฉ์‹์— ๋น„ํ•ด ๋” ๋งŽ์€ ์žฅ์ ์„ ์ œ๊ณต.
- ์‚ฌ์šฉํ•˜๊ธฐ ๋” ์‰ฝ๊ณ , ํฌ๊ธฐ๊ฐ€ 3~10๋ฐฐ ๋” ์ž‘๊ณ , 20~100๋ฐฐ ๋” ๋น ๋ฅด๊ณ  ๋ช…๋ฃŒํ•จ

## Reference

- https://sre.google/sre-book/table-of-contents/

0 comments on commit dd1a926

Please sign in to comment.