Giter Site home page Giter Site logo

yeonwoosung / devopsmisc Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 1.99 MB

Miscellaneous codes and writings for DevOps

JavaScript 1.10% Shell 0.23% Python 5.58% Jupyter Notebook 92.04% Dockerfile 0.11% HCL 0.20% Go 0.17% Java 0.30% PLpgSQL 0.11% Makefile 0.03% HTML 0.09% CSS 0.02%
devops devops-pipeline aws devop gcp infra nginx pyspark serverless spark

devopsmisc's Introduction

Yeonwoo Sung

Yeonwoo's GitHub stats

Skills

๐Ÿ“š Tech Stack ๐Ÿ“š

ย  ย  ย  ย 
ย  ย  ย  ย 

Kaggle

Kaggle Competition Expert

Education

BSc in University of St Andrews (2016 - 2020)

NVIDIA, Deep Learning NLP certificate (2019)

NVIDIA, Rapid Application Development with Large Language Models (2024)

Coursera - Machine Learning, Certification for โ€Machine Learningโ€ course (2018)

Awards

  • Deanโ€™s List for academic excellence in the academic year 2019/20
  • Medal for performance in Programming Projects module (2018)

devopsmisc's People

Contributors

dependabot[bot] avatar yeonwoosung avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

devopsmisc's Issues

๋ฆฌ๋ˆ…์Šค ๋กœ๊ทธ ๊ด€๋ฆฌ์— ๋Œ€ํ•˜์—ฌ

๋ฆฌ๋ˆ…์Šค ๋กœ๊ทธ - system log, rsyslogd, ์ €๋„(journal) ๋กœ๊ทธ, Logrotate, mongodb log rotate

๋ฐฑ์—”๋“œ๋‚˜ ์‹œ์Šคํ…œ ๊ฐœ๋ฐœ์ž๋ผ๋ฉด ๋กœ๊ทธ์˜ ์ค‘์š”์„ฑ์„ ๋„ˆ๋ฌด๋„ ์ž˜ ์•Œ ๊ฒƒ์ด๋‹ค.
๊ทธ๋Ÿฌ๋‚˜, ๋กœ๊น… ๊ทธ ์ž์ฒด๋„ ์ปดํ“จํŒ… ํŒŒ์›Œ๋ฅผ ๋งŽ์ด ์†Œ๋ชจํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋Œ€์šฉ๋Ÿ‰ ํŠธ๋ž˜ํ”ฝ ํ™˜๊ฒฝ์—์„œ๋Š” ํŠนํžˆ ์ตœ์ ํ™”๊ฐ€ ์ค‘์š”ํ•ด์ง€๊ฒŒ ๋œ๋‹ค.

syslog์™€ journald๊ฐ€ ํ•จ๊ป˜ ์ปค๋„ ๋กœ๊ทธ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํ˜„๋Œ€ ๋ฆฌ๋ˆ…์Šค ์ƒํƒœ๊ณ„์—์„œ ์ปค๋„ ๋กœ๊ทธ๋ฅผ ์ž˜ ๊ด€๋ฆฌํ•˜๋ฉด์„œ, ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋กœ๊ทธ ์—ญ์‹œ ์ž˜ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ๋งŽ์€ ๊ณ ์ฐฐ์ด ํ•„์š”ํ•œ ์š”์ฆ˜์ด๋‹ค.

Handling large amount of network traffic for Open Chat service (Line Tech Blog)

tech blog: LINE ์˜คํ”ˆ์ฑ— ์„œ๋ฒ„๊ฐ€ 100๋ฐฐ ๊ธ‰์ฆํ•˜๋Š” ํŠธ๋ž˜ํ”ฝ์„ ๋‹ค๋ฃจ๋Š” ๋ฐฉ๋ฒ•

  • ์˜คํ”ˆ ์ฑ„ํŒ… ์„œ๋น„์Šค์˜ ๊ฒฝ์šฐ, ์ „์ฒด ์ฑ„ํŒ…๋ฐฉ๋“ค ์ค‘ ์ผ๋ถ€ ์ฑ„ํŒ…๋ฐฉ์ด ๊ธ‰๊ฒฉํ•œ ํŠธ๋ž˜ํ”ฝ ์ฆ๊ฐ€๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ํ•ซ์ฑ— ํ˜„์ƒ์ด ์ผ์–ด๋‚  ์ˆ˜ ์žˆ์Œ
  • ์˜ˆ๋ฅผ ๋“ค๋ฉด, ๊ฒŒ์ž„ ์˜คํ”ˆ ์ฑ„ํŒ…๋ฐฉ์ด๋‚˜ ํŠน์ • ์ด๋ฒคํŠธ๋ฅผ ์œ„ํ•œ ์˜คํ”ˆ ์ฑ„ํŒ…๋ฐฉ ๋“ฑ์˜ ๊ฒฝ์šฐ ํ‰์†Œ์—๋Š” ์ •์ƒ์ ์ด๋‹ค๊ฐ€ ํŠน์ • ์ƒํ™ฉ(์ด๋ฒคํŠธ ์ƒํ™ฉ) ๋“ฑ์— ํŠธ๋ž˜ํ”ฝ์ด ํฌ๊ฒŒ ๋Š˜ ์ˆ˜ ์žˆ์Œ
  • ๊ฐ‘์ž๊ธฐ ํŠธ๋ž˜ํ”ฝ์ด ์ฆ๊ฐ€ํ•˜๊ฒŒ ๋˜๋ฉด DBMS์— ๋ถ€ํ•˜๊ฐ€ ๊ธ‰๊ฒฉํžˆ ์ฆ๊ฐ€ํ•  ์ˆ˜ ์žˆ์Œ

ํ•ด๊ฒฐ๋ฒ•:

  1. Redis ๋“ฑ์— ๊ฐ ์ฑ„ํŒ…๋ฐฉ์˜ ํŠธ๋ž˜ํ”ฝ ์–‘์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ธฐ๋กํ•˜๊ณ , ํŠน์ • ์‹œ๊ฐ„๋Œ€์— ์ผ์ • ์ˆ˜์ค€ ์ด์ƒ์˜ ํŠธ๋ž˜ํ”ฝ์ด ๋ชฐ๋ฆฌ๊ฒŒ ๋˜๋ฉด ํ•ด๋‹น ์ฑ„ํŒ…๋ฐฉ์— ๋Œ€ํ•ด์„œ๋Š” ํ‘ธ์‹œ ์•Œ๋ฆผ ๋“ฑ์˜ ์š”์ฒญ์„ block ์‹œํ‚ด (๊ฐ„๋‹จํ•œ ํ•ซ์ฑ— throttling ๋กœ์ง)

  2. ์กฐ์ธ throttling: kafka๋‚˜ redis, local cache๋ฅผ ์‚ฌ์šฉํ•ด์„œ ํŠธ๋ž˜ํ”ฝ ๊ธฐ๋ก ๋ฐ throttle ์ ์šฉ.

  • Kafka์˜ ๊ฒฝ์šฐ, ๋Œ€์šฉ๋Ÿ‰ ํŠธ๋ž˜ํ”ฝ์— ๋Œ€ํ•ด ์“ฐ๋กœํ‹€ ์ฒดํฌ ์‹œ์— ์•ฝ๊ฐ„์˜ ์ง€์—ฐ์ด ์žˆ์„ ์ˆ˜ ์žˆ๋Š”๋ฐ, ๊ทธ ์‚ฌ์ด์— DB์— ์ถฉ๋ถ„ํ•œ ๋ถ€ํ•˜๊ฐ€ ๊ฐ€ํ•ด์ ธ์„œ ์‹œ์Šคํ…œ์ด ๋” ์˜ค๋žœ ์‹œ๊ฐ„๋™์•ˆ ์†์ƒ๋  ์ˆ˜ ์žˆ์Œ
  • Redis์— ๊ธฐ๋กํ•  ๊ฒฝ์šฐ, ์ผ๋ถ€ ํ•ซ์ฑ—์„ ์œ„ํ•ด ํ‰์ƒ์‹œ์— ๋‹ค๋ฅธ ๋ชจ๋“  ์ˆ˜ ๋งŽ์€ ์ฑ„ํŒ…๋ฐฉ๋“ค์— ๋Œ€ํ•ด์„œ๋„ ๋ฐ์ดํ„ฐ๋ฅผ Redis์— ๊ธฐ๋กํ•˜๊ณ  ์ฒดํฌํ•˜๋Š” ํ†ต์‹  ์•Œ๊ณ ๋ฆฌ์ฆ˜์ด ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š”๋ฐ, ์ด๋Š” ๋น„ํšจ์œจ์ ์ž„
  • ์™ธ๋ถ€ ์„œ๋ฒ„์˜ Redis๊ฐ€ ์•„๋‹Œ ๋กœ์ปฌ ๋จธ์‹  ๋‚ด์˜ ์บ์‹œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ†ต์‹  ๋“ฑ์˜ ๋ถ€ํ•˜๋ฅผ ์ค„์ผ ์ˆ˜ ์žˆ์Œ
  1. ์„œํ‚ท ๋ธŒ๋ ˆ์ด์ปค์™€ ๋ฒŒํฌํ—ค๋“œ๋ฅผ ์ ์šฉํ•ด์„œ ํŠน์ • ์ƒค๋“œ์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ๋„ ์žฅ์• ๊ฐ€ ๋‹ค๋ฅธ ์ƒค๋“œ๋“ค๋กœ ์ „ํŒŒ๋˜๋Š” ์ƒํ™ฉ์„ ๋ฐฉ์ง€
  • ์„œํ‚ท ๋ธŒ๋ ˆ์ด์ปค๋Š” ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•œ ์ง€์ ์„ ๊ฐ์ง€ํ•˜๊ณ  ์‹คํŒจํ•˜๋Š” ์š”์ฒญ์„ ๊ณ„์†ํ•˜์ง€ ์•Š๋„๋ก ๋ฐฉ์ง€ํ•˜๋„๋ก ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•˜๋Š” ๋””์ž์ธ ํŒจํ„ด์ด๋‹ค

Performance visualization with flamegraphs

If you read Netflix's tech blog, you could easily find extremely useful articles that debugs the performance of the system with flamegraphs

ref1, ref2

It is definitely useful to learn how to use flamegraphs for performance debugging with various programming languages and frameworks

gRPC

gRPC๋Š” ๊ตฌ๊ธ€์—์„œ ๊ฐœ๋ฐœํ•œ API ํ†ต์‹  ๋ฐฉ๋ฒ•์œผ๋กœ, protobuf๋ผ๋Š” ๊ตฌ๊ธ€์˜ ์ธ์ฝ”๋”ฉ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ ํ™œ์šฉํ•ด ํšจ์œจ์ ์ธ ๋„คํŠธ์›Œํฌ ํ†ต์‹ ์„ ํ•˜๊ฒŒ ํ•˜๋ฉฐ, HTTP/2๋ฅผ ์‚ฌ์šฉํ•ด์„œ ํ†ต์‹ ์„ ์ง„ํ–‰ํ•œ๋‹ค.

AWS EC2 instance names explained

Amazon EC2 names explained

Instance families come in six different groups :

  • General Purpose
  • Compute
  • Memory
  • Accelerated
  • Storage
  • HPC

General Purpose

General purpose instances keep a balance between vCPU, memory, and network performance. Some instances add aditional capabilities to CPU (z) and network (n) and there are multiple CPU options for AMD (a), Intel (i), or graviton (g) chips.

The general purpose group includes: A, M, Mac, T

Compute Optimized

Compute optimized only includes the c type instance with different generations, capabilitities, and sizes. Almost every c instance has a 2:1 ration of memory to vCPU. If you use a medium instance with 1 vCPU it will have 2 GiB of memory. If you use a 32xlarge with 128 vCPUs it will have 256 GiB of memory.

These instances are ideal if your workloads need a lot of CPU power and not as much memory.

Memory Optimized

Memory optimized instances are for workloads that consume more memory than CPU. They have a memory to vCPU ratio ranging from 4:1 up to 32:1. An instance like r6i.xlarge has 4 vCPUs and 32 GiB of memory while an x2iedn.2xlarge has 256 GiB of memory with 8 vCPUs.

Memory optimized are some of the best instances for clusters like Kubernetes because many workloads are memory bound more than CPU bound. This will let you pack an instance with more workloads than types with lower memory to vCPU ratios.

Accelerated Computing

Accelerated computing is the most specialized of all of the groups. If you need specialized compute acceleration for your workloads you probably already know.

Most of these instance types have GPU accelerators or specialized machine learning chips. The only non-machine learning special accelerators are the f1 instances with field programmable gate arrays (FPGAs) and vt1 with Xilinx U30 media accelerator cards.

All of the types have a variety of local storage and high memory. The GPU typesโ€”g and pโ€”have multiple video cards options with varying sizes of GPU memory. Some instances have multiple accelerators but not all accelerators can be shared with workloads at the same time.

Itโ€™s more important to chose the appropriate size for these instances to optimize your usage and keep your costs low.

The accelerated computing group includes: DL, F, G, Inf, P, Trn

Storage Optimized

Storage optimized is exactly what you might thinkโ€”lots of throughput at low latency. All of these instances will have local storage of various sizes. For most of the instances the memory to vCPU ratio is either 4:1 or 8:1.

All that disk IO wouldnโ€™t be very useful without good network throughput and these instances generally have more network performance at smaller instance size than any other type. They donโ€™t have the fastest network available, but faster than many of the general purpose instance types.

HPC Optimized

This group only hase one type HPC with 2 options, the hpc6id.32xlarge or hpc6a.48xlarge. You can get a big instance with Intel (i) or AMD (a) processors with the main benefits being no hyper-threading and lots of network bandwidth.

If you want HPC instances you have a very specific need that needs either 16:1 or 8:1 memory to CPU ratio. They are only available in us-east-2 and GovCloud regions so donโ€™t expect to use these in multi-region deployments.

Storage optimized group includes: D, H, I, Im, Is

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.