Skip to content

๐Ÿ‘ซ ๋ชจ์ž„์›๋“ค๊ณผ ๋” ๊ฐ€๊นŒ์›Œ์ง€๋Š” ๊ณต๊ฐ„, moring

Notifications You must be signed in to change notification settings

depromeet/moring-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-08-07 แ„‹แ…ฉแ„’แ…ฎ 2 23 06

๐Ÿ™Œ Hello

  • ๋ชจ๋ง Server ํŒ€์€ ์„ฑ๊ณต์ ์ธ ๋ชจ์ž„ ํ™œ๋™์„ ์œ„ํ•œ ์„œ๋น„์Šค, ๋ชจ๋ง์˜ ์„œ๋ฒ„๋ฅผ ๊ฐœ๋ฐœ ๋ฐ ์šด์˜ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ›๏ธ System Architecture

moring-architecture drawio
  • ๋ชจ๋ง์˜ ์„œ๋ฒ„๋Š” NCP ํ™˜๊ฒฝ์— ๊ธฐ๋ฐ˜ํ•˜์—ฌ ์šด์˜๋ฉ๋‹ˆ๋‹ค.
  • ํ•œ ์žฅ๋น„ ๋‚ด docker-compose ๊ธฐ๋ฐ˜์œผ๋กœ ์šด์˜ํ•จ์œผ๋กœ์จ ๋น„์šฉ ์ ˆ๊ฐ์„ ๋„๋ชจํ•ฉ๋‹ˆ๋‹ค.
    • ์‚ฌ์šฉ์ž ์ฆ๊ฐ€ ์‹œ, k8s ๊ธฐ๋ฐ˜ ์‹œ์Šคํ…œ์œผ๋กœ ์ „ํ™˜ ๊ฐ€๋Šฅํ•˜๋„๋ก ๊ตฌ์ƒ ์ค‘์— ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ—๏ธ Application Architecture

  • DDD(Domain Driven Design) ๋ฐ Multi Module ๋ฐฉ์‹์„ ์ฑ„ํƒํ•˜์˜€์Šต๋‹ˆ๋‹ค.

Domain Driven Design

  • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋‚ด ํŒจํ‚ค์ง€๋Š” ํŠน์ • ๋„๋ฉ”์ธ ๋˜๋Š” ์„œ๋ธŒ ๋„๋ฉ”์ธ์„ ๊ธฐ์ค€์œผ๋กœ ๋‚˜๋‰ฉ๋‹ˆ๋‹ค.
  • ๊ฐ ๋„๋ฉ”์ธ ํŒจํ‚ค์ง€๋Š” application, domain, infrastructure, presentation์˜ ๋„ค ๊ฐ€์ง€ ์ฃผ์š” ๋ ˆ์ด์–ด๋กœ ์ผ๊ด€๋œ ๊ตฌ์กฐ๋ฅผ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
โ”œโ”€โ”€ meeting
โ”‚   โ”œโ”€โ”€ answer
โ”‚   โ”‚   โ”œโ”€โ”€ application
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ MeetingAnswerRepository.java
// ...
โ”‚   โ”‚   โ”œโ”€โ”€ domain
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ MeetingAnswer.java
โ”‚   โ”‚   โ”œโ”€โ”€ infrastructure
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ MeetingAnswerJpaRepository.java
// ...
โ”‚   โ”‚   โ””โ”€โ”€ presentation
โ”‚   โ”‚       โ”œโ”€โ”€ MeetingAnswerController.java
// ...
โ”‚   โ”œโ”€โ”€ comment
โ”‚   โ”‚   โ”œโ”€โ”€ application
// ...
  • DDD์˜ ๊ฐ€์žฅ ํฐ ์žฅ์ ์€, ๋„๋ฉ”์ธ ๋ชจ๋ธ์„ ๊ฐ•์กฐํ•จ์œผ๋กœ์จ ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ๋น„์ฆˆ๋‹ˆ์Šค ๋ชฉํ‘œ ๋ฐ ํ”„๋กœ์„ธ์Šค์™€ ๋ฐ€์ ‘ํ•˜๊ฒŒ ์ผ์น˜ํ•˜๋„๋ก ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์ž…๋‹ˆ๋‹ค.
    • ์ด๋Ÿฌํ•œ ์žฅ์ ์œผ๋กœ ์ธํ•ด ํšจ์œจ์ ์ด๊ณ  ๋น ๋ฅด๋ฉฐ ์ •ํ™•ํ•œ ๊ฐœ๋ฐœ์ด ๊ฐ€๋Šฅํ† ๋ก ํ•ฉ๋‹ˆ๋‹ค.

Multi Module

  • Multi Module ์•„ํ‚คํ…์ฒ˜๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋ชจ๋“ˆ๋กœ ๋ถ„๋ฆฌํ•˜์—ฌ ๊ฐ๊ฐ์˜ ๋ชจ๋“ˆ์ด ๋…๋ฆฝ์ ์œผ๋กœ ๊ฐœ๋ฐœ๋˜๊ณ  ๊ด€๋ฆฌ๋  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
    • ์ด ๋ฐฉ์‹์€ ์ฝ”๋“œ์˜ ๋ชจ๋“ˆ์„ฑ๊ณผ ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์ด๋ฉฐ, ๋…๋ฆฝ์ ์ธ ๋ฐฐํฌ์™€ ํ…Œ์ŠคํŠธ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค.
โ”œโ”€โ”€ auth
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ build.gradle
โ”œโ”€โ”€ meeting-api
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ build.gradle
โ”œโ”€โ”€ admin-api
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ””โ”€โ”€ build.gradle
// ...

๐Ÿšจ Monitoring / Alert

  • ๋‹ค์–‘ํ•œ ์ง€ํ‘œ์™€ ๋กœ๊ทธ๋ฅผ ํšจ๊ณผ์ ์œผ๋กœ ์ˆ˜์ง‘ํ•˜๊ณ  ์‹œ๊ฐํ™”ํ•˜์—ฌ ์„œ๋น„์Šค ๊ฐ€์šฉ์„ฑ๊ณผ ์„ฑ๋Šฅ ์ตœ์ ํ™”์— ๊ธฐ์—ฌํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฐ ๋„๊ตฌ๋Š” ๋…๋ฆฝ์ ์ด๋ฉด์„œ๋„ ํ†ตํ•ฉ์ ์œผ๋กœ ๊ด€๋ฆฌ๋˜์–ด ์œ ์—ฐํ•œ ํ™•์žฅ์„ฑ๊ณผ ํšจ์œจ์ ์ธ ๋ฌธ์ œ ์ง„๋‹จ์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
  1. ๋Œ€์‹œ๋ณด๋“œ

    • ์‚ฌ์šฉ ๊ธฐ์ˆ : Prometheus, Grafana, Micrometer
    • ์‹œ์Šคํ…œ ๋ฐ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ง€ํ‘œ๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์‹œ๊ฐํ™”ํ•˜๋ฉฐ, Slack ์•Œ๋ฆผ ์„ค์ • ๊ฐ€๋Šฅ.
  2. ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ถ”์ 

    • ์‚ฌ์šฉ ๊ธฐ์ˆ : Naver Pinpoint
    • HTTP ์š”์ฒญ ๋ฐ ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค ๊ฐ„ ๋ถ„์‚ฐ ์ถ”์ .
    • ์„ฑ๋Šฅ ๋ณ‘๋ชฉ์„ ๋น ๋ฅด๊ฒŒ ํŒŒ์•….
  3. ๋กœ๊ทธ

    • ์‚ฌ์šฉ ๊ธฐ์ˆ : Loki Stack (Promtail + Loki + Grafana)
    • ๋กœ๊ทธ ๋ฐ์ดํ„ฐ๋ฅผ ํšจ์œจ์ ์œผ๋กœ ์ˆ˜์ง‘ํ•˜๊ณ  ํ•„์š” ์‹œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅ.
    • Grafana์—์„œ ๋กœ๊ทธ๋ฅผ ์‹œ๊ฐํ™”ํ•˜๊ณ , ๊ฒ€์ƒ‰ ๋ฐ ๋ถ„์„์„ ์ง€์›.
  4. ์—๋Ÿฌ ๋ชจ๋‹ˆํ„ฐ๋ง

    • ์‚ฌ์šฉ ๊ธฐ์ˆ : Sentry
    • ์‹ค์‹œ๊ฐ„ ์˜ค๋ฅ˜ ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๋ถ„์„์„ ํ†ตํ•ด ๋น ๋ฅธ ๋Œ€์‘ ๊ฐ€๋Šฅ.

๐Ÿง‘โ€๐Ÿ’ป Contribution

๊น€๋‚˜ํ˜„ ๊ถŒ๊ธฐ์ค€ ์ดํ•œ์Œ
_ _ _
Server (Leader) Server Server

About

๐Ÿ‘ซ ๋ชจ์ž„์›๋“ค๊ณผ ๋” ๊ฐ€๊นŒ์›Œ์ง€๋Š” ๊ณต๊ฐ„, moring

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages