update resume & portfolio
@@ -0,0 +1,162 @@
|
||||
# 강동현 · Backend Engineer
|
||||
|
||||
## 같은 조회를 query 수, 읽은 row, buffer, 실행 계획으로 나눠 비교했습니다
|
||||
|
||||
> 멘토링 과제로 진행한 Feed Query 성능 비교입니다. N+1, Batch Fetch, Projection, Top-N, index 의존성, pagination을 같은 데이터셋과 같은 측정 조건에서 비교했습니다. 뒤쪽에는 TechLog Backend에서 게시 상태와 module 경계, 인증 경계를 정리한 내용이 이어집니다.
|
||||
|
||||
| **2,022 → 23** | **1,569 → 0** | **2,000 → 20** |
|
||||
|---|---|---|
|
||||
| N=1,000 요청 1건의 PreparedStatement | Projection 적용 후 entity load | 100번째 페이지에서 읽은 row |
|
||||
|
||||
PostgreSQL 16 · Hibernate Statistics · EXPLAIN (ANALYZE, BUFFERS) · Testcontainers · Java 21 · Spring Boot
|
||||
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
|---|---|
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
|
||||
# 01 · Performance Lab · N+1 Baseline
|
||||
|
||||
## 요청 1건이 SQL 2,022개로 늘어났습니다
|
||||
|
||||
**목록 1페이지를 여는 데 실제로 몇 번 질의하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
`loadFeed(0, N)` 한 번이 N=1,000에서 PreparedStatement 2,022개를 만들었습니다. content 1 + count 1 + User 20 + Page 1,000 + Highlight 1,000으로 분해됩니다. 부모 행이 늘어난 만큼 질의가 따라 늘어나는 구조였습니다.
|
||||
|
||||

|
||||
|
||||
| N | Highlight collection | PreparedStatement | median (5) | max (5) |
|
||||
|---:|---:|---:|---:|---:|
|
||||
| 10 | 10 | 25 | 32.8 ms | 36.1 ms |
|
||||
| 100 | 100 | 222 | 85.9 ms | 108.3 ms |
|
||||
| 1,000 | 1,000 | **2,022** | 193.7 ms | 238.4 ms |
|
||||
|
||||
PostgreSQL 16 Testcontainers · Hibernate Statistics · 동일 JVM · warm DB cache · single thread. 지연은 7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다.
|
||||
|
||||
# 02 · Performance Lab · Batch / Projection
|
||||
|
||||
## PreparedStatement 2,022 → 23, entity load 1,569 → 0
|
||||
|
||||
**왕복을 줄이는 것과 읽기 경로를 분리하는 것은 같은 선택인가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
같은 `loadFeed(0, N)`에서 조회 전략만 바꿔 N=1,000으로 다시 측정했습니다.
|
||||
|
||||

|
||||
|
||||
Batch Fetch는 PreparedStatement를 2,022 → 23으로, collection fetch를 1,000 → 10으로 줄였습니다. Projection은 query를 2개로 고정하고 entity load를 1,569 → 0으로 없앴습니다.
|
||||
|
||||
Batch는 기존 entity 조회 구조를 그대로 두고 왕복만 줄인 최적화이고, Projection은 읽기 전용 contract를 따로 만들어 경로 자체를 나눈 선택입니다. Projection 쪽은 수정 경로에서 쓰던 entity 기능을 쓸 수 없으므로, 목록처럼 읽기만 하는 화면에만 적용했습니다.
|
||||
|
||||
# 03 · Performance Lab · Top-N & Index
|
||||
|
||||
## LATERAL은 index가 있을 때만 60행에서 멈췄습니다
|
||||
|
||||
**부모별 최신 3건을 가져오려고 전체 row를 정렬해야 하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
부모 20개에서 각각 최신 3건을 가져오는 질의를 Window Function / LATERAL / 2-step으로 비교한 뒤, 이긴 계획이 무엇에 기대고 있는지 다시 확인했습니다.
|
||||
|
||||

|
||||
|
||||
- Window: 60 rows · 430 buffers · 1.552 ms
|
||||
- LATERAL: 60 rows · **204 buffers · 0.323 ms**
|
||||
- 2-step: 1,509 rows · 430 buffers · 1.686 ms
|
||||
|
||||
LATERAL이 빠른 기법이어서가 아니라, 부모별로 원하는 row를 바로 찾을 composite index가 있어서 `LIMIT 3`에서 멈출 수 있었습니다. 작은 K와 큰 group, 그리고 해당 index가 함께 있는 조건에서 측정한 결과입니다.
|
||||
|
||||
# 04 · Performance Lab · Pagination
|
||||
|
||||
## 100번째 페이지에서 OFFSET은 2,000행, Keyset은 20행을 읽었습니다
|
||||
|
||||
**깊은 페이지에서 OFFSET은 무엇을 더 하고 있는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
seed 2,000건 · page size 20 · 같은 정렬 조건에서 마지막 페이지를 요청했습니다. OFFSET은 건너뛸 행도 일단 읽은 뒤 버리기 때문에 페이지가 깊어질수록 읽는 양이 같이 늘어납니다.
|
||||
|
||||

|
||||
|
||||
- OFFSET 1980: 2,000 rows · 141 buffers · 0.996 ms
|
||||
- Keyset + index: **20 rows · 1 buffer · 0.076 ms**
|
||||
|
||||
Keyset이 항상 빠른 것은 아니고, 정렬 key가 안정적이고 cursor로 이어서 탐색하는 화면에서만 성립합니다. 같은 keyset 조건이어도 정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다.
|
||||
|
||||
# 05 · TechLog · Publication Workflow
|
||||
|
||||
## 저장되는 시점과 공개되는 시점을 분리했습니다
|
||||
|
||||
**Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Studio에서는 글을 고치는 동안 저장이 계속 일어납니다. 초기 구현에서는 저장된 내용이 곧 공개 화면의 내용이었기 때문에, 검증을 통과하지 못한 문서도 링크만 알면 보였습니다.
|
||||
|
||||

|
||||
|
||||
Create / Save / Validate / Preview / Publish를 각각 별도 use case로 나누고 working version과 publishedVersion을 따로 저장합니다. 검증에 실패하면 publish 단계로 넘어가지 않고, 문서나 dependency의 revision이 바뀌면 이전 preview는 stale로 표시됩니다. 공개 화면은 endpoint 여러 개의 응답을 조합해 게시 여부를 추측하지 않고 publication status와 publishedVersion만 봅니다.
|
||||
|
||||
# 06 · TechLog · Contract Drift
|
||||
|
||||
## 게시까지 끝난 글의 링크가 404로 끝났습니다
|
||||
|
||||
**같은 public path를 몇 군데에서 만들고 있었는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다. contract, publisher, projection, frontend route가 각각 같은 public path를 따로 만들고 있었고, 그중 한 곳만 규칙이 달라도 목록과 상세가 어긋났습니다.
|
||||
|
||||

|
||||
|
||||
지금은 route contract 한 곳에서 path를 만들고, 경계를 넘을 때마다 같은 정의를 쓰는지 확인합니다.
|
||||
|
||||
- OpenAPI operation과 RecordKind가 adapter 등록에서 빠졌는지 검사
|
||||
- server가 응답한 path가 frontend route로 실제 해석되는지 검사
|
||||
- Nginx serving pattern도 같은 route contract에서 유도
|
||||
- RecordKind는 `Record<RecordKind, _>`와 exhaustive switch로 누락이 컴파일 단계에서 드러나게 함
|
||||
|
||||
# 07 · TechLog · Dependency Direction
|
||||
|
||||
## 의존 방향을 사람 기억이 아니라 build에서 막습니다
|
||||
|
||||
**module 18개에서 참조해도 되는 방향을 누가 기억하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
web / gRPC / GraphQL / WebSocket과 outbound adapter가 늘면서, 어떤 module이 어떤 module을 참조해도 되는지가 각 Gradle 파일에 흩어졌습니다. 규칙을 리뷰에서 걸러내는 방식으로는 module 18개를 감당하기 어려웠습니다. 허용 edge를 `modules.json`에 한 번 선언하고 실제 project dependency와 비교합니다.
|
||||
|
||||

|
||||
|
||||
- `domain-core` / `shared-contract`는 허용 project dependency 0
|
||||
- 선언하지 않은 project edge는 Gradle `check`에서 실패
|
||||
- domain의 framework dependency와 application의 adapter / transport dependency는 ArchUnit class graph에서 실패
|
||||
|
||||
# 08 · TechLog · Contract Ownership
|
||||
|
||||
## inbound adapter가 만든 interface를 outbound adapter가 구현하고 있었습니다
|
||||
|
||||
**adapter 하나를 바꿀 때 어디까지 같이 고쳐야 하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, outer adapter끼리 직접 참조하는 project dependency가 생겼습니다. transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다.
|
||||
|
||||

|
||||
|
||||
port를 application이 소유하도록 옮겼습니다. 이제 adapter는 서로를 모르고 application port만 구현합니다.
|
||||
|
||||
- application이 호출하는 동작은 application port로 선언
|
||||
- 여러 adapter가 같이 봐야 하는 최소 타입만 `shared-contract`에 둠
|
||||
- `app-bootstrap`은 구현체 선택과 runtime 조립만 담당
|
||||
|
||||
# 09 · Authentication · 패턴 비교
|
||||
|
||||
## 네 가지 인증 구조를 같은 네 가지 질문으로 비교했습니다
|
||||
|
||||
**구조 이름 말고 무엇을 기준으로 고를 것인가?** · 4-pattern 인증 실험 · Authorization Code + PKCE
|
||||
|
||||
SPA / Token Mediator / BFF / Forward-Auth를 같은 Authorization Code + PKCE 흐름으로 각각 구현했습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, 무엇을 검증하는지를 네 구조에 똑같이 물었습니다.
|
||||
|
||||

|
||||
|
||||
브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. 이 표는 네 구조를 모두 구현해 본 실험 결과이고, 이 가운데 두 가지를 TechLog에 실제로 넣었습니다.
|
||||
|
||||
# 10 · TechLog · Authentication Modes
|
||||
|
||||
## TechLog에는 `jwt`와 `redis-session` 두 mode를 구현했습니다
|
||||
|
||||
**같은 endpoint인데 상태는 어디에 남는가?** · TechLog Backend · `SecurityConfig` runtime branch
|
||||
|
||||
`SecurityConfig`는 `auth-mode` 값에 따라 두 SecurityFilterChain 중 하나를 고릅니다. 두 branch는 같은 endpoint를 서비스하지만 상태가 남는 위치가 다릅니다.
|
||||
|
||||

|
||||
|
||||
`jwt`는 Resource Server가 서명만 검증하고 서버에 session을 만들지 않습니다. `redis-session`은 `oauth2Login`으로 session을 만들고 SecurityContext를 Redis에 보관하며, session cookie를 쓰는 만큼 CSRF token 경계가 함께 붙습니다. repository 기본값과 현재 로컬 `.env`는 `jwt`이고, 공개 배포가 어느 mode로 떠 있는지는 이 작업공간에서 확인되지 않아 단정하지 않습니다. Forward-Auth는 비교 실험 범위이고 TechLog security branch에는 넣지 않았습니다.
|
||||
@@ -0,0 +1,162 @@
|
||||
# 강동현 · Backend Engineer
|
||||
|
||||
## 게시 상태와 module 경계, 인증 경계를 코드로 고정해 왔습니다
|
||||
|
||||
> TechLog Backend를 만들면서 겪은 세 가지 문제를 정리했습니다. 초안이 그대로 공개된 문제, 경로 계약이 흩어져 404가 난 문제, adapter가 늘면서 의존 방향이 사람 기억에 남은 문제입니다. 뒤쪽 Feed Query 성능 비교는 별도 멘토링 과제입니다.
|
||||
|
||||
| **초안 공개 차단** | **404 재발 차단** | **의존 방향 위반 차단** |
|
||||
|---|---|---|
|
||||
| validate·preview를 통과한 version만 publish | route contract 한 곳에서 path 생성 | 선언하지 않은 module edge는 build 실패 |
|
||||
|
||||
Java 21 · Spring Boot · Spring Security · JPA · PostgreSQL · Gradle · ArchUnit · Testcontainers
|
||||
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
|---|---|
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
|
||||
# 01 · TechLog · Publication Workflow
|
||||
|
||||
## 저장되는 시점과 공개되는 시점을 분리했습니다
|
||||
|
||||
**Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Studio에서는 글을 고치는 동안 저장이 계속 일어납니다. 초기 구현에서는 저장된 내용이 곧 공개 화면의 내용이었기 때문에, 검증을 통과하지 못한 문서도 링크만 알면 보였습니다.
|
||||
|
||||

|
||||
|
||||
Create / Save / Validate / Preview / Publish를 각각 별도 use case로 나누고 working version과 publishedVersion을 따로 저장합니다. 검증에 실패하면 publish 단계로 넘어가지 않고, 문서나 dependency의 revision이 바뀌면 이전 preview는 stale로 표시됩니다. 공개 화면은 endpoint 여러 개의 응답을 조합해 게시 여부를 추측하지 않고 publication status와 publishedVersion만 봅니다.
|
||||
|
||||
# 02 · TechLog · Contract Drift
|
||||
|
||||
## 게시까지 끝난 글의 링크가 404로 끝났습니다
|
||||
|
||||
**같은 public path를 몇 군데에서 만들고 있었는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다. contract, publisher, projection, frontend route가 각각 같은 public path를 따로 만들고 있었고, 그중 한 곳만 규칙이 달라도 목록과 상세가 어긋났습니다.
|
||||
|
||||

|
||||
|
||||
지금은 route contract 한 곳에서 path를 만들고, 경계를 넘을 때마다 같은 정의를 쓰는지 확인합니다.
|
||||
|
||||
- OpenAPI operation과 RecordKind가 adapter 등록에서 빠졌는지 검사
|
||||
- server가 응답한 path가 frontend route로 실제 해석되는지 검사
|
||||
- Nginx serving pattern도 같은 route contract에서 유도
|
||||
- RecordKind는 `Record<RecordKind, _>`와 exhaustive switch로 누락이 컴파일 단계에서 드러나게 함
|
||||
|
||||
# 03 · TechLog · Dependency Direction
|
||||
|
||||
## 의존 방향을 사람 기억이 아니라 build에서 막습니다
|
||||
|
||||
**module 18개에서 참조해도 되는 방향을 누가 기억하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
web / gRPC / GraphQL / WebSocket과 outbound adapter가 늘면서, 어떤 module이 어떤 module을 참조해도 되는지가 각 Gradle 파일에 흩어졌습니다. 규칙을 리뷰에서 걸러내는 방식으로는 module 18개를 감당하기 어려웠습니다. 허용 edge를 `modules.json`에 한 번 선언하고 실제 project dependency와 비교합니다.
|
||||
|
||||

|
||||
|
||||
- `domain-core` / `shared-contract`는 허용 project dependency 0
|
||||
- 선언하지 않은 project edge는 Gradle `check`에서 실패
|
||||
- domain의 framework dependency와 application의 adapter / transport dependency는 ArchUnit class graph에서 실패
|
||||
|
||||
# 04 · TechLog · Contract Ownership
|
||||
|
||||
## inbound adapter가 만든 interface를 outbound adapter가 구현하고 있었습니다
|
||||
|
||||
**adapter 하나를 바꿀 때 어디까지 같이 고쳐야 하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, outer adapter끼리 직접 참조하는 project dependency가 생겼습니다. transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다.
|
||||
|
||||

|
||||
|
||||
port를 application이 소유하도록 옮겼습니다. 이제 adapter는 서로를 모르고 application port만 구현합니다.
|
||||
|
||||
- application이 호출하는 동작은 application port로 선언
|
||||
- 여러 adapter가 같이 봐야 하는 최소 타입만 `shared-contract`에 둠
|
||||
- `app-bootstrap`은 구현체 선택과 runtime 조립만 담당
|
||||
|
||||
# 05 · Authentication · 패턴 비교
|
||||
|
||||
## 네 가지 인증 구조를 같은 네 가지 질문으로 비교했습니다
|
||||
|
||||
**구조 이름 말고 무엇을 기준으로 고를 것인가?** · 4-pattern 인증 실험 · Authorization Code + PKCE
|
||||
|
||||
SPA / Token Mediator / BFF / Forward-Auth를 같은 Authorization Code + PKCE 흐름으로 각각 구현했습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, 무엇을 검증하는지를 네 구조에 똑같이 물었습니다.
|
||||
|
||||

|
||||
|
||||
브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. 이 표는 네 구조를 모두 구현해 본 실험 결과이고, 이 가운데 두 가지를 TechLog에 실제로 넣었습니다.
|
||||
|
||||
# 06 · TechLog · Authentication Modes
|
||||
|
||||
## TechLog에는 `jwt`와 `redis-session` 두 mode를 구현했습니다
|
||||
|
||||
**같은 endpoint인데 상태는 어디에 남는가?** · TechLog Backend · `SecurityConfig` runtime branch
|
||||
|
||||
`SecurityConfig`는 `auth-mode` 값에 따라 두 SecurityFilterChain 중 하나를 고릅니다. 두 branch는 같은 endpoint를 서비스하지만 상태가 남는 위치가 다릅니다.
|
||||
|
||||

|
||||
|
||||
`jwt`는 Resource Server가 서명만 검증하고 서버에 session을 만들지 않습니다. `redis-session`은 `oauth2Login`으로 session을 만들고 SecurityContext를 Redis에 보관하며, session cookie를 쓰는 만큼 CSRF token 경계가 함께 붙습니다. repository 기본값과 현재 로컬 `.env`는 `jwt`이고, 공개 배포가 어느 mode로 떠 있는지는 이 작업공간에서 확인되지 않아 단정하지 않습니다. Forward-Auth는 비교 실험 범위이고 TechLog security branch에는 넣지 않았습니다.
|
||||
|
||||
# 07 · Performance Lab · N+1 Baseline
|
||||
|
||||
## 요청 1건이 SQL 2,022개로 늘어났습니다
|
||||
|
||||
**목록 1페이지를 여는 데 실제로 몇 번 질의하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
`loadFeed(0, N)` 한 번이 N=1,000에서 PreparedStatement 2,022개를 만들었습니다. content 1 + count 1 + User 20 + Page 1,000 + Highlight 1,000으로 분해됩니다. 부모 행이 늘어난 만큼 질의가 따라 늘어나는 구조였습니다.
|
||||
|
||||

|
||||
|
||||
| N | Highlight collection | PreparedStatement | median (5) | max (5) |
|
||||
|---:|---:|---:|---:|---:|
|
||||
| 10 | 10 | 25 | 32.8 ms | 36.1 ms |
|
||||
| 100 | 100 | 222 | 85.9 ms | 108.3 ms |
|
||||
| 1,000 | 1,000 | **2,022** | 193.7 ms | 238.4 ms |
|
||||
|
||||
PostgreSQL 16 Testcontainers · Hibernate Statistics · 동일 JVM · warm DB cache · single thread. 지연은 7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다.
|
||||
|
||||
# 08 · Performance Lab · Batch / Projection
|
||||
|
||||
## PreparedStatement 2,022 → 23, entity load 1,569 → 0
|
||||
|
||||
**왕복을 줄이는 것과 읽기 경로를 분리하는 것은 같은 선택인가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
같은 `loadFeed(0, N)`에서 조회 전략만 바꿔 N=1,000으로 다시 측정했습니다.
|
||||
|
||||

|
||||
|
||||
Batch Fetch는 PreparedStatement를 2,022 → 23으로, collection fetch를 1,000 → 10으로 줄였습니다. Projection은 query를 2개로 고정하고 entity load를 1,569 → 0으로 없앴습니다.
|
||||
|
||||
Batch는 기존 entity 조회 구조를 그대로 두고 왕복만 줄인 최적화이고, Projection은 읽기 전용 contract를 따로 만들어 경로 자체를 나눈 선택입니다. Projection 쪽은 수정 경로에서 쓰던 entity 기능을 쓸 수 없으므로, 목록처럼 읽기만 하는 화면에만 적용했습니다.
|
||||
|
||||
# 09 · Performance Lab · Top-N & Index
|
||||
|
||||
## LATERAL은 index가 있을 때만 60행에서 멈췄습니다
|
||||
|
||||
**부모별 최신 3건을 가져오려고 전체 row를 정렬해야 하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
부모 20개에서 각각 최신 3건을 가져오는 질의를 Window Function / LATERAL / 2-step으로 비교한 뒤, 이긴 계획이 무엇에 기대고 있는지 다시 확인했습니다.
|
||||
|
||||

|
||||
|
||||
- Window: 60 rows · 430 buffers · 1.552 ms
|
||||
- LATERAL: 60 rows · **204 buffers · 0.323 ms**
|
||||
- 2-step: 1,509 rows · 430 buffers · 1.686 ms
|
||||
|
||||
LATERAL이 빠른 기법이어서가 아니라, 부모별로 원하는 row를 바로 찾을 composite index가 있어서 `LIMIT 3`에서 멈출 수 있었습니다. 작은 K와 큰 group, 그리고 해당 index가 함께 있는 조건에서 측정한 결과입니다.
|
||||
|
||||
# 10 · Performance Lab · Pagination
|
||||
|
||||
## 100번째 페이지에서 OFFSET은 2,000행, Keyset은 20행을 읽었습니다
|
||||
|
||||
**깊은 페이지에서 OFFSET은 무엇을 더 하고 있는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
seed 2,000건 · page size 20 · 같은 정렬 조건에서 마지막 페이지를 요청했습니다. OFFSET은 건너뛸 행도 일단 읽은 뒤 버리기 때문에 페이지가 깊어질수록 읽는 양이 같이 늘어납니다.
|
||||
|
||||

|
||||
|
||||
- OFFSET 1980: 2,000 rows · 141 buffers · 0.996 ms
|
||||
- Keyset + index: **20 rows · 1 buffer · 0.076 ms**
|
||||
|
||||
Keyset이 항상 빠른 것은 아니고, 정렬 key가 안정적이고 cursor로 이어서 탐색하는 화면에서만 성립합니다. 같은 keyset 조건이어도 정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다.
|
||||
@@ -0,0 +1,146 @@
|
||||
# 강동현 · Infrastructure / Platform Engineer
|
||||
|
||||
## 장애를 직접 재현하고, 무엇이 끊기고 무엇이 남는지 숫자로 확인했습니다
|
||||
|
||||
> K3s home lab에서 요청 경로와 상태가 남는 위치를 먼저 찾고, DB 지연·rolling restart·인증서 갱신·동시 refresh 같은 조건을 직접 만들어 관측했습니다. 아래 숫자는 모두 그 실험에서 측정한 값입니다.
|
||||
|
||||
| **66 → 1,872 ms** | **151 → 151** | **2,305 s → 1–2 s** |
|
||||
|---|---|---|
|
||||
| DB에 200 ms 지연을 넣었을 때 login 응답 | rolling restart 전후 DB session row | 인증서 갱신이 실제 serving에 반영되는 시간 |
|
||||
|
||||
K3s · Nginx · Traefik · Keycloak · PostgreSQL · Redis · Vault · Prometheus · Grafana · Loki · Tempo
|
||||
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
|---|---|
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
|
||||
# 01 · Request Path
|
||||
|
||||
## 외부에서 cluster로 들어오는 문을 Host Nginx 하나로 줄였습니다
|
||||
|
||||
**요청이 실제로 어느 순서로 들어오는가?** · 개인 home lab / dev · Host Nginx · K3s · Traefik · CloudNativePG
|
||||
|
||||
TLS는 Host Nginx :443에서 끝나고, 그 뒤 hop은 모두 loopback 안에서만 일어납니다. Traefik NodePort를 `127.0.0.1`에만 bind해 LAN에서 NodePort로 직접 들어오는 경로를 없앴고, PostgreSQL Service에는 Ingress / NodePort / LoadBalancer를 두지 않았습니다.
|
||||
|
||||

|
||||
|
||||
들어오는 문이 하나면 인증서, forwarded header, 차단 규칙을 한 곳에서만 맞추면 됩니다. 대신 그 한 곳이 단일 실패 지점이므로, 아래 Edge Trust에서 무엇까지 Host Nginx가 책임지는지 정리했습니다.
|
||||
|
||||
**Scope** — 단일 물리 서버 home lab입니다. 1/1 Ready나 Local PV Retain을 HA나 backup으로 표현하지 않습니다.
|
||||
|
||||
# 02 · Edge Trust
|
||||
|
||||
## forwarded header를 믿기 전에 누가 만들 수 있는지부터 막았습니다
|
||||
|
||||
**클라이언트가 보낸 값과 edge가 확정한 값을 어디서 구분하는가?** · Host Nginx · Traefik
|
||||
|
||||
외부 요청이 보낸 `X-Forwarded-*`는 신뢰하지 않고 Host Nginx가 다시 만듭니다. Traefik은 그 Host Nginx만 trusted proxy로 인정하므로, 내부에서 보이는 hostname과 client IP는 edge가 확정한 값입니다.
|
||||
|
||||

|
||||
|
||||
- Host Nginx upstream: `127.0.0.1:30080`
|
||||
- K3s NodePort bind: `127.0.0.0/8`
|
||||
- Traefik trusted proxy: `10.42.0.1/32`
|
||||
- 관리 hostname: LAN `192.168.0.0/24` + Tailscale `100.64.0.0/10` allowlist
|
||||
- Gitea / Grafana / metrics의 외부 우회 경로는 404
|
||||
|
||||
# 03 · Keycloak · Session State
|
||||
|
||||
## Persistent user session은 PostgreSQL에, cache는 각 replica에 남습니다
|
||||
|
||||
**replica를 늘리면 세션은 정말 유지되는가?** · VM 2대 · 2-node K3s · Keycloak 26 · JGroups
|
||||
|
||||
`persistent-user-sessions`를 켜면 user session의 durable state는 PostgreSQL에 남고, 각 replica는 그와 별개로 local cache를 가집니다. JGroups는 node discovery와 cluster transport를 담당할 뿐 durable state를 소유하지 않습니다.
|
||||
|
||||

|
||||
|
||||
replica가 2개라는 사실만으로 세션이 유지되는 것이 아니라, 유지되는 이유가 외부 PostgreSQL에 있습니다. 다음 페이지에서 실제로 replica를 재시작해 어느 쪽이 남는지 확인했습니다.
|
||||
|
||||
# 04 · Keycloak · Rolling Restart
|
||||
|
||||
## restart 중에도 DB session은 151 → 151로 그대로였습니다
|
||||
|
||||
**재시작하면 무엇이 끊기고 무엇이 남는가?** · rolling restart · 2-node K3s
|
||||
|
||||
재시작하는 동안 service 응답은 계속 HTTP 200이었고, PostgreSQL의 session row는 **151 → 151**로 유지됐습니다. 재시작한 replica의 local session cache만 0에서 다시 만들어졌고, 재시작 전에 발급한 refresh token도 이후 요청에서 HTTP 200을 받았습니다.
|
||||
|
||||

|
||||
|
||||
**Scope** — 한 물리 서버 안의 2 VM lab 결과입니다. 물리 장애를 포함한 production HA 결과가 아닙니다.
|
||||
|
||||
# 05 · Keycloak · Latency Fault
|
||||
|
||||
## DB에 넣은 200 ms가 login 1,872 ms와 readiness 실패까지 커졌습니다
|
||||
|
||||
**한 곳의 지연은 어디까지 번지는가?** · PostgreSQL 앞단에 200 ms 지연 주입 · 동시 20건
|
||||
|
||||
200 ms는 login 한 번에 여러 번 일어나는 DB round trip마다 붙었고, 느려진 요청이 connection을 오래 쥐면서 뒤 요청의 pool wait까지 끌어올렸습니다. 마지막에는 readiness probe가 timeout되어 느린 Pod가 load-balancing 대상에서 빠졌습니다.
|
||||
|
||||

|
||||
|
||||
주입한 지연 자체보다, 그 지연이 connection pool과 readiness를 거치며 한 자릿수 배가 아니라 20배 이상으로 커진 점이 이 실험의 결과입니다.
|
||||
|
||||
# 06 · Keycloak · Refresh Rotation
|
||||
|
||||
## 같은 refresh token을 동시에 쓰자 client session이 끊겼습니다
|
||||
|
||||
**rotation 중에 요청이 겹치면 어느 쪽이 실패하는가?** · `revokeRefreshToken=true` · `refreshTokenMaxReuse=0` · 동일 token 5건 동시 요청
|
||||
|
||||
같은 refresh token으로 5건을 동시에 보냈습니다. 재사용이 감지된 뒤 client session이 무효화됐고, 그중 먼저 성공 응답으로 받아 둔 **새 refresh token도 이후에는 쓸 수 없었습니다.**
|
||||
|
||||

|
||||
|
||||
순차로 보냈을 때는 같은 현상이 나오지 않았습니다. 클라이언트 입장에서는 "refresh 한 번 실패"와 "세션 자체가 끊김"이 다른 상황이므로, error handling에서 이 둘을 구분해 재로그인으로 넘길지 판단해야 합니다.
|
||||
|
||||
# 07 · Keycloak · JWKS Cache
|
||||
|
||||
## 같은 token이 replica에 따라 200과 401로 갈렸습니다
|
||||
|
||||
**서명 키를 지우면 각 replica는 언제 그것을 아는가?** · Resource Server 2 replica · Nimbus JWKS cache
|
||||
|
||||
realm에서 old signing key를 지운 직후 같은 old access token으로 반복 요청했더니 응답이 **401 → 200 → 401 → 200 → 401 → 200 → 401 → 200**으로 번갈아 나왔습니다.
|
||||
|
||||

|
||||
|
||||
검증은 Keycloak이 매 요청마다 해 주는 것이 아니라 각 Resource Server replica가 자기 JWKS cache로 합니다. 두 replica의 cache 갱신 시점이 달라서, 한쪽은 아직 old key를 들고 200을, 다른 쪽은 새 JWKS를 반영해 401을 반환했습니다. key를 지운 시점만으로는 이 교차를 설명할 수 없었고, replica별 cache 갱신 시점까지 봐야 설명됐습니다.
|
||||
|
||||
# 08 · TLS Renewal
|
||||
|
||||
## 인증서 파일이 갱신된 뒤 실제 serving까지 38분 25초가 비어 있었습니다
|
||||
|
||||
**갱신은 성공했는데 왜 옛 인증서가 나가는가?** · certbot timer · Host Nginx
|
||||
|
||||
certbot timer는 성공하고 있었지만 deploy hook이 없었습니다. 새 certificate 파일이 생긴 시점과 Nginx worker가 그 파일을 다시 읽는 시점이 분리돼 있어서, 그 사이에는 갱신 전 인증서가 계속 나갔습니다.
|
||||
|
||||

|
||||
|
||||
- renewal → serving gap: **2,305 s → 1–2 s** (deploy hook 적용 후)
|
||||
- 별도의 manual reload 부하 실험: **8,856 / 8,856 HTTP 200**, p95 **205.7 ms → 204.3 ms**
|
||||
- reload 중이던 845 KB 응답도 **845,361 bytes 전부 수신**
|
||||
|
||||
# 09 · Vault · Secret Delivery
|
||||
|
||||
## workload는 Vault token 없이 Kubernetes Secret만 소비합니다
|
||||
|
||||
**누가 인증되고 누가 secret을 읽는가?** · Vault 1.17.2 · Vault Secrets Operator · Kubernetes Auth · KV-v2
|
||||
|
||||
secret의 source of truth는 Vault KV-v2에 두되, Vault와 직접 이야기하는 주체는 Vault Secrets Operator 하나로 제한했습니다. VSO가 자기 ServiceAccount token으로 Kubernetes Auth를 통과하면, policy와 role이 읽을 수 있는 path를 정하고, 그 결과만 Kubernetes Secret으로 동기화됩니다.
|
||||
|
||||

|
||||
|
||||
workload는 Vault API도 Vault token도 다루지 않습니다. secret을 바꿀 때 rotation이 무중단으로 반영되는지는 따로 측정하지 않았으므로 여기서는 전달 경로까지만 이야기합니다.
|
||||
|
||||
**Scope** — Vault 1 replica · file storage · local-path PVC · manual init/unseal. 3-node Raft, auto-unseal, full Vault TLS 구성으로 확대하지 않습니다.
|
||||
|
||||
# 10 · Observability
|
||||
|
||||
## metric · log · trace · alert는 보내는 방식부터 다릅니다
|
||||
|
||||
**어떤 신호가 어디에 저장되고, 무엇으로 이어 보는가?** · Prometheus · Loki · Tempo · Alertmanager
|
||||
|
||||
네 신호를 한 덩어리로 다루면 "어디를 봐야 하는가"에 답할 수 없습니다. 수집 방식부터 다릅니다. Prometheus는 target을 직접 scrape하고(pull), log와 trace는 소스가 Alloy로 보냅니다(push).
|
||||
|
||||

|
||||
|
||||
Grafana는 세 저장소를 같이 조회하는 지점이지 저장소가 아니고, alert는 Prometheus rule에서 갈라져 Slack으로 나갑니다. 한 요청을 metric·log·trace에서 이어 보려면 저장소가 아니라 request id 같은 공통 key를 각 신호에 같이 실어야 합니다.
|
||||
@@ -0,0 +1,509 @@
|
||||
# PORTFOLIO REVIEW — "AI가 만든 티" 제거
|
||||
|
||||
**대상** Backend 제품형 11p · Backend 성능형 11p · Infra/Platform 11p (`dist/*.pdf`)
|
||||
**방법** 33페이지를 150dpi 이미지로 렌더해 리뷰어 3명이 한 장씩 육안 확인. 소스 수정 없음.
|
||||
**날짜** 2026-09-23
|
||||
**이전 리뷰와의 차이** 직전 라운드는 겹침·잘림·정보 위계를 다뤘고 그건 해결됐다. 이 문서는 **"사람이 쓴 문서로 안 읽히는 이유"** 하나만 다룬다.
|
||||
|
||||
---
|
||||
|
||||
## 0. 판정
|
||||
|
||||
내용은 정직하고 수치는 정확하다. 문제는 **균질성**이다.
|
||||
|
||||
측정해 보면 이렇다.
|
||||
|
||||
| 항목 | Backend | Infra |
|
||||
|---|---:|---:|
|
||||
| 산문 문장 수 | 41 | 38 |
|
||||
| `~니다` 종결 비율 | **95%** | **87%** |
|
||||
| 15자 이하 문장 | **0개** | 1개 |
|
||||
| 문장 길이 중앙값 / 최장 | 74 / 194자 | 89 / 250자 |
|
||||
| meta 질문 줄 | 10개 | 10개 |
|
||||
| 그 질문의 어미 | `~는가?`/`~인가?` **10/10** | **10/10** |
|
||||
| 본문 산문의 물음표 | **0개** | **0개** |
|
||||
| 페이지 골격 | `H1→H2→META→문단→그림→[불릿]→문단` **10/10 동일** | **10/10 동일** |
|
||||
|
||||
두 문서 합쳐 meta 질문 20개가 **전부** `~는가?` 또는 `~인가?`로 끝난다. 이 어미는 한국어 구어에서 거의 쓰지 않는 논설문투다. 한 번이면 문체고, 스무 번이면 슬롯이다.
|
||||
|
||||
그리고 질문은 **본문에서 회수되지 않는다.** 본문 산문의 물음표가 0개다. 질문을 던져 놓고 곧바로 서술로 들어간다. 질문-응답이 아니라 질문-장식이다.
|
||||
|
||||
> **핵심**: 문장을 예쁘게 다시 쓰는 것보다 **템플릿에 의도적인 불균형을 넣는 것**이 효과가 크다. 사람이 쓴 문서는 어떤 페이지는 길고 어떤 페이지는 세 줄이고, 어떤 페이지엔 그림이 없고, 한 페이지쯤은 삽질 얘기로 절반을 쓴다. 지금은 그 편차가 0이다.
|
||||
|
||||
---
|
||||
|
||||
## 1. P0 — 먼저 고칠 사실 오류
|
||||
|
||||
AI 티 이전에 **신뢰 문제**다. 세 건 모두 직전 개편에서 생겼다. 직접 확인했다.
|
||||
|
||||
### 1-1. Backend p.06 — 본문은 축 4개, 표는 5행
|
||||
|
||||
- 본문: `네 가지 인증 구조를 같은 **네 가지 질문**으로 비교했습니다` + 나열 4개(브라우저 보관 / API 호출자 / 서버 상태 / 검증 대상)
|
||||
- 실제 표: **5행** — 위 4개 + `CSRF 경계`
|
||||
|
||||
본문과 그림을 따로 만들고 맞춰보지 않은 흔적이다.
|
||||
|
||||
**조치** — 본문을 표에 맞춘다.
|
||||
> 인증 구조 4개에 같은 질문 5개를 던졌습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, CSRF 경계가 어디 생기는지, 그리고 무엇을 검증하는지.
|
||||
|
||||
### 1-2. Backend p.10 — 같은 페이지에 LATERAL 수치가 두 개
|
||||
|
||||
- 불릿: `LATERAL: 60 rows · 204 buffers · 0.323 ms`
|
||||
- 그림 카드: `index on · Index Scan + Limit · 168 buffers · 0.336 ms`
|
||||
|
||||
원본을 보면 전자는 **Window/LATERAL/2-step 3자 비교**, 후자는 **index on/off 대조**로 서로 다른 실험이다. 두 페이지를 한 장으로 합치면서 구분 없이 병치했다. 읽는 사람은 "숫자를 지어냈나"를 먼저 의심한다. **이 문서 전체에서 가장 위험한 지점이다.**
|
||||
|
||||
**조치** — 두 측정임을 명시하거나 페이지를 다시 나눈다.
|
||||
> LATERAL은 같은 질의를 두 실험에서 쟀습니다. 3자 비교(부모 20개)에서는 204 buffers · 0.323 ms, index on/off 대조에서는 168 buffers · 0.336 ms입니다.
|
||||
|
||||
※ 두 실험의 데이터셋·조건이 실제로 달랐는지 **본인 확인 필요**. 같은 조건인데 값이 다르면 한쪽이 틀린 것이다.
|
||||
|
||||
### 1-3. Backend p.11 — 차트 3계열, 불릿 2개
|
||||
|
||||
차트에 `Keyset − index: 2,000 rows · 141 buffers · 0.373 ms`가 있는데 불릿에서 빠졌다. 읽는 사람은 "왜 하나만 뺐지"를 먼저 생각한다.
|
||||
|
||||
더 나쁜 건 그 숨은 값이 **주장을 흔든다**는 점이다. `Keyset − index`의 0.373 ms는 OFFSET의 0.996 ms보다 **여전히 2.6배 빠르다.** 그런데 본문은 "정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다"로 닫아 "index 없으면 keyset은 무의미"라는 인상을 준다. 차트를 본 사람과 글을 읽은 사람의 결론이 갈린다.
|
||||
|
||||
**조치** — 불릿에 세 번째 줄을 넣고 결론을 정직하게 고친다.
|
||||
> index를 뺀 채 같은 keyset query를 돌리니 읽은 row가 20에서 2,000으로, buffer가 1에서 141로 올라갔습니다. OFFSET과 정확히 같은 숫자입니다. 그래도 0.373 ms로 OFFSET의 0.996 ms보다는 빨랐는데, 읽는 양이 같은데 시간이 갈린 이유는 여기까지 확인하지 않았습니다.
|
||||
|
||||
### 1-4. Infra p.06 — 자기가 잰 숫자를 뭉갬
|
||||
|
||||
`66 → 1,872 ms`는 **28배**인데 본문은 "20배 이상으로 커진 점"이라고 쓴다. 자기 측정값을 본인이 정확히 안 쓰면 나머지 숫자도 의심받는다.
|
||||
|
||||
---
|
||||
|
||||
## 2. AI 티의 3대 원인
|
||||
|
||||
### 원인 1 — meta 질문 줄 20개가 전부 같은 어미 (최대 원인)
|
||||
|
||||
```
|
||||
**목록 1페이지를 여는 데 실제로 몇 번 질의하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
**같은 public path를 몇 군데에서 만들고 있었는가?** · TechLog Backend · 개인 프로젝트
|
||||
**replica를 늘리면 세션은 정말 유지되는가?** · VM 2대 · 2-node K3s · Keycloak 26
|
||||
```
|
||||
|
||||
오른쪽 꼬리표도 반복된다. Backend에서 `· TechLog Backend · 개인 프로젝트` 4회, `· 별도 멘토링 과제 · Feed Query Performance Lab` 4회가 **글자 그대로** 반복된다.
|
||||
|
||||
**처방** — 질문 줄을 **문서당 3개 이하**로 줄인다. 남길 후보는 본인이 실제로 던졌을 법한 것만. 나머지는 **상황 한 줄**로 바꾼다.
|
||||
|
||||
| 현재 | 대체 |
|
||||
|---|---|
|
||||
| `**목록 1페이지를 여는 데 실제로 몇 번 질의하는가?**` | `Feed Query Lab · PostgreSQL 16 · [측정 시기]` |
|
||||
| `**Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?**` | `Studio 자동 저장 · 초기 구현` |
|
||||
| `**module 18개에서 참조해도 되는 방향을 누가 기억하는가?**` | (남긴다면) `module 18개의 의존 방향, 누가 기억하죠?` |
|
||||
|
||||
남기는 질문도 어미를 흩뜨린다: `~할까?`, `~하나?`, `~죠?`, 물음표 없는 자문.
|
||||
|
||||
날짜가 들어가면 그 자체로 사람 티가 난다.
|
||||
|
||||
### 원인 2 — 같은 문장을 2~3번 복창
|
||||
|
||||
가장 노골적인 사례. **Backend p.05**에서 그림 하단 배너와 본문이 **한 글자도 안 틀리고 같다.**
|
||||
|
||||
```
|
||||
그림 배너: adapter는 서로를 모르고 application port만 구현합니다
|
||||
본문: 이제 adapter는 서로를 모르고 application port만 구현합니다.
|
||||
```
|
||||
|
||||
같은 페이지에 3중 중복이 하나 더 있다.
|
||||
|
||||
| 본문 | 그림 |
|
||||
|---|---|
|
||||
| `transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다` | `transport 하나를 바꾸면 저장소 adapter까지 같이 열어야 함` |
|
||||
| `outer adapter끼리 직접 참조하는 project dependency가 생겼습니다` | `outer adapter끼리 직접 참조하는 project dependency` |
|
||||
|
||||
수치 중복도 심하다.
|
||||
|
||||
| 값 | 등장 횟수 | 위치 |
|
||||
|---|---:|---|
|
||||
| `2,022` (Backend p.08) | **5회** | H2 · 본문 · 차트 라벨 · 분해 카드 · 표 |
|
||||
| `151 → 151` (Infra p.05) | **4회** | 표지 · H2 · 본문 · 그림 |
|
||||
| `2,305 s` (Infra p.09) | **5회** | 표지 · H2 · 그림 숫자 · 그림 캡션 · 불릿 |
|
||||
|
||||
**처방**
|
||||
- **그림 하단 굵은 컬러 결론 배너를 문서당 2개 이하로.** 지금은 있는 페이지와 없는 페이지가 뒤섞여 규칙도 없다. 본문 재진술인 것부터 삭제한다 — Backend p.02·p.05, Infra p.03·p.04·p.07·p.09·p.10.
|
||||
- **같은 수치는 한 페이지에 2회까지.** H2에 넣었으면 본문에서 빼고, 그림에 있으면 불릿에서 뺀다.
|
||||
- Backend p.08의 **차트와 표 중 하나를 버린다.** 25/222/2,022를 똑같이 두 번 그린다.
|
||||
|
||||
### 원인 3 — "어떻게 알아챘는지"가 33페이지에 한 줄도 없다
|
||||
|
||||
명령어, 로그 한 줄, 대시보드 이름, 날짜, 틀린 가설이 **0개**다. 1인칭(`저는`/`제가`)도 0회. 실패·되돌린 선택·후회도 0건.
|
||||
|
||||
전체에서 사람 냄새가 나는 문장은 딱 셋이다.
|
||||
|
||||
1. Backend p.08 — `7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다`
|
||||
2. Backend p.03 — `Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다`
|
||||
3. Infra p.08 — `key를 지운 시점만으로는 이 교차를 설명할 수 없었고`
|
||||
|
||||
**3번이 문서 전체에서 유일한 '헛다리' 흔적이다.** 이 톤이 기준이 돼야 한다.
|
||||
|
||||
가장 아까운 건 **Infra p.09 (TLS Renewal)**다. 33페이지 중 **유일하게 주입/재현이 아니라 실제로 잘못돼 있던 사고**인데, 발견 경위 없이 원인부터 서술해서 나머지 실험 페이지와 구분이 안 된다.
|
||||
|
||||
**처방** — 각 페이지에 다음 중 최소 하나를 넣는다.
|
||||
- 증상을 처음 본 순간 (무엇을 보고 알았나)
|
||||
- 처음 의심했다가 틀린 곳
|
||||
- 실제로 친 명령어 / 열어 본 파일 / 본 화면
|
||||
- **"그래서 뭘 바꿨나"** — 안 바꿨으면 "안 바꿨습니다"라고 쓰는 게 훨씬 사람 같다
|
||||
|
||||
---
|
||||
|
||||
## 3. 페이지별 — Backend 제품형
|
||||
|
||||
### p.01 표지 — AI티 강함
|
||||
- H2 `게시 상태와 module 경계, 인증 경계를 코드로 고정해 왔습니다` — 추상명사 3연발. 개인 프로젝트 하나를 3년 경력처럼 쓰는 어투.
|
||||
- 인용 블록이 문제 3개를 말하고, 바로 아래 카드 3장이 **같은 3개를 다시** 말한다. 카드 제목은 `초안 공개 차단` / `404 재발 차단` / `의존 방향 위반 차단` — 완전 대칭 3연 명사구.
|
||||
- **지원자가 누구인지가 없다.** 연차, 왜 만들었는지, 왜 읽어야 하는지가 한 줄도 없다.
|
||||
|
||||
**대체**
|
||||
> H2: `혼자 만든 블로그 백엔드에서 초안이 공개되고, 게시한 글이 404가 났습니다`
|
||||
> 인용: `TechLog는 제가 쓴 글을 올리려고 만든 블로그 백엔드입니다. 위 두 문제와, module이 18개로 늘면서 의존 방향이 제 기억에만 남아 있던 문제를 다뤘습니다. 7~10페이지의 Feed Query 성능 비교는 TechLog가 아니라 별도 멘토링 과제입니다.`
|
||||
> 카드 어미 비대칭으로: `초안은 publish 앞에서 막힙니다` / `path는 route contract 한 곳에서만 나옵니다` / `선언 안 한 module edge는 Gradle check가 깹니다`
|
||||
|
||||
### p.02 Publication Workflow — AI티 강함
|
||||
그림 배너가 H2를 복창하고, `publication status와 publishedVersion만 봅니다`가 그림·본문에 또 겹친다. 같은 사실 3회.
|
||||
|
||||
`검증을 통과하지 못한 문서도 링크만 알면 보였습니다`가 유일하게 살아 있는 문장인데 **어떻게 알았는지가 없다.**
|
||||
|
||||
**대체**
|
||||
> `Studio는 타이핑 중에도 계속 저장합니다. 초기 구현에서는 그 저장본이 곧 공개 화면이었고, 검증을 통과하지 못한 문서도 로그인 없이 링크만 알면 열렸습니다.`
|
||||
|
||||
그림 배너 삭제. 마지막 문단에서 use case 나열(그림에 이미 있음)을 뺀다.
|
||||
|
||||
### p.03 Contract Drift — 애매 (11장 중 가장 사람 같음)
|
||||
진짜 원인인 `decisions#{slug}` vs `decisions/{slug}`가 **그림 안에만 있고 본문이 말하지 않는다.** 본문은 "각각 같은 public path를 따로 만들고 있었고"라는 추상 요약으로 끝난다. 구체는 그림에 숨기고 본문은 매끄럽게 닫는 습관.
|
||||
|
||||
불릿 4개가 `~검사` / `~검사` / `~유도` / `~드러나게 함`으로 전부 명사형 종결.
|
||||
|
||||
**대체**
|
||||
> `목록에는 떠 있는데 누르면 404. Project Decision 글에서 처음 봤습니다. 따라가 보니 public path를 만드는 곳이 네 군데였습니다 — OpenAPI contract, publisher, projection DB, frontend route. 넷이 각자 문자열을 조립하고 있었으니 한 곳만 decisions#{slug}로 쓰고 다른 곳이 decisions/{slug}로 쓰면 그대로 깨집니다. 리뷰로 잡을 수 있는 종류의 버그가 아니었습니다.`
|
||||
|
||||
불릿 어미 풀기: `~하면 검사에서 걸립니다` / `~실제로 해석해 봅니다` / `~같은 contract에서 뽑습니다` / `~하나 빠지면 컴파일이 안 됩니다`
|
||||
|
||||
### p.04 Dependency Direction — 애매
|
||||
- `사람 기억이 아니라 build에서` — "A가 아니라 B" 구문. 두 문서 합쳐 **6회** 나온다.
|
||||
- 불릿 3개가 전부 "실패"로 끝난다.
|
||||
- 그림 배너 `app-bootstrap은 구현체를 고르지만 application contract를 소유하지 않습니다`가 **p.05의 주제를 미리 말해버린다.** p.05 불릿에 같은 내용이 또 나온다.
|
||||
- 규칙을 넣고 **실제로 무슨 일이 일어났는지**가 없다. 도입 비용, 불편, 깨진 사례 전부 없음.
|
||||
|
||||
**대체**
|
||||
> H2: `module이 18개가 되자 의존 방향을 제가 더 이상 못 외웠습니다`
|
||||
> 본문: `module이 18개가 되자 의존 방향 하나 확인하려고 build.gradle.kts를 18번 열어야 했습니다. 지금은 허용 edge를 modules.json 한 파일에 적어 두고 ./gradlew check가 실제 project dependency와 대조합니다. 선언에 없는 edge가 생기면 build가 깨지니까, 이제 아무도 기억할 필요가 없습니다.`
|
||||
> 비용 한 줄 추가 [확인 필요]: `대신 module을 새로 만들 때마다 modules.json을 먼저 고쳐야 합니다.`
|
||||
|
||||
그림 배너는 p.05와 안 겹치게: `화살표는 항상 안쪽을 가리킵니다 — 이 그림과 다른 edge는 선언 자체가 안 됩니다`
|
||||
|
||||
### p.05 Contract Ownership — AI티 강함
|
||||
본문과 그림 배너가 **한 글자도 안 다른 문장**을 두 번 쓴다(원인 2 참조). 둘 중 하나를 지운다.
|
||||
|
||||
BEFORE(빨강)/AFTER(초록) 2단 도식이 p.03에 이어 **두 페이지 만에 재등장**한다. 색·배치·굵기까지 같다.
|
||||
|
||||
**대체**
|
||||
> `transport adapter를 손대는데 JPA adapter의 build 파일이 같이 열렸습니다. inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, adapter끼리 직접 참조하는 project dependency가 생겨 있었습니다.`
|
||||
|
||||
p.04 그림 배너와 겹치는 `app-bootstrap` 불릿은 여기서 삭제.
|
||||
|
||||
### p.06 Authentication 패턴 비교 — AI티 강함 + 사실 오류
|
||||
§1-1 참조. 그 외:
|
||||
- `이 표는 네 구조를 모두 구현해 본 실험 결과이고` — 이 문서에서 가장 무거운 주장인데 **링크도 repo도 코드 조각도 없다.** 면접에서 제일 먼저 찔린다. meta 줄에 repo 경로를 직접 넣어야 한다.
|
||||
- `브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다` — 교과서 대구문. 누가 써도 같은 문장이 나온다.
|
||||
|
||||
**대체**
|
||||
> `네 개를 다 짜 보고 나서 고른 기준은 "브라우저에 무엇이 남는가"였습니다. 브라우저에서 token을 치우면 그만큼 서버에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. TechLog에는 이 중 두 가지를 넣었습니다.`
|
||||
|
||||
### p.07 Authentication Modes — AI티 강함 (최악의 문장 포함)
|
||||
|
||||
> `공개 배포가 어느 mode로 떠 있는지는 **이 작업공간에서** 확인되지 않아 단정하지 않습니다.`
|
||||
|
||||
**"이 작업공간"은 사람의 어휘가 아니다.** 자기가 만든 서비스가 어느 모드로 떠 있는지 모르는 것도 이상하고, 그걸 "작업공간에서 확인되지 않아"라고 쓰는 건 더 이상하다. 읽는 사람은 여기서 AI 생성을 확신한다. **한 문장으로 저자가 누군지 자백한다.**
|
||||
|
||||
(이 문장은 이번 개편 이전 원본부터 있던 것이다.)
|
||||
|
||||
마지막 문단에 면책이 연달아 3개다: `단정하지 않습니다` + `비교 실험 범위이고` + `넣지 않았습니다`. 정직하려는 의도가 방어적 톤으로 굳었다.
|
||||
|
||||
**대체**
|
||||
> `repository 기본값과 제 로컬 .env는 모두 jwt입니다.` (뒤 절 통째로 삭제 — 공개 배포 모드는 확인해서 쓰거나 아예 언급하지 않는다)
|
||||
> 유지 비용 한 줄 [확인 필요]: `분기를 남겨둔 만큼 인증 관련 테스트는 두 mode로 각각 돌려야 합니다.`
|
||||
|
||||
`Forward-Auth는 비교 실험 범위이고…`는 p.06과 중복이므로 여기서 삭제.
|
||||
|
||||
p.06과 표 레이아웃이 동일하다(회색 라벨 열 + 컬러 헤더 + 흰 셀). 연속 두 페이지가 같은 표라 템플릿 인상이 가장 강해지는 구간이다.
|
||||
|
||||
### p.08 N+1 Baseline — 애매 (측정 조건은 사람 같음)
|
||||
`2,022`가 한 페이지에 5번. 차트와 표가 완전히 같은 데이터를 두 번 그린다.
|
||||
|
||||
빠진 것: **N=1,000이 어디서 왔는지.** 실제 목록 화면이 한 번에 1,000건을 열 일이 없다면 면접에서 바로 찔린다.
|
||||
|
||||
**대체**
|
||||
> ``loadFeed(0, 1000)`` 한 번에 PreparedStatement가 2,022개 나갔습니다. Hibernate Statistics로 뜯어보면 content 1, count 1, User ToOne 20, Page ToOne 1,000, Highlight collection 1,000. 앞의 22개는 고정이고 나머지 2,000개가 부모 행 수를 그대로 따라갑니다. 피드를 한 페이지 더 길게 뽑을 때마다 SQL이 그만큼 더 나간다는 뜻입니다.`
|
||||
> 각주: `측정 조건 — PostgreSQL 16(Testcontainers), 동일 JVM, warm cache, single thread. 7회 돌려 앞 2회는 JIT warm-up으로 버리고 남은 5회의 median / max만 적었습니다. 단일 스레드 값이라 동시 요청에서의 지연은 여기 없습니다.`
|
||||
|
||||
### p.09 Batch / Projection — AI티 강함
|
||||
숫자 4중 반복(H2 → 카드 4장 → 본문). 헤드라인·그림·본문을 차례로 읽으면 **세 번 같은 말을 듣는다.**
|
||||
|
||||
그림이 사실상 "숫자 4개를 박스에 넣은 것"인데 페이지의 40%를 차지한다. 내용이 없는데 자리가 큰 것 자체가 템플릿 티다.
|
||||
|
||||
`목록처럼 읽기만 하는 화면에만 적용했습니다` — **어느 화면인지 없다.** TechLog에 넣은 건지 Lab 안에서만 한 건지도 불분명하다.
|
||||
|
||||
**대체** (숫자 복창을 빼고 판단만)
|
||||
> `두 방법은 성격이 다릅니다. Batch Fetch는 기존 entity 코드를 한 줄도 안 건드립니다. 적용 비용이 거의 없는 대신 entity는 여전히 1,569개가 만들어집니다. Projection은 반대로 읽기 전용 DTO를 새로 짜야 하고, 그 대가로 entity load가 0이 됩니다. 수정 경로에서 쓰던 기능은 포기해야 하고요. 그래서 [어느] 화면에만 Projection을 넣었습니다.`
|
||||
|
||||
그림을 버리고 p.08 표에 행 2개를 붙이면 **p.08+p.09를 한 페이지로 합칠 수 있다.**
|
||||
|
||||
### p.10 Top-N & Index — AI티 강함 + 수치 불일치
|
||||
§1-2 참조. 그 외:
|
||||
- 왼쪽 1-2-3 스텝 박스는 SQL을 아는 독자에겐 자명한 설명이다. 지면 1/3을 교과서 설명에 쓴다. **`EXPLAIN (ANALYZE, BUFFERS)` 실제 출력 한 줄**(`Index Scan ... rows=3 loops=20`)로 바꾸면 손에 잡히는 디테일이 생긴다.
|
||||
- 그림에만 있는 `168 buffers / 0.336 ms`, `4,446 buffers / 5.472 ms`가 **본문에 한 번도 안 나온다.** 가장 극적인 증거를 본문이 "composite index가 있어서"라는 추상 명사구로 뭉갠다.
|
||||
|
||||
**대체**
|
||||
> `여기서 이긴 건 LATERAL이 아니라 (feed_item_id, created_at DESC) index입니다. 같은 SQL에서 이 index만 떨어뜨리자 계획이 Index Scan + Limit에서 Seq Scan으로 바뀌었습니다. 168 buffers · 0.336 ms가 4,446 buffers · 5.472 ms로. buffer 26배, 시간 16배입니다. 그래서 이 실험의 결론을 "Top-N엔 LATERAL"이 아니라 "Top-N을 쓰려면 index부터 확인"으로 적어 뒀습니다.`
|
||||
|
||||
### p.11 Pagination — 애매 + 정보 은폐 인상
|
||||
§1-3 참조. 그 외: **마지막 페이지인데 마무리가 없다.** 11페이지짜리 문서가 keyset 주의사항으로 끝난다. 읽는 사람이 "그래서 이 사람은?"에서 멈춘다.
|
||||
|
||||
**대체** (유보를 맨 뒤가 아니라 맨 앞으로 빼서 리듬을 바꾼다)
|
||||
> `그렇다고 Keyset이 공짜는 아닙니다. index를 뺀 채 같은 keyset query를 돌리니 읽은 row가 20에서 2,000으로, buffer가 1에서 141로 올라갔습니다. OFFSET과 정확히 같은 숫자입니다. 정렬 key가 흔들리지 않을 것, cursor로 이어 갈 화면일 것, 그 key를 덮는 index가 있을 것. 셋이 다 맞을 때만 20행짜리 막대가 나옵니다.`
|
||||
|
||||
마지막 `~것.` 체언 종결 3연타가 문서 전체에서 유일한 리듬이 된다.
|
||||
|
||||
이 페이지 하단에 **3~4줄짜리 닫는 말**을 추가한다(새 페이지 만들지 말 것).
|
||||
|
||||
---
|
||||
|
||||
## 4. 페이지별 — Infra / Platform
|
||||
|
||||
### p.01 표지 — AI티 강함
|
||||
- `장애를 직접 재현하고, **무엇이 끊기고 무엇이 남는지** 숫자로 확인했습니다`가 p.05 meta `재시작하면 **무엇이 끊기고 무엇이 남는가?**`와 같은 문형. 표지 카피와 내지 슬롯이 같은 틀에서 나왔다는 게 첫 장부터 드러난다.
|
||||
- hero 숫자 3개가 각각 p.05/p.06/p.09에 그대로 다시 나온다. 표지가 목차가 아니라 **요약 중복**이 됐다.
|
||||
|
||||
**대체** — hero 캡션을 결과 라벨이 아니라 '의외였던 점'으로
|
||||
> `K3s로 개인 서버에 home lab을 세워 두고, 인증·TLS·secret 경로에서 깨질 만한 곳을 하나씩 일부러 건드려 봤습니다. 아래 세 숫자는 그중 제가 예상과 제일 크게 어긋났던 것들입니다.`
|
||||
> `66 → 1,872 ms` — DB에 200 ms만 넣었는데 login이 28배가 됐습니다
|
||||
> `151 → 151` — 재시작해도 DB row는 안 줄었습니다 (줄어들 거라 생각했습니다)
|
||||
> `2,305 s → 1–2 s` — 갱신은 성공인데 옛 인증서가 38분 더 나가고 있었습니다
|
||||
|
||||
### p.02 Request Path — 애매
|
||||
결론에서 스스로 "단일 실패 지점"이라 말해 놓고 그에 대한 측정·대응이 문서 어디에도 없다. 실무자는 바로 "그래서 그게 죽으면?"이라고 묻는다. (p.09의 reload 무중단 8,856/8,856이 사실상 그 답인데 연결이 안 돼 있다.)
|
||||
|
||||
`정리했습니다`는 문서가 스스로를 서술하는 AI 습관.
|
||||
|
||||
**대체**
|
||||
> `문이 하나라 인증서와 forwarded header를 한 곳에서만 맞추면 되는 대신, Host Nginx가 죽거나 config를 잘못 밀면 전부 같이 죽습니다. reload만큼은 무중단인지 따로 재 봤고 결과는 08에 있습니다. 프로세스 자체가 죽는 경우는 아직 대비가 없습니다.`
|
||||
|
||||
### p.03 Edge Trust — AI티 강함
|
||||
불릿 5개가 전부 **설정값 나열**이다. `Host Nginx upstream: 127.0.0.1:30080`, `K3s NodePort bind: 127.0.0.0/8`… 이건 config를 붙여넣은 것이지 "제가 막았습니다"의 증거가 아니다. **설정은 문서 보고 누구나 쓴다.**
|
||||
|
||||
`Gitea / Grafana / metrics의 외부 우회 경로는 404` 한 줄만 유일한 검증 결과인데, 뭘 어떻게 쳐서 404를 봤는지가 없어 나머지 설정 줄과 구분이 안 된다.
|
||||
|
||||
**대체** — "설정"에서 "쳐 본 결과"로 전환 [모두 확인 필요]
|
||||
> - `LAN 안에서 192.168.0.x:30080으로 직접 붙어 봤더니 connection refused. NodePort를 127.0.0.0/8에만 bind해 둔 결과입니다.`
|
||||
> - `외부에서 X-Forwarded-For: 1.2.3.4를 붙여 보내도 Traefik access log에는 10.42.0.1이 찍힙니다. Host Nginx가 덮어쓰기 때문입니다.`
|
||||
> - `Gitea / Grafana / metrics 경로를 공인 도메인으로 쳤을 때 404.`
|
||||
|
||||
확인한 적이 없다면 그 불릿은 "설정했다"로 정직하게 낮추거나 빼는 게 낫다.
|
||||
|
||||
### p.04 Session State — 애매
|
||||
- `**replica를 늘리면 세션은 정말 유지되는가?**` — '정말'이 붙어 반문 톤까지 템플릿화됐다.
|
||||
- 그림 배너가 H2 + 본문의 **세 번째 반복**.
|
||||
- `다음 페이지에서 실제로 replica를 재시작해 어느 쪽이 남는지 확인했습니다` — 문서의 자기 서술이라 AI 목차 같다.
|
||||
- 근본 문제: **Keycloak 문서를 읽으면 아는 내용**이다. 본인 경험이 들어간 부분이 없다.
|
||||
|
||||
**대체** [확인 필요 — 실제로 오해했던 게 맞는지]
|
||||
> `처음엔 replica를 2개로 띄우면 JGroups가 세션을 복제해 주는 줄 알았습니다. 실제로는 persistent-user-sessions를 켠 쪽이 일을 하고 있었고, JGroups는 discovery와 transport만 맡습니다. durable state는 PostgreSQL에 있고, 각 replica가 따로 들고 있는 건 cache입니다.`
|
||||
|
||||
### p.05 Rolling Restart — AI티 강함
|
||||
`151 → 151`이 4번. **숫자만 있고 방법이 없다.** 151을 어떻게 셌는지, HTTP 200을 어떻게 확인했는지, 몇 번 반복했는지가 전부 빠졌다.
|
||||
|
||||
`Scope`는 붙어 있는데 같은 lab에서 한 p.06~p.08에는 없다 — **기준 불일치**.
|
||||
|
||||
**대체** [N 값은 확인 필요]
|
||||
> `kubectl rollout restart를 걸어 두고, 옆 터미널에서 [N초] 간격으로 login endpoint를 치면서 PostgreSQL의 session 테이블 row를 같이 세었습니다. 응답은 계속 200이었고 row는 151에서 움직이지 않았습니다. 재시작한 쪽 replica의 local cache만 0으로 떨어졌다가 다시 찼고, 재시작 전에 받아 둔 refresh token도 그대로 먹혔습니다.`
|
||||
> H2에서 숫자 빼기: `restart 중에 끊긴 건 replica cache뿐이었습니다`
|
||||
|
||||
### p.06 Latency Fault — 애매 (내용은 제일 좋은데 마감이 AI)
|
||||
- §1-4의 28배/20배 문제.
|
||||
- `이 실험의 결과입니다`로 문단을 라벨링하는 건 전형적 모델 마감.
|
||||
- 원인 규명이 얕다. `여러 번 일어나는 DB round trip` — 실무자는 즉시 "몇 번인데?"라고 묻는다. 1,872 / 200 ≈ 9회. **셀 수 있었던 숫자를 "여러 번"으로 남겼다.**
|
||||
- **지연 주입 도구가 없다.** `tc netem`인지 toxiproxy인지에 따라 해석이 달라진다.
|
||||
- `1,872 ms`가 평균인지 p95인지 최대인지 없음. `20 s`가 설정값인지 관측값인지 구분 안 됨.
|
||||
- **"그래서 뭘 바꿨나"가 없다.**
|
||||
|
||||
**대체** [N 값 전부 확인 필요]
|
||||
> `200 ms가 28배가 된 건 login 한 번에 DB를 [N]번 왕복하기 때문이었습니다. 왕복 횟수만큼 지연이 곱해지고, 느려진 요청이 connection을 붙잡으면서 뒤 요청은 pool에서 대기했습니다. 마지막엔 readiness probe가 [N초] timeout에 걸려 Pod 하나가 endpoint에서 빠졌는데, 그 결과 남은 Pod로 부하가 몰려 더 느려졌습니다. "DB가 조금 느린 것"과 "Pod가 빠지는 것"이 이렇게 짧게 이어져 있을 줄은 몰랐습니다.`
|
||||
|
||||
### p.07 Refresh Rotation — 애매
|
||||
그림 배너와 바로 아래 본문이 **같은 말**이다.
|
||||
|
||||
`error handling에서 이 둘을 구분해 재로그인으로 넘길지 판단해야 합니다` — **일반론으로 닫는 전형적 AI 마감.** 본인이 실제로 구분했는지는 안 적혀 있다.
|
||||
|
||||
숫자가 비었다. **5건 중 몇 건이 200이고 몇 건이 실패였는지가 그림에도 본문에도 없다.**
|
||||
|
||||
**대체** [분포·횟수·조치 전부 확인 필요]
|
||||
> `같은 refresh token R0으로 5건을 동시에 보냈습니다. [N]건은 200을 받았고 나머지는 [에러코드]였는데, 재사용이 감지된 순간 client session 자체가 무효가 돼서 방금 200으로 받아 둔 새 token R1도 다음 요청에서 거절당했습니다. 같은 요청을 순차로 [N]번 보냈을 때는 매번 정상이었습니다.`
|
||||
> 결론: `클라이언트가 병렬로 API를 때릴 때 401을 보고 동시에 refresh를 던지면 이 상황이 그대로 만들어집니다. "refresh 한 번 실패"라면 재시도하면 되지만 여기선 세션이 날아가 재로그인 말고는 답이 없습니다. [실제 조치 — 또는 "아직 안 고쳤습니다"]`
|
||||
|
||||
### p.08 JWKS Cache — 애매 (발견은 최고, 마무리가 없음)
|
||||
- `401 → 200 → 401 → 200 → 401 → 200 → 401 → 200` 8개를 다 나열하는 건 과시적이다. 정말 보여줄 거면 **그림이 시간축으로** 보여줘야 하는데, 지금 그림은 A=200 / B=401 정적 박스라 교차의 재미가 죽어 있다.
|
||||
- **"그래서 뭘 바꿨나"가 통째로 없다.** 문서에서 가장 흥미로운 발견인데 결론이 "봐야 설명됐습니다"로 끝난다.
|
||||
- **Nimbus JWKS cache TTL 값이 없다.** 이게 없으면 "언제 수렴했는가"에 답할 수 없다.
|
||||
|
||||
**대체** [TTL·수렴 시간·조치 확인 필요]
|
||||
> `realm에서 old signing key를 지운 직후, 같은 old access token으로 계속 요청했더니 401과 200이 [N]번 연속으로 번갈아 나왔습니다. 처음엔 Keycloak 쪽이 아직 키를 정리 중인 줄 알고 시간을 두고 다시 쳐 봤는데, 패턴이 랜덤이 아니라 정확히 한 번씩 번갈아 나오는 걸 보고 load balancer가 두 replica로 번갈아 보내고 있다는 걸 깨달았습니다. 검증은 Keycloak이 매번 해 주는 게 아니라 각 Resource Server replica가 자기 JWKS cache로 합니다. [N분] 뒤에는 양쪽 다 401로 수렴했습니다.`
|
||||
|
||||
**그림을 요청 순번 × 응답코드 시간축으로 바꾸면 이 페이지만 다른 리듬이 생긴다.**
|
||||
|
||||
### p.09 TLS Renewal — 애매 (유일한 실제 사고인데 그게 안 드러남)
|
||||
§2 원인 3 참조. 그 외:
|
||||
- `2,305 s` / `38분 25초`가 5번. 같은 값을 초와 분으로 번갈아 쓰며 반복한다.
|
||||
- 불릿 `p95 205.7 ms → 204.3 ms` — **0.7% 차이다. 1회 측정이면 노이즈다.** 이걸 개선처럼 굵게 쓰면 실무자는 "측정을 모르는구나"로 읽는다. 핵심은 8,856/8,856 무실패지 p95 소수점이 아니다.
|
||||
|
||||
**대체** — 발견 경위부터 [경위·기간·도구 확인 필요]
|
||||
> `[언제/어떤 계기로] 인증서 만료일이 이상한 걸 보고 openssl s_client로 실제 serving되는 인증서를 확인했더니, 파일 시스템의 certificate는 이미 갱신돼 있는데 Nginx가 내보내는 건 옛날 것이었습니다. certbot timer는 매번 성공하고 있었고, 빠진 건 renew 후에 reload를 걸어 주는 deploy hook이었습니다.`
|
||||
|
||||
p95 소수점 비교는 삭제하거나 "차이 없음"으로 쓴다.
|
||||
|
||||
**이 페이지는 형식을 통째로 바꿀 것.** 제목 → 굵은 문장 → 그림 틀을 버리고 **시간순 타임라인**으로: 언제 이상함을 느꼈고 → 뭘 쳐 봤고 → 뭘 의심했다가 아니었고 → 원인이 뭐였고 → 뭘 붙였고 → 그 뒤로 어떤지.
|
||||
|
||||
### p.10 Vault Secret Delivery — AI티 강함
|
||||
**측정이 하나도 없다.** 전부 구성 설명이고, VSO README를 읽으면 쓸 수 있는 문장들이다.
|
||||
|
||||
`여기서는 전달 경로까지만 이야기합니다` — 문서가 스스로 범위를 선언하는 모델 특유의 어법. 이 문장 때문에 "측정 안 했다"가 겸손이 아니라 방어로 읽힌다.
|
||||
|
||||
그림 배너 = H2 + 본문 마지막 문장의 **세 번째 반복**. 한 페이지에서 같은 명제를 세 번 말한다.
|
||||
|
||||
**대체** [VSO로 옮긴 경위가 맞는지 확인 필요]
|
||||
> `처음엔 각 workload가 Vault에 직접 붙게 했는데, 앱마다 Vault 주소와 token 수명을 신경 써야 해서 금방 관리가 안 됐습니다. 지금은 Vault와 직접 말하는 주체를 Vault Secrets Operator 하나로 줄였습니다. VSO가 자기 ServiceAccount token으로 Kubernetes Auth를 통과하고, policy와 role이 읽을 수 있는 path를 정하고, 그 결과만 Kubernetes Secret으로 내려옵니다. 앱 입장에서는 그냥 env와 volume입니다.`
|
||||
> 마지막: `manual unseal이라 서버를 재부팅하면 제가 직접 열어 줘야 하고, secret을 바꿨을 때 Pod가 언제 새 값을 보는지는 아직 안 재 봤습니다.`
|
||||
|
||||
### p.11 Observability — AI티 강함
|
||||
- **숫자가 하나도 없는 유일한 페이지**이고 문서가 여기서 끝난다. 측정 없는 구성도 두 장(p.10, p.11)이 연속으로 마지막을 차지해 마무리 인상이 제일 약하다.
|
||||
- `네 신호를 한 덩어리로 다루면 "어디를 봐야 하는가"에 답할 수 없습니다` — **가상의 반대 입장을 세우고 논박하는 전형적 AI 도입부.** 아무도 그러자고 하지 않았다.
|
||||
- `request id 같은 공통 key를 각 신호에 같이 실어야 합니다` — 교과서 결론. **본인이 실제로 했는지가 없다.**
|
||||
- 결정적으로: **앞의 p.05~p.09 실험들이 이 스택으로 관측됐는지가 안 적혀 있다.** 연결되면 이 페이지가 살고, 안 되면 장식이다.
|
||||
|
||||
**대체** [실제 관측 여부 확인 필요]
|
||||
> `앞의 실험들에서 login이 느려진 걸 알아챈 건 Grafana 대시보드였고, 어느 Pod가 endpoint에서 빠졌는지는 Loki에서 봤습니다. 네 신호는 수집 방식부터 다릅니다. Prometheus는 target을 직접 긁어 가고(pull), log와 trace는 소스가 Alloy로 밀어 넣습니다(push).`
|
||||
> 마지막: `다만 지금 구성으로는 같은 요청을 metric에서 log로, log에서 trace로 따라가는 게 안 됩니다. request id 같은 공통 key를 세 신호에 같이 실어야 하는데 아직 안 했습니다.`
|
||||
|
||||
---
|
||||
|
||||
## 5. 변형본 2종 — 지금은 의미가 없다
|
||||
|
||||
기계적으로 확인했다.
|
||||
|
||||
- `product.json`과 `performance.json`의 `sections` 배열은 **원소가 완전히 동일한 10개**이고 순서만 회전시킨 것이다.
|
||||
- 두 산출물의 본문 10개 섹션을 섹션 번호만 떼고 비교하면 **사실상 완전 일치**한다.
|
||||
- 두 커버의 구조도 동일: `H1 → H2 → 인용 → 3칸 지표 → 스택 → 연락처`. H1 문자열("강동현 · Backend Engineer")까지 같다.
|
||||
|
||||
두 PDF를 나란히 본 사람은 "두 벌을 준비했구나"가 아니라 **"같은 파일을 자동 생성기로 두 번 뽑았구나"**를 본다.
|
||||
|
||||
성능형으로서의 추가 결함:
|
||||
|
||||
1. **본문 톤이 제품형과 100% 같다.** EXPLAIN 계획 페이지와 Gradle module 그래프 페이지가 같은 골격, 같은 문장 길이, 같은 종결어미, 같은 "단서로 닫기"를 쓴다. 사람이라면 쿼리 계획 얘기를 할 때 훨씬 조밀해지고 출력을 그대로 붙여 넣는다. 그 차이가 0이다.
|
||||
2. **성능형인데 성능 지면이 40%다.** 11쪽 중 4쪽만 성능이다.
|
||||
3. 그 4쪽의 출처가 전부 **"별도 멘토링 과제"**로 네 번 명시돼 있다. 성능 리뷰어가 첫 4쪽에서 읽는 메시지는 "이 사람의 대표 성능 증거는 과제물"이다.
|
||||
4. **실무 성능 지표가 하나도 없다.** 동시성, p95/p99, throughput, connection pool, GC/JVM, 캐시 적중률, 실트래픽 — 전부 없다. 모두 single thread · warm cache · Testcontainers 마이크로 측정이다. 수치는 정확하지만 성능 엔지니어가 찾는 축이 아니다.
|
||||
|
||||
**선택지 (우선순위 순)**
|
||||
|
||||
1. **본문도 가른다.** 같은 섹션이라도 성능형에서는 계획/버퍼/측정 조건을 한 단계 더 파고, 제품형에서는 "사용자에게 뭐가 달라졌나"로 줄인다. 지금처럼 배열만 회전시키는 빌드로는 불가능하고, `perf-*.md`에 variant를 두거나 섹션 안에 variant 블록이 필요하다.
|
||||
2. **섹션 수를 다르게.** 성능형은 성능 6~7쪽 + 아키텍처 3쪽, 제품형은 반대. 지금은 10/10으로 같다.
|
||||
3. **성능형에 "실제 서비스에 적용한 것" 한 쪽을 반드시 넣는다.** TechLog에서 Projection이나 Keyset을 실제로 쓰고 있다면 그 쪽이 성능형의 1번 섹션이 되어야 한다. [적용 여부 확인 필요]
|
||||
4. **커버 틀을 다르게.** 성능형은 3칸 지표 대신 before/after 표 + 측정 조건 한 줄로.
|
||||
5. **위가 전부 어렵다면 2종을 없애고 1종으로 간다. 커버만 바꾼 두 벌은 한 벌보다 나쁘다.**
|
||||
|
||||
---
|
||||
|
||||
## 6. 구조 처방
|
||||
|
||||
### 덜어낼 것
|
||||
|
||||
| # | 대상 | 효과 |
|
||||
|---|---|---|
|
||||
| 1 | Backend p.08 + p.09 병합 (숫자 박스 그림 삭제, 표에 2행 추가) | 11 → 10p |
|
||||
| 2 | Infra p.04 + p.05 병합 (결론이 같은 명제 하나) | 11 → 10p, `151 → 151` 4중 반복도 해소 |
|
||||
| 3 | 그림 하단 굵은 컬러 배너 — Backend 2개, Infra 5개 삭제 | 본문 재진술 제거 |
|
||||
| 4 | meta 질문 줄 20개 → 문서당 3개 이하 | 최대 원인 제거 |
|
||||
| 5 | Backend p.08 차트 또는 표 중 하나 | 같은 데이터 2회 그리기 해소 |
|
||||
| 6 | `·` 구분자 사용을 절반으로 | 제목·meta·스택·불릿·각주가 전부 같은 리듬 |
|
||||
|
||||
### 변주를 줄 곳
|
||||
|
||||
- **Backend p.03**을 "사건 기록" 형식으로 단독 변형. 시간순 3단(증상 → 오진 → 원인) + `decisions#{slug}` 대 `decisions/{slug}` 대조만 크게. **한 장이라도 골격이 다르면 나머지가 "템플릿"으로 안 읽힌다.**
|
||||
- **Backend p.07을 코드 페이지로.** 표 대신 `SecurityConfig` 분기 실제 코드 10~15줄. **지금 이 문서에는 코드 블록이 한 개도 없다.** 백엔드 포트폴리오에 코드가 0줄인 것 자체가 부자연스럽다. p.06과 표 레이아웃이 겹치는 문제도 자동 해결된다.
|
||||
- **Infra p.09(TLS)**를 타임라인 형식으로 (§4 참조).
|
||||
- **Infra p.08(JWKS)** 그림을 시간축으로.
|
||||
- **그림 없는 페이지를 2~3장 만든다.** 22/22가 도식이라 균일함의 가장 큰 원인이다. 실무자는 예쁜 SVG보다 **진짜 터미널 출력 한 조각**을 믿는다.
|
||||
- **TechLog와 Performance Lab의 시각 언어를 나눈다.** 지금은 같은 팔레트·같은 카드라 "별도 멘토링 과제"라는 사실이 글로만 있고 눈에 안 보인다.
|
||||
- **`Scope` 규칙을 하나로.** 지금 Infra 3페이지에만 있다. 표지에 한 번만 쓰고 내지에서 전부 빼거나, 측정 결과가 있는 모든 페이지에 붙이거나 — 둘 중 하나. 지금처럼 들쭉날쭉하면 "면피 문구를 슬롯에 끼웠다"로 보인다.
|
||||
- **"안 한 것 / 되돌린 것" 블록을 최소 2페이지에 추가.** 새 페이지를 만들지 말고 기존 페이지 하단에 2~3줄로.
|
||||
- **표지에 본인 한 줄 추가.** 지금 표지에는 문제만 있고 사람이 없다.
|
||||
|
||||
---
|
||||
|
||||
## 7. 문체 규칙 (검사 가능한 형태)
|
||||
|
||||
앞으로 이 문서를 고칠 때 지킨다. 전부 `grep`이나 스크립트로 셀 수 있다.
|
||||
|
||||
| # | 규칙 | 현재 |
|
||||
|---|---|---|
|
||||
| 1 | 한 페이지 안에서 `~습니다` 종결 **3개 연속 금지** | Backend 95%, Infra 87% |
|
||||
| 2 | 한 페이지에 **15자 이하 문장 최소 1개** | Backend 0개, Infra 1개 |
|
||||
| 3 | h2 11개 중 과거형 `~았/었/했습니다` 종결 **최대 6개**. 같은 동사가 h2에 두 번 나오면 하나 교체 | 10/11이 `~습니다`, "비교했습니다" 2회 |
|
||||
| 4 | meta 질문의 `~는가?`/`~인가?` 어미 **문서당 최대 2개** | 10/10 |
|
||||
| 5 | `A는 X이고, B는 Y입니다` 정통 대구 **문서당 3회 이하** | 5회 |
|
||||
| 6 | `A가 아니라 B` / `~하지 않고 ~만` 뒤집기 **문서당 3회 이하** | 두 문서 합 6회 |
|
||||
| 7 | "단, 이 조건에서만" 유보로 문단을 닫는 섹션 **10개 중 4개 이하**. 필요하면 문단 **맨 앞**이나 각주로 위치를 옮김 | 6개 |
|
||||
| 8 | **그림 안의 수치는 본문 문장에도 최소 1회 등장** | Backend p.10의 `4,446 buffers`, p.11의 `Keyset − index`가 본문 0회 |
|
||||
| 9 | 섹션마다 **도구/명령어/파일명이 그대로 박힌 문장 최소 1개** (`EXPLAIN (ANALYZE, BUFFERS)`, `./gradlew check`, `modules.json`, `kubectl rollout restart`, `openssl s_client`) | 추상명사가 대신 자리를 차지 |
|
||||
| 10 | **섹션 골격 최소 3종**, 같은 골격이 문서당 5개를 넘지 않게 | 10/10 동일 |
|
||||
| 11 | `같은 X` 표현 **문서당 8회 이하** | Backend 12회 |
|
||||
| 12 | `이 작업공간`, `~까지만 이야기합니다`, `정리했습니다` 같은 **문서가 자기를 서술하는 표현 금지** | 각 1회 이상 |
|
||||
|
||||
규칙 1·2·6·7·10만 적용해도 체감이 크게 달라진다.
|
||||
|
||||
---
|
||||
|
||||
## 8. 본인에게 물어봐야 할 것
|
||||
|
||||
이 답들이 없으면 위 대체 문장의 `[확인 필요]`를 채울 수 없다. **8번 하나가 지금의 22페이지보다 사람 냄새를 더 낼 가능성이 높다.**
|
||||
|
||||
1. **Backend p.10의 `204 buffers · 0.323 ms`와 `168 buffers · 0.336 ms`는 같은 측정인가, 다른 측정인가?** (다르면 조건을 명시, 같으면 하나가 틀린 수치다)
|
||||
2. **Infra p.09 인증서 건, 처음에 어떻게 알아챘나?** 브라우저 경고인지, 만료 알림 메일인지, 우연히 `openssl s_client`를 쳐 본 건지. 그 상태로 며칠/몇 주가 지나 있었나?
|
||||
3. **각 실험에서 실제로 친 명령어는?** session row를 센 SQL, 응답 확인용 curl 루프, 지연 주입 도구(`tc netem`/toxiproxy), 부하 도구(hey/k6/ab)와 RPS·지속 시간.
|
||||
4. **각 실험은 몇 번 반복했고, 제시한 숫자는 평균인가 p95인가 단일 측정인가?** 특히 `1,872 ms`, `22.2 s`, `p95 205.7 ms`.
|
||||
5. **초안이 공개되던 문제는 언제, 어떻게 알았나?** 404 사건에서 **처음 의심한 곳은 어디였고 그게 틀렸나?** 몇 개 글이 영향받았고 원인 찾는 데 얼마나 걸렸나?
|
||||
6. **인증 4패턴 구현 repo는 어디인가?** BFF와 Forward-Auth를 TechLog에 안 넣은 이유는? 넣었다 뺀 건가, 처음부터 안 넣었나? **`jwt`와 `redis-session`을 지금도 둘 다 유지하는 이유는?** 공개 배포는 어느 쪽인가?
|
||||
7. **Feed Query Lab의 N=1,000은 어디서 나온 숫자인가?** 실제 TechLog 목록은 한 번에 몇 건을 여나? **Batch와 Projection 중 실제 제품에 들어간 건 어느 쪽이고 어느 화면인가?**
|
||||
8. **시도했다가 실패했거나 되돌린 작업이 있나?** 멘토링 과제에서 멘토에게 들은 지적 중 뼈아팠던 것은?
|
||||
9. **Infra p.11: 앞의 실험들(p.05~p.09)을 실제로 이 Grafana/Loki/Tempo로 관측했나?** 실제로 울린 alert가 한 번이라도 있나?
|
||||
10. **Infra p.03: LAN 우회 경로 차단과 404를 실제로 쳐서 확인했나?**
|
||||
|
||||
---
|
||||
|
||||
## 9. 작업 순서
|
||||
|
||||
**1차 — 신뢰 (질문 없이 지금 가능)**
|
||||
§1의 네 건. Backend p.06 축 개수, p.10 두 측정 구분, p.11 세 번째 불릿, Infra p.06 28배. 사실 오류가 남아 있으면 나머지 작업이 무의미하다.
|
||||
|
||||
**2차 — 중복 제거 (질문 없이 지금 가능)**
|
||||
그림 하단 배너 7개 삭제, meta 질문 20 → 6, 수치 3중·4중·5중 반복 정리, Backend p.08+p.09 병합, Infra p.04+p.05 병합. **여기까지만 해도 AI 티의 절반이 빠진다.**
|
||||
|
||||
**3차 — 골격 변주 (질문 없이 지금 가능)**
|
||||
Backend p.03 사건 기록형, Backend p.07 코드 페이지, Infra p.09 타임라인, Infra p.08 시간축 그림, 그림 없는 페이지 2~3장.
|
||||
|
||||
**4차 — 사람 넣기 (§8 답변 필요)**
|
||||
발견 경위, 틀린 가설, 실제 명령어, "그래서 뭘 바꿨나", 실패·되돌린 것. **이게 본체다.** 1~3차는 AI 티를 빼는 작업이고, 4차만이 사람을 넣는 작업이다.
|
||||
|
||||
**5차 — 문체 (§7 규칙 적용)**
|
||||
마지막에 일괄. 규칙 1·2·6·7·10 우선.
|
||||
|
||||
---
|
||||
|
||||
## 10. 한 줄 총평
|
||||
|
||||
수치 정확도와 검증 태도, 용어 일관성은 상위권이다. **AI 티의 원인은 내용이 아니라 균질성이다.** 종결어미 95%가 한 형태, 섹션 골격 10/10 동일, meta 질문 어미 20/20 동일, 커버 두 장 골격 동일, 본문 두 변형본 간 완전 동일.
|
||||
|
||||
정직함(Scope 명시, "측정하지 않았다"는 고백)은 이 문서의 진짜 강점이다. 문제는 **그 정직함조차 매 페이지 같은 자리에 같은 모양으로 박혀 있어서 규칙처럼 보인다**는 점이다.
|
||||
|
||||
문장을 다시 쓰는 것보다 **템플릿을 깨는 것**이 먼저다.
|
||||
@@ -1,42 +1,63 @@
|
||||
# Resume & Portfolio
|
||||
|
||||
같은 실제 경험을 기반으로 **이력서 2개와 포트폴리오 1개**를 함께 관리합니다. 이력서는 직무별 강조점을 달리하고, 포트폴리오는 대표 문제 해결 사례를 더 깊게 설명합니다.
|
||||
같은 실제 경험을 기반으로 **이력서 2개 + 포트폴리오 3개**를 관리합니다.
|
||||
|
||||
## 이력서
|
||||
|
||||
| 파일 | 대상 공고 | 강조 |
|
||||
|---|---|---|
|
||||
| [01-java-spring-backend.feat.google-version.md](./01-java-spring-backend.feat.google-version.md) | Java / Spring 백엔드 | TechLog · Clean Architecture · Keycloak 인증 경계 · N+1 / 조회 전략 |
|
||||
| [02-platform-devops-backend.feat.google-version.md](./02-platform-devops-backend.feat.google-version.md) | Platform / Infra 친화 백엔드 | K3s · Nginx / Traefik · Vault / VSO · Keycloak multi-node · Observability |
|
||||
| [portfolio.md](./portfolio.md) | Backend / Platform 포트폴리오 | TechLog · 인증 경계 · 조회 성능 · Home Platform의 문제 해결 과정 |
|
||||
| [01-java-spring-backend.feat.google-version.md](./01-java-spring-backend.feat.google-version.md) | Java / Spring 백엔드 | 애플리케이션 경계 · 인증 · 조회 성능 |
|
||||
| [02-platform-devops-backend.feat.google-version.md](./02-platform-devops-backend.feat.google-version.md) | Platform / Infra 친화 백엔드 | K3s · Nginx / Traefik · Keycloak · Vault |
|
||||
|
||||
이력서는 기존 Google-style의 **짧고 빠르게 읽히는 2페이지 구조**를 유지합니다.
|
||||
|
||||
## 포트폴리오
|
||||
|
||||
| 파일 | 지원 직무 | 현재 페이지 | 전면에 두는 경험 |
|
||||
|---|---|---:|---|
|
||||
| [01-backend-portfolio.md](./01-backend-portfolio.md) | Java / Spring 백엔드 · 제품/아키텍처 우선 | 11 | TechLog publication · contract · dependency · auth → 별도 Performance Lab 4p |
|
||||
| [01-backend-performance-portfolio.md](./01-backend-performance-portfolio.md) | Java / Spring 백엔드 · 성능 우선 | 11 | 별도 Feed Query Performance Lab → TechLog 제품/아키텍처 |
|
||||
| [02-infra-platform-portfolio.md](./02-infra-platform-portfolio.md) | Infra / Platform | 11 | Request Path · Keycloak state/fault · TLS Renewal · Vault · Observability |
|
||||
|
||||
포트폴리오는 페이지 수를 먼저 제한하지 않습니다.
|
||||
대신 **한 페이지 = 한 문제 또는 한 실험**을 원칙으로 두고, 다음 순서를 우선합니다.
|
||||
|
||||
1. 문제를 재현한 조건
|
||||
2. 비교한 선택지
|
||||
3. 실제 측정값 / 실행계획 / 장애 결과
|
||||
4. 그 결과로 바뀐 판단
|
||||
5. 적용 범위와 아직 검증하지 않은 범위
|
||||
|
||||
단순 기술 나열이나 큰 숫자 카드만으로 성과를 표현하지 않습니다. 숫자는 가능하면 **그래프·표·실행계획 비교**와 함께 보여줍니다.
|
||||
|
||||
## 대표 실측
|
||||
|
||||
### Backend
|
||||
|
||||
- TechLog backend **18-module registry** + Gradle dependency gate + ArchUnit 검증
|
||||
- N=1,000 feed 조회: PreparedStatement **2,022 → 23**
|
||||
- 읽기 전용 Projection: entity load **1,569 → 0**
|
||||
- Top-3: Window **1.552 ms / 430 buffers** vs LATERAL **0.323 ms / 204 buffers**
|
||||
- 같은 LATERAL에서 composite index 제거: buffers **168 → 4,446**, exec **0.336 → 5.472 ms**
|
||||
- deep pagination: OFFSET **2,000 rows / 141 buffers / 0.996 ms** vs Keyset **20 rows / 1 buffer / 0.076 ms**
|
||||
|
||||
### Platform / Infra
|
||||
|
||||
- Keycloak latency fault: **66 ms → 1,872 ms**, 동시 20건 최대 **22.2 s**
|
||||
- rolling restart: DB session row **151 → 151**, local cache는 0으로 초기화
|
||||
- JWKS cache: old token 8회 요청이 **401 / 200 교차**
|
||||
- TLS renewal → serving gap: **2,305 s → 1–2 s**
|
||||
- manual Nginx reload: **8,856 / 8,856 HTTP 200**, p95 **205.7 → 204.3 ms**
|
||||
|
||||
## 작성 원칙
|
||||
|
||||
- PDF 출력 기준 2 페이지 안팎
|
||||
- 단순 기술 나열보다 **문제의 출발점 → 어려웠던 점 → 판단 → 결과**가 먼저 보이게 작성
|
||||
- “몇 번 실험했다” 같은 내부 작업량 수치는 이력서 핵심 성과로 사용하지 않음
|
||||
- local / home lab 결과를 운영 경험처럼 표현하지 않음
|
||||
- local / home lab 결과를 운영 경험이나 production HA 경험으로 확대하지 않음
|
||||
- 성능 수치는 측정 조건을 함께 표시
|
||||
- 아직 확인하지 못한 영역은 완료된 성과와 구분
|
||||
- 실제 결과 서비스 링크를 함께 제공: [hyeonworks.com](https://hyeonworks.com)
|
||||
|
||||
## 주요 경험
|
||||
|
||||
### Backend
|
||||
- TechLog: 기록이 늘어나며 맥락을 다시 찾기 어려운 문제를 서비스로 해결
|
||||
- 현재 backend 18-module registry 기반 dependency / runtime membership 검증
|
||||
- Studio Create / Save / Validate / Preview / Publish 흐름
|
||||
- Keycloak SPA / Token Mediator / BFF / Forward-Auth 구조를 credential ownership 관점에서 비교
|
||||
- Keycloak 26 multi-node에서 persistent session이 공유 PostgreSQL 조회에 의존하는 경로 확인
|
||||
- Feed 조회에서 N=1,000 기준 PreparedStatement 2,022 → 23
|
||||
- Window / LATERAL / Keyset pagination을 실제 PostgreSQL plan으로 비교
|
||||
|
||||
### Platform / Infra
|
||||
- Host Nginx → loopback NodePort → Traefik → Kubernetes Service 요청 경로
|
||||
- Nginx TLS termination 및 Forwarded Header trust boundary 구성
|
||||
- CloudNativePG / PostgreSQL, Keycloak, Local PV, NetworkPolicy
|
||||
- Vault KV-v2 → VSO → Kubernetes Secret → workload
|
||||
- 2-node K3s에서 Keycloak session / DB / network / refresh 경쟁 조건 확인
|
||||
- Prometheus / Grafana / Loki / Tempo / Blackbox 기반 관측성 구성
|
||||
- 현재 Vault lab은 single replica / file storage 구성
|
||||
- 직접 측정값과 파생값을 구분
|
||||
- 한 번의 결과보다 조건을 바꿨을 때 결론이 유지되는지 확인
|
||||
- “몇 번 실험했다” 같은 내부 작업량은 성과로 사용하지 않음
|
||||
- 아직 확인하지 않은 영역은 완료된 성과와 분리
|
||||
- 결과 서비스 링크: [hyeonworks.com](https://hyeonworks.com)
|
||||
|
||||
## 근거
|
||||
|
||||
@@ -50,12 +71,37 @@
|
||||
- `/shared/codebase/tech-log-frontend`
|
||||
- `/shared/codebase/project-infra`
|
||||
|
||||
## PDF 생성
|
||||
## Backend 포트폴리오 조립 구조
|
||||
|
||||
Backend 두 버전은 본문을 복사하지 않습니다. `portfolio/backend/sections/`의 공통 section을 `profiles/product.json`, `profiles/performance.json` 순서로 조립합니다. 두 버전은 같은 section 집합을 쓰고 순서만 다릅니다.
|
||||
|
||||
## 레이아웃
|
||||
|
||||
`scripts/md-to-pdf.mjs`는 `<h1>`마다 `.page` 컨테이너를 만들고, `portfolio.css`에서 이 컨테이너를 높이 148mm(= 콘텐츠 박스)의 flex column으로 둡니다. figure가 그 안에서 유일하게 늘어나는 요소이므로, 페이지 텍스트가 쓰고 남은 세로 공간을 그림이 그대로 가져갑니다.
|
||||
|
||||
- 페이지 넘침이 구조적으로 발생하지 않습니다. section 수 = PDF 페이지 수입니다.
|
||||
- 그림 크기를 mm로 지정하지 않습니다. 대신 SVG의 viewBox 비율이 렌더 크기를 정합니다.
|
||||
`렌더 높이(mm) = viewBox height / viewBox width × 269`
|
||||
- 폭이 269mm로 꽉 찰 때 1260 단위 viewBox는 **1 unit = 0.605pt**입니다. 본문(9.15pt)과 비슷하게 읽히려면 그림 안 라벨을 15 단위 이상으로 둡니다.
|
||||
- 이미지 alt는 캡션으로 쓰입니다. 크기 접두어(`WIDE ·` 등)만 두고 비우면 figcaption을 만들지 않습니다. 그림이 이미 결론 문장을 갖고 있으면 캡션을 비웁니다.
|
||||
|
||||
## 생성
|
||||
|
||||
```bash
|
||||
# 이력서
|
||||
npm run pdf -- 01-java-spring-backend.feat.google-version.md
|
||||
npm run pdf -- 02-platform-devops-backend.feat.google-version.md
|
||||
npm run portfolio
|
||||
|
||||
# 포트폴리오
|
||||
npm run portfolio:backend # 제품/아키텍처 우선
|
||||
npm run portfolio:backend-performance # 성능 우선
|
||||
npm run portfolio:infra
|
||||
npm run portfolio:all
|
||||
```
|
||||
|
||||
출력은 `dist/`에 HTML / PDF로 생성됩니다.
|
||||
출력:
|
||||
- `dist/01-java-spring-backend.feat.google-version.pdf`
|
||||
- `dist/02-platform-devops-backend.feat.google-version.pdf`
|
||||
- `dist/01-backend-portfolio.pdf`
|
||||
- `dist/01-backend-performance-portfolio.pdf`
|
||||
- `dist/02-infra-platform-portfolio.pdf`
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<line x1="630" y1="40" x2="630" y2="410" stroke="#64748b" stroke-width="1.6" stroke-dasharray="7 7"/>
|
||||
<text x="315" y="58" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#b91c1c">BEFORE · adapter가 adapter를 참조</text>
|
||||
<rect x="50" y="150" width="240" height="100" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="170.0" y="196.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Inbound adapter</text>
|
||||
<text x="170.0" y="220.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">interface 선언</text>
|
||||
<rect x="340" y="150" width="240" height="100" rx="12" fill="#fef2f2" stroke="#b91c1c" stroke-width="2.5"/>
|
||||
<text x="460.0" y="196.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Outbound adapter</text>
|
||||
<text x="460.0" y="220.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">그 타입을 구현</text>
|
||||
<line x1="336" y1="200" x2="296" y2="200" stroke="#b91c1c" stroke-width="3" marker-end="url(#r)"/>
|
||||
<text x="315" y="300" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#b91c1c">outer adapter끼리 직접 참조하는 project dependency</text>
|
||||
<text x="315" y="332" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">transport 하나를 바꾸면 저장소 adapter까지 같이 열어야 함</text>
|
||||
<text x="945" y="58" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#0f766e">AFTER · application이 port를 소유</text>
|
||||
<rect x="790" y="96" width="300" height="96" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="940.0" y="140.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#17212b">Application / shared-contract</text>
|
||||
<text x="940.0" y="164.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">port 선언</text>
|
||||
<rect x="676" y="268" width="184" height="96" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="768.0" y="312.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Inbound adapter</text>
|
||||
<text x="768.0" y="335.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">port 호출</text>
|
||||
<rect x="1010" y="268" width="184" height="96" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="1102.0" y="312.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Outbound adapter</text>
|
||||
<text x="1102.0" y="335.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">port 구현</text>
|
||||
<path d="M768 268 V232 H860 V196" fill="none" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<path d="M1102 268 V232 H1020 V196" fill="none" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<text x="945" y="400" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">adapter는 서로를 모르고 application port만 구현합니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,29 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="330" y="30" width="830" height="66" rx="12" fill="#fff7ed" stroke="#d97706" stroke-width="2.5"/>
|
||||
<text x="745.0" y="59.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Domain core</text>
|
||||
<text x="745.0" y="83.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">framework dependency 0</text>
|
||||
<rect x="330" y="134" width="830" height="66" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="745.0" y="163.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Application core</text>
|
||||
<text x="745.0" y="187.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">use case · inbound / outbound port 소유</text>
|
||||
<rect x="330" y="238" width="405" height="66" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="532.5" y="267.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Inbound adapter</text>
|
||||
<text x="532.5" y="291.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">web · gRPC · GraphQL · WebSocket</text>
|
||||
<rect x="755" y="238" width="405" height="66" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="957.5" y="267.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Outbound adapter</text>
|
||||
<text x="957.5" y="291.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">JPA · Redis · HTTP · messaging</text>
|
||||
<rect x="330" y="342" width="830" height="66" rx="12" fill="#f6f8fa" stroke="#17212b" stroke-width="2.5"/>
|
||||
<text x="745.0" y="371.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">app-bootstrap</text>
|
||||
<text x="745.0" y="395.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">구현체 선택과 runtime 조립만 담당</text>
|
||||
<line x1="745.0" y1="134" x2="745.0" y2="100" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="532" y1="238" x2="532" y2="204" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="957" y1="238" x2="957" y2="204" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="532" y1="342" x2="532" y2="308" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="957" y1="342" x2="957" y2="308" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="150" y1="408" x2="150" y2="40" stroke="#0f766e" stroke-width="3.5" marker-end="url(#t)"/>
|
||||
<text x="118" y="224" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#0f766e" transform="rotate(-90 118 224)">허용된 의존 방향</text>
|
||||
<text x="230" y="63" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">안쪽</text>
|
||||
<text x="230" y="381" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">바깥쪽</text>
|
||||
<text x="745.0" y="437" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">app-bootstrap은 구현체를 고르지만 application contract를 소유하지 않습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,36 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1320" height="410" viewBox="0 0 1320 410">
|
||||
<rect width="1320" height="410" fill="white"/>
|
||||
<text x="40" y="44" font-family="Noto Sans CJK KR,Arial" font-size="25" font-weight="700" fill="#1f2937">Forwarded-header trust boundary</text>
|
||||
<text x="40" y="73" font-family="Noto Sans CJK KR,Arial" font-size="14" fill="#64748b">외부 입력을 신뢰하는 대신, trusted value가 만들어지는 hop을 하나로 고정</text>
|
||||
<rect x="40" y="125" width="230" height="160" rx="14" fill="#f2f8f7" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="155.0" y="167" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="18" font-weight="700" fill="#1f2937">External client</text>
|
||||
<text x="155.0" y="197" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#0f766e">Host / X-Forwarded-*</text>
|
||||
<text x="155.0" y="227" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">untrusted input</text>
|
||||
<rect x="325" y="105" width="245" height="200" rx="14" fill="#f2f8f7" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="447.5" y="147" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="18" font-weight="700" fill="#1f2937">Host Nginx</text>
|
||||
<text x="447.5" y="177" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#0f766e">unknown SNI reject</text>
|
||||
<text x="447.5" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">admin allowlist</text>
|
||||
<text x="447.5" y="237" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">header overwrite</text>
|
||||
<rect x="625" y="125" width="205" height="160" rx="14" fill="#f2f8f7" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="727.5" y="167" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="18" font-weight="700" fill="#1f2937">Loopback NodePort</text>
|
||||
<text x="727.5" y="197" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#0f766e">127.0.0.1:30080</text>
|
||||
<text x="727.5" y="227" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">LAN direct path blocked</text>
|
||||
<rect x="885" y="105" width="210" height="200" rx="14" fill="#f2f8f7" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="990.0" y="147" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="18" font-weight="700" fill="#1f2937">Traefik</text>
|
||||
<text x="990.0" y="177" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#0f766e">trusted source</text>
|
||||
<text x="990.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">10.42.0.1/32</text>
|
||||
<text x="990.0" y="237" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">route by rewritten host</text>
|
||||
<rect x="1150" y="125" width="130" height="160" rx="14" fill="#f2f8f7" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="1215.0" y="167" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="18" font-weight="700" fill="#1f2937">Service</text>
|
||||
<text x="1215.0" y="197" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#0f766e">fixed trust</text>
|
||||
<text x="1215.0" y="227" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="13" font-weight="500" fill="#64748b">boundary</text>
|
||||
<line x1="280" y1="205" x2="311" y2="205" stroke="#1f2937" stroke-width="3"/>
|
||||
<polygon points="311,198 325,205 311,212" fill="#1f2937"/>
|
||||
<line x1="580" y1="205" x2="611" y2="205" stroke="#1f2937" stroke-width="3"/>
|
||||
<polygon points="611,198 625,205 611,212" fill="#1f2937"/>
|
||||
<line x1="840" y1="205" x2="871" y2="205" stroke="#1f2937" stroke-width="3"/>
|
||||
<polygon points="871,198 885,205 871,212" fill="#1f2937"/>
|
||||
<line x1="1105" y1="205" x2="1136" y2="205" stroke="#1f2937" stroke-width="3"/>
|
||||
<polygon points="1136,198 1150,205 1136,212" fill="#1f2937"/>
|
||||
<text x="625" y="355" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="14" font-weight="700" fill="#b91c1c">우회 경로를 닫지 않으면 forwarded header는 신뢰 경계가 될 수 없음</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="330" viewBox="0 0 1260 330">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker></defs>
|
||||
<rect width="1260" height="330" fill="white"/>
|
||||
<text x="40" y="32" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">Replica-local JWKS cache after key rotation</text>
|
||||
<rect x="60" y="105" width="190" height="100" rx="14" fill="#f8fafc" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="155" y="143" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="800" fill="#17212b">Same old token</text>
|
||||
<text x="155" y="174" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">load balanced</text>
|
||||
<line x1="250" y1="135" x2="430" y2="105" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="250" y1="175" x2="430" y2="225" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="445" y="68" width="315" height="100" rx="14" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="602" y="102" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16.5" font-weight="800" fill="#17212b">Resource Server A</text>
|
||||
<text x="602" y="128" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">old key still cached</text>
|
||||
<text x="700" y="153" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="18" font-weight="900" fill="#0f766e">HTTP 200</text>
|
||||
<rect x="445" y="198" width="315" height="100" rx="14" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="602" y="232" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16.5" font-weight="800" fill="#17212b">Resource Server B</text>
|
||||
<text x="602" y="258" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">JWKS refreshed</text>
|
||||
<text x="700" y="283" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="18" font-weight="900" fill="#b91c1c">HTTP 401</text>
|
||||
<rect x="920" y="118" width="270" height="100" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.5"/>
|
||||
<text x="1055" y="154" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16.5" font-weight="800" fill="#17212b">Keycloak JWKS</text>
|
||||
<text x="1055" y="181" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">old signing key removed</text>
|
||||
<line x1="760" y1="118" x2="910" y2="150" stroke="#64748b" stroke-width="2.2" stroke-dasharray="7 6"/>
|
||||
<line x1="760" y1="248" x2="910" y2="190" stroke="#64748b" stroke-width="2.2" stroke-dasharray="7 6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,29 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="300" viewBox="0 0 1260 300"><defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker></defs><rect width="1260" height="300" fill="white"/><text x="40" y="30" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">200 ms DB delay propagation</text>
|
||||
<text x="55" y="82" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="23" font-weight="900" fill="#0f766e">66 -> 1,872 ms</text>
|
||||
<text x="55" y="107" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#64748b">login response</text>
|
||||
<text x="350" y="82" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="23" font-weight="900" fill="#b91c1c">22.2 s</text>
|
||||
<text x="350" y="107" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#64748b">20 concurrent max</text>
|
||||
<text x="645" y="82" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="23" font-weight="900" fill="#d97706">20 s</text>
|
||||
<text x="645" y="107" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#64748b">connection wait max</text>
|
||||
<text x="940" y="82" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="23" font-weight="900" fill="#2563eb">timeout</text>
|
||||
<text x="940" y="107" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#64748b">readiness</text>
|
||||
<line x1="40" y1="132" x2="1220" y2="132" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<circle cx="77" cy="215" r="20" fill="#0f766e"/>
|
||||
<text x="77" y="221" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="900" fill="white">1</text>
|
||||
<text x="110" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#17212b">PostgreSQL</text>
|
||||
<text x="110" y="230" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">200 ms RTT</text>
|
||||
<line x1="300" y1="215" x2="340" y2="215" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<circle cx="372" cy="215" r="20" fill="#0f766e"/>
|
||||
<text x="372" y="221" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="900" fill="white">2</text>
|
||||
<text x="405" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#17212b">DB round trips</text>
|
||||
<text x="405" y="230" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">delay accumulates</text>
|
||||
<line x1="595" y1="215" x2="635" y2="215" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<circle cx="667" cy="215" r="20" fill="#0f766e"/>
|
||||
<text x="667" y="221" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="900" fill="white">3</text>
|
||||
<text x="700" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#17212b">Connection pool</text>
|
||||
<text x="700" y="230" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">requests hold connections</text>
|
||||
<line x1="890" y1="215" x2="930" y2="215" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<circle cx="962" cy="215" r="20" fill="#b91c1c"/>
|
||||
<text x="962" y="221" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="900" fill="white">4</text>
|
||||
<text x="995" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#17212b">Readiness</text>
|
||||
<text x="995" y="230" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">probe timeout -> pod removed</text></svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,39 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1320" height="520" viewBox="0 0 1320 520">
|
||||
<rect width="1320" height="520" fill="white"/>
|
||||
<text x="40" y="44" font-family="Noto Sans CJK KR,Arial" font-size="25" font-weight="700" fill="#17212b">Rolling restart 전후 state 변화</text>
|
||||
<text x="40" y="74" font-family="Noto Sans CJK KR,Arial" font-size="14" fill="#64748b">service continuity / persistent session / local cache를 각각 따로 측정</text>
|
||||
<text x="560" y="110" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#64748b">Before</text>
|
||||
<text x="1000" y="110" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#64748b">After</text>
|
||||
<rect x="70" y="130" width="330" height="62" rx="10" fill="#f6f8fa" stroke="#dbe2e7"/>
|
||||
<text x="235" y="169" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#17212b">Service response</text>
|
||||
<rect x="430" y="130" width="260" height="62" rx="10" fill="#eaf1ff" stroke="#2563eb"/>
|
||||
<text x="560" y="170" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">HTTP 200</text>
|
||||
<rect x="850" y="130" width="300" height="62" rx="10" fill="#dff3ef" stroke="#0f766e"/>
|
||||
<text x="1000" y="170" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">HTTP 200</text>
|
||||
<line x1="700" y1="161" x2="835" y2="161" stroke="#0f766e" stroke-width="3"/>
|
||||
<polygon points="835,161 823.5394314535823,167.13639703676847 823.5394314535823,154.86360296323153" fill="#0f766e"/>
|
||||
<rect x="70" y="212" width="330" height="62" rx="10" fill="#f6f8fa" stroke="#dbe2e7"/>
|
||||
<text x="235" y="251" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#17212b">DB session rows</text>
|
||||
<rect x="430" y="212" width="260" height="62" rx="10" fill="#eaf1ff" stroke="#2563eb"/>
|
||||
<text x="560" y="252" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">151</text>
|
||||
<rect x="850" y="212" width="300" height="62" rx="10" fill="#dff3ef" stroke="#0f766e"/>
|
||||
<text x="1000" y="252" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">151</text>
|
||||
<line x1="700" y1="243" x2="835" y2="243" stroke="#0f766e" stroke-width="3"/>
|
||||
<polygon points="835,243 823.5394314535823,249.13639703676847 823.5394314535823,236.86360296323153" fill="#0f766e"/>
|
||||
<rect x="70" y="294" width="330" height="62" rx="10" fill="#f6f8fa" stroke="#dbe2e7"/>
|
||||
<text x="235" y="333" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#17212b">Local session cache</text>
|
||||
<rect x="430" y="294" width="260" height="62" rx="10" fill="#eaf1ff" stroke="#2563eb"/>
|
||||
<text x="560" y="334" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">warm</text>
|
||||
<rect x="850" y="294" width="300" height="62" rx="10" fill="#dff3ef" stroke="#0f766e"/>
|
||||
<text x="1000" y="334" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">0 -> rebuilt</text>
|
||||
<line x1="700" y1="325" x2="835" y2="325" stroke="#0f766e" stroke-width="3"/>
|
||||
<polygon points="835,325 823.5394314535823,331.13639703676847 823.5394314535823,318.86360296323153" fill="#0f766e"/>
|
||||
<rect x="70" y="376" width="330" height="62" rx="10" fill="#f6f8fa" stroke="#dbe2e7"/>
|
||||
<text x="235" y="415" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="17" font-weight="700" fill="#17212b">Pre-restart refresh token</text>
|
||||
<rect x="430" y="376" width="260" height="62" rx="10" fill="#eaf1ff" stroke="#2563eb"/>
|
||||
<text x="560" y="416" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">valid</text>
|
||||
<rect x="850" y="376" width="300" height="62" rx="10" fill="#dff3ef" stroke="#0f766e"/>
|
||||
<text x="1000" y="416" text-anchor="middle" font-family="Noto Sans CJK KR,Arial" font-size="21" font-weight="800" fill="#17212b">HTTP 200</text>
|
||||
<line x1="700" y1="407" x2="835" y2="407" stroke="#0f766e" stroke-width="3"/>
|
||||
<polygon points="835,407 823.5394314535823,413.13639703676847 823.5394314535823,400.86360296323153" fill="#0f766e"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="26" y="40" width="1208" height="320" rx="16" fill="none" stroke="#dbe2e7" stroke-width="2" stroke-dasharray="8 7"/>
|
||||
<text x="50" y="68" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">2-node K3s lab · Keycloak 26</text>
|
||||
<rect x="80" y="96" width="420" height="104" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="290" y="134" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="21" font-weight="700" fill="#17212b">Keycloak-0</text>
|
||||
<text x="290" y="166" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">replica-local cache · 재시작 시 재구성</text>
|
||||
<rect x="760" y="96" width="420" height="104" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="970" y="134" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="21" font-weight="700" fill="#17212b">Keycloak-1</text>
|
||||
<text x="970" y="166" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">replica-local cache · 재시작 시 재구성</text>
|
||||
<line x1="500" y1="148" x2="760" y2="148" stroke="#64748b" stroke-width="2.4" stroke-dasharray="9 7"/>
|
||||
<text x="630" y="133" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="600" fill="#64748b">JGroups transport / discovery</text>
|
||||
<path d="M430 257.0 V331.0 A200.0 13.0 0 0 0 830 331.0 V257.0" fill="#fff7ed" stroke="#d97706" stroke-width="2.5"/>
|
||||
<ellipse cx="630.0" cy="257.0" rx="200.0" ry="13.0" fill="#fff7ed" stroke="#d97706" stroke-width="2.5"/>
|
||||
<text x="630" y="292" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="21" font-weight="700" fill="#17212b">PostgreSQL</text>
|
||||
<text x="630" y="320" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">persistent user session</text>
|
||||
<path d="M290 200 V222 H530 V236" fill="none" stroke="#d97706" stroke-width="3" marker-end="url(#o)"/>
|
||||
<path d="M970 200 V222 H730 V236" fill="none" stroke="#d97706" stroke-width="3" marker-end="url(#o)"/>
|
||||
<text x="370" y="214" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#d97706">session read / write</text>
|
||||
<text x="890" y="214" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#d97706">session read / write</text>
|
||||
<text x="630" y="400" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#d97706">replica가 죽어도 PostgreSQL의 session row는 남고, local cache만 다시 만들어집니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,15 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="360" viewBox="0 0 1260 360"><defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker></defs><rect width="1260" height="360" fill="white"/><text x="40" y="32" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">LATERAL - composite index dependency</text>
|
||||
<rect x="55" y="70" width="545" height="235" rx="16" fill="#f6f8fa" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="83" y="108" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#0f766e">WITH INDEX</text>
|
||||
<text x="83" y="148" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="600" fill="#17212b">Index Scan + Limit 3</text>
|
||||
<text x="83" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">buffers</text>
|
||||
<text x="555" y="205" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="27" font-weight="900" fill="#0f766e">168</text>
|
||||
<text x="83" y="260" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">execution</text>
|
||||
<text x="555" y="260" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="27" font-weight="900" fill="#0f766e">0.336 ms</text>
|
||||
<rect x="660" y="70" width="545" height="235" rx="16" fill="#f6f8fa" stroke="#d97706" stroke-width="2.5"/>
|
||||
<text x="688" y="108" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#d97706">WITHOUT INDEX</text>
|
||||
<text x="688" y="148" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="600" fill="#17212b">Seq Scan</text>
|
||||
<text x="688" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">buffers</text>
|
||||
<text x="1160" y="205" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="27" font-weight="900" fill="#d97706">4,446</text>
|
||||
<text x="688" y="260" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">execution</text>
|
||||
<text x="1160" y="260" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="27" font-weight="900" fill="#d97706">5.472 ms</text></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,66 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="264" y="26" width="238" height="66" rx="10" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="383.0" y="54" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">SPA</text>
|
||||
<text x="383.0" y="78" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">브라우저가 직접 호출</text>
|
||||
<rect x="512" y="26" width="238" height="66" rx="10" fill="#fff7ed" stroke="#d97706" stroke-width="2.5"/>
|
||||
<text x="631.0" y="54" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Token Mediator</text>
|
||||
<text x="631.0" y="78" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">mediator가 토큰 보관</text>
|
||||
<rect x="760" y="26" width="238" height="66" rx="10" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="879.0" y="54" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">BFF</text>
|
||||
<text x="879.0" y="78" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">서버가 대신 호출</text>
|
||||
<rect x="1008" y="26" width="238" height="66" rx="10" fill="#fef2f2" stroke="#b91c1c" stroke-width="2.5"/>
|
||||
<text x="1127.0" y="54" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#17212b">Forward-Auth</text>
|
||||
<text x="1127.0" y="78" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">edge가 신원 확정</text>
|
||||
<rect x="26" y="100" width="228" height="64" rx="10" fill="#f3f6f7"/>
|
||||
<text x="236" y="139" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">브라우저 보관</text>
|
||||
<rect x="264" y="100" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="383.0" y="139" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">access + refresh</text>
|
||||
<rect x="512" y="100" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="631.0" y="139" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">access token만</text>
|
||||
<rect x="760" y="100" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="879.0" y="139" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">없음</text>
|
||||
<rect x="1008" y="100" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1127.0" y="139" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">없음</text>
|
||||
<rect x="26" y="168" width="228" height="64" rx="10" fill="#f3f6f7"/>
|
||||
<text x="236" y="207" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">API 호출자</text>
|
||||
<rect x="264" y="168" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="383.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">브라우저</text>
|
||||
<rect x="512" y="168" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="631.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">브라우저</text>
|
||||
<rect x="760" y="168" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="879.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">BFF 서버</text>
|
||||
<rect x="1008" y="168" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1127.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">Edge proxy</text>
|
||||
<rect x="26" y="236" width="228" height="64" rx="10" fill="#f3f6f7"/>
|
||||
<text x="236" y="275" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">서버 상태</text>
|
||||
<rect x="264" y="236" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="383.0" y="275" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">없음</text>
|
||||
<rect x="512" y="236" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="631.0" y="275" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">authorized client</text>
|
||||
<rect x="760" y="236" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="879.0" y="275" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">session + client</text>
|
||||
<rect x="1008" y="236" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1127.0" y="275" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">proxy session</text>
|
||||
<rect x="26" y="304" width="228" height="64" rx="10" fill="#f3f6f7"/>
|
||||
<text x="236" y="343" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">CSRF 경계</text>
|
||||
<rect x="264" y="304" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="383.0" y="343" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">Bearer header</text>
|
||||
<rect x="512" y="304" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="631.0" y="343" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">Bearer header</text>
|
||||
<rect x="760" y="304" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="879.0" y="343" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">XSRF token</text>
|
||||
<rect x="1008" y="304" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1127.0" y="343" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">proxy session</text>
|
||||
<rect x="26" y="372" width="228" height="64" rx="10" fill="#f3f6f7"/>
|
||||
<text x="236" y="411" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">검증 대상</text>
|
||||
<rect x="264" y="372" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="383.0" y="411" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">Bearer JWT</text>
|
||||
<rect x="512" y="372" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="631.0" y="411" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">Bearer JWT</text>
|
||||
<rect x="760" y="372" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="879.0" y="411" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">Bearer JWT</text>
|
||||
<rect x="1008" y="372" width="238" height="64" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1127.0" y="411" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="600" fill="#17212b">trusted header</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,51 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="530" viewBox="0 0 1260 530">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker></defs>
|
||||
<rect width="1260" height="530" fill="white"/>
|
||||
<text x="40" y="30" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">Four authorization boundaries</text>
|
||||
<text x="175" y="62" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#2563eb">SPA</text>
|
||||
<text x="480" y="62" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#d97706">Mediator</text>
|
||||
<text x="785" y="62" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#0f766e">BFF</text>
|
||||
<text x="1090" y="62" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#b91c1c">Forward-Auth</text>
|
||||
<rect x="70" y="88" width="210" height="66" rx="12" fill="#f8fafc" stroke="#2563eb" stroke-width="2.3"/><text x="175.0" y="120" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">Browser</text><text x="175.0" y="143" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">access + refresh token</text>
|
||||
<rect x="70" y="188" width="210" height="60" rx="12" fill="#f8fafc" stroke="#2563eb" stroke-width="2.3"/><text x="175.0" y="220" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">API</text><text x="175.0" y="243" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">Bearer JWT</text>
|
||||
<line x1="175" y1="154" x2="175" y2="181" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="365" y="88" width="230" height="66" rx="12" fill="#fff7ed" stroke="#d97706" stroke-width="2.3"/><text x="480.0" y="120" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">Mediator</text><text x="480.0" y="143" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">refresh token + client state</text>
|
||||
<rect x="365" y="188" width="230" height="60" rx="12" fill="#f8fafc" stroke="#2563eb" stroke-width="2.3"/><text x="480.0" y="220" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">API</text><text x="480.0" y="243" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">Browser sends Bearer</text>
|
||||
<line x1="480" y1="154" x2="480" y2="181" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="670" y="88" width="230" height="66" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.3"/><text x="785.0" y="120" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">BFF</text><text x="785.0" y="143" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">OAuth tokens + server session</text>
|
||||
<rect x="670" y="188" width="230" height="60" rx="12" fill="#f8fafc" stroke="#2563eb" stroke-width="2.3"/><text x="785.0" y="220" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">Resource Server</text><text x="785.0" y="243" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">BFF sends Bearer</text>
|
||||
<line x1="785" y1="154" x2="785" y2="181" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="970" y="88" width="240" height="66" rx="12" fill="#feecec" stroke="#b91c1c" stroke-width="2.3"/><text x="1090.0" y="120" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">oauth2-proxy / Edge</text><text x="1090.0" y="143" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">proxy session + identity</text>
|
||||
<rect x="970" y="188" width="240" height="60" rx="12" fill="#f8fafc" stroke="#2563eb" stroke-width="2.3"/><text x="1090.0" y="220" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">Backend</text><text x="1090.0" y="243" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">trusted identity header</text>
|
||||
<line x1="1090" y1="154" x2="1090" y2="181" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="145" y1="335" x2="1208" y2="335" stroke="#dbe2e7" stroke-width="1"/>
|
||||
<text x="18" y="326" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.8" font-weight="700" fill="#64748b">Browser token</text>
|
||||
<text x="175" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#2563eb">yes</text>
|
||||
<text x="480" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#d97706">access only</text>
|
||||
<text x="785" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#0f766e">no</text>
|
||||
<text x="1090" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#b91c1c">no</text>
|
||||
<line x1="145" y1="374" x2="1208" y2="374" stroke="#dbe2e7" stroke-width="1"/>
|
||||
<text x="18" y="365" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.8" font-weight="700" fill="#64748b">API caller</text>
|
||||
<text x="175" y="365" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#2563eb">Browser</text>
|
||||
<text x="480" y="365" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#d97706">Browser</text>
|
||||
<text x="785" y="365" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#0f766e">BFF</text>
|
||||
<text x="1090" y="365" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#b91c1c">Edge</text>
|
||||
<line x1="145" y1="413" x2="1208" y2="413" stroke="#dbe2e7" stroke-width="1"/>
|
||||
<text x="18" y="404" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.8" font-weight="700" fill="#64748b">Server state</text>
|
||||
<text x="175" y="404" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#2563eb">none</text>
|
||||
<text x="480" y="404" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#d97706">authorized client</text>
|
||||
<text x="785" y="404" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#0f766e">session + client</text>
|
||||
<text x="1090" y="404" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#b91c1c">proxy session</text>
|
||||
<line x1="145" y1="452" x2="1208" y2="452" stroke="#dbe2e7" stroke-width="1"/>
|
||||
<text x="18" y="443" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.8" font-weight="700" fill="#64748b">CSRF boundary</text>
|
||||
<text x="175" y="443" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#2563eb">Bearer header</text>
|
||||
<text x="480" y="443" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#d97706">Bearer header</text>
|
||||
<text x="785" y="443" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#0f766e">XSRF token</text>
|
||||
<text x="1090" y="443" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#b91c1c">proxy session</text>
|
||||
<line x1="145" y1="491" x2="1208" y2="491" stroke="#dbe2e7" stroke-width="1"/>
|
||||
<text x="18" y="482" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.8" font-weight="700" fill="#64748b">Verification target</text>
|
||||
<text x="175" y="482" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#2563eb">Bearer JWT</text>
|
||||
<text x="480" y="482" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#d97706">Bearer JWT</text>
|
||||
<text x="785" y="482" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#0f766e">Bearer JWT</text>
|
||||
<text x="1090" y="482" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.4" font-weight="650" fill="#b91c1c">trusted header</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.1 KiB |
@@ -0,0 +1,49 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="480" viewBox="0 0 1260 480"><defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker></defs><rect width="1260" height="480" fill="white"/><text x="40" y="30" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">BFF state / Forward-Auth trust boundary</text>
|
||||
<text x="55" y="72" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#0f766e">BFF</text>
|
||||
<circle cx="110" cy="120" r="13" fill="none" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="133" x2="110" y2="163" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="90" y1="145" x2="130" y2="145" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="163" x2="95" y2="185" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="163" x2="125" y2="185" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="110" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#17212b">Browser</text>
|
||||
<rect x="220" y="92" width="190" height="92" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="315.0" y="124" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">BFF</text>
|
||||
<text x="315.0" y="148" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">session -> authorized client</text>
|
||||
<rect x="432.5" y="115" width="185" height="58" fill="white" stroke="#d97706" stroke-width="2.3"/>
|
||||
<ellipse cx="525" cy="115" rx="92.5" ry="10" fill="white" stroke="#d97706" stroke-width="2.3"/>
|
||||
<path d="M432.5 173 A92.5 10 0 0 0 617.5 173" fill="none" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="525" y="141" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Authorized client</text>
|
||||
<text x="525" y="163" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">access / refresh</text>
|
||||
<rect x="690" y="104" width="185" height="70" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="782.5" y="136" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Resource Server</text>
|
||||
<text x="782.5" y="160" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">Bearer JWT</text>
|
||||
<line x1="150" y1="145" x2="210" y2="138" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="410" y1="138" x2="430" y2="138" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="618" y1="145" x2="680" y2="139" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<text x="220" y="213" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="700" fill="#b91c1c">CSRF</text>
|
||||
<text x="335" y="213" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="700" fill="#64748b">logout</text>
|
||||
<text x="450" y="213" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="700" fill="#64748b">token-at-rest</text>
|
||||
<text x="580" y="213" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="700" fill="#64748b">replica state</text>
|
||||
<line x1="35" y1="245" x2="1220" y2="245" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="55" y="285" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="17" font-weight="800" fill="#b91c1c">Forward-Auth</text>
|
||||
<circle cx="110" cy="320" r="13" fill="none" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="333" x2="110" y2="363" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="90" y1="345" x2="130" y2="345" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="363" x2="95" y2="385" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="110" y1="363" x2="125" y2="385" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="110" y="407" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#17212b">Browser</text>
|
||||
<rect x="220" y="294" width="190" height="92" rx="12" fill="#feecec" stroke="#b91c1c" stroke-width="2.3"/>
|
||||
<text x="315.0" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Nginx / Edge</text>
|
||||
<text x="315.0" y="350" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">ForwardAuth</text>
|
||||
<rect x="500" y="294" width="190" height="92" rx="12" fill="#fff7ed" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="595.0" y="326" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">oauth2-proxy</text>
|
||||
<text x="595.0" y="350" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">session + identity</text>
|
||||
<rect x="780" y="304" width="190" height="72" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="875.0" y="336" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Backend</text>
|
||||
<text x="875.0" y="360" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">trusted header</text>
|
||||
<line x1="150" y1="345" x2="210" y2="340" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="410" y1="340" x2="490" y2="340" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="690" y1="340" x2="770" y2="340" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<path d="M 150 380 C 400 450, 690 450, 780 375" fill="none" stroke="#b91c1c" stroke-width="2.8" stroke-dasharray="8 6" marker-end="url(#r)"/>
|
||||
<text x="470" y="455" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="800" fill="#b91c1c">direct backend path must be blocked</text>
|
||||
<text x="845" y="412" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="600" fill="#64748b">incoming identity header overwrite</text></svg>
|
||||
|
After Width: | Height: | Size: 6.5 KiB |
@@ -0,0 +1,32 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="262" y="26" width="484" height="54" rx="10" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="504.0" y="61" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="21" font-weight="700" fill="#17212b">auth-mode = jwt</text>
|
||||
<rect x="758" y="26" width="484" height="54" rx="10" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="1000.0" y="61" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="21" font-weight="700" fill="#17212b">auth-mode = redis-session</text>
|
||||
<rect x="26" y="90" width="224" height="78" rx="10" fill="#f3f6f7"/>
|
||||
<text x="232" y="136" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">브라우저가 가진 것</text>
|
||||
<rect x="262" y="90" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="504.0" y="137" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#2563eb">Bearer JWT</text>
|
||||
<rect x="758" y="90" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1000.0" y="137" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#0f766e">session cookie + XSRF token</text>
|
||||
<rect x="26" y="178" width="224" height="78" rx="10" fill="#f3f6f7"/>
|
||||
<text x="232" y="224" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">서버가 저장하는 것</text>
|
||||
<rect x="262" y="178" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="504.0" y="225" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#2563eb">없음 · STATELESS</text>
|
||||
<rect x="758" y="178" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1000.0" y="225" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#0f766e">HttpSession → Redis</text>
|
||||
<rect x="26" y="266" width="224" height="78" rx="10" fill="#f3f6f7"/>
|
||||
<text x="232" y="312" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">무엇을 검증하는가</text>
|
||||
<rect x="262" y="266" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="504.0" y="313" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#2563eb">JWT 서명</text>
|
||||
<rect x="758" y="266" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1000.0" y="313" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#0f766e">server session + CSRF token</text>
|
||||
<rect x="26" y="354" width="224" height="78" rx="10" fill="#f3f6f7"/>
|
||||
<text x="232" y="400" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">logout</text>
|
||||
<rect x="262" y="354" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="504.0" y="401" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#2563eb">토큰 만료까지 유효</text>
|
||||
<rect x="758" y="354" width="484" height="78" rx="10" fill="#fff" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="1000.0" y="401" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="600" fill="#0f766e">session invalidate + cookie 삭제</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,46 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="520" viewBox="0 0 1260 520">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker></defs>
|
||||
<rect width="1260" height="520" fill="white"/>
|
||||
<text x="38" y="34" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">Authentication boundary decision</text>
|
||||
<text x="38" y="61" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="400" fill="#64748b">4-pattern experiment -> evaluation axes -> TechLog runtime branches</text>
|
||||
<rect x="55" y="95" width="250" height="72" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="180.0" y="125" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">SPA</text>
|
||||
<text x="180.0" y="149" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">browser token</text>
|
||||
<rect x="350" y="95" width="250" height="72" rx="12" fill="#fff7ed" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="475.0" y="125" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">Mediator</text>
|
||||
<text x="475.0" y="149" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">access in browser</text>
|
||||
<rect x="645" y="95" width="250" height="72" rx="12" fill="#e9f7f4" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="770.0" y="125" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">BFF</text>
|
||||
<text x="770.0" y="149" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">server session</text>
|
||||
<rect x="940" y="95" width="250" height="72" rx="12" fill="#feecec" stroke="#b91c1c" stroke-width="2.3"/>
|
||||
<text x="1065.0" y="125" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">Forward-Auth</text>
|
||||
<text x="1065.0" y="149" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">edge identity</text>
|
||||
<text x="35" y="202" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="800" fill="#64748b">평가축</text>
|
||||
<rect x="110" y="180" width="170" height="42" rx="21" fill="#f8fafc" stroke="#dbe2e7"/>
|
||||
<text x="195.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="650" fill="#17212b">browser token</text>
|
||||
<rect x="320" y="180" width="170" height="42" rx="21" fill="#f8fafc" stroke="#dbe2e7"/>
|
||||
<text x="405.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="650" fill="#17212b">API caller</text>
|
||||
<rect x="510" y="180" width="170" height="42" rx="21" fill="#f8fafc" stroke="#dbe2e7"/>
|
||||
<text x="595.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="650" fill="#17212b">server state</text>
|
||||
<rect x="720" y="180" width="170" height="42" rx="21" fill="#f8fafc" stroke="#dbe2e7"/>
|
||||
<text x="805.0" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="650" fill="#17212b">CSRF boundary</text>
|
||||
<rect x="940" y="180" width="215" height="42" rx="21" fill="#f8fafc" stroke="#dbe2e7"/>
|
||||
<text x="1047.5" y="207" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="650" fill="#17212b">verification target</text>
|
||||
<line x1="630" y1="235" x2="630" y2="278" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<text x="630" y="260" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="700" fill="#64748b">TechLog implementation</text>
|
||||
<rect x="135" y="300" width="420" height="122" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="345.0" y="330" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">auth-mode = jwt</text>
|
||||
<text x="345.0" y="354" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">stateless Resource Server</text>
|
||||
<text x="345" y="380" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#2563eb">Bearer JWT -> backend verifier</text>
|
||||
<text x="345" y="402" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="600" fill="#64748b">repo default / local .env = jwt</text>
|
||||
<rect x="705" y="300" width="420" height="122" rx="12" fill="#e9f7f4" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="915.0" y="330" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15.5" font-weight="700" fill="#17212b">auth-mode = redis-session</text>
|
||||
<text x="915.0" y="354" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="400" fill="#64748b">Redis session + oauth2Login + CSRF</text>
|
||||
<text x="915" y="380" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="600" fill="#0f766e">session cookie + XSRF -> backend session</text>
|
||||
<text x="915" y="402" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="600" fill="#64748b">conditional runtime branch</text>
|
||||
<path d="M180 167 C180 250 270 255 345 300" fill="none" stroke="#2563eb" stroke-width="2.5" marker-end="url(#a)"/>
|
||||
<path d="M475 167 C475 245 390 265 345 300" fill="none" stroke="#d97706" stroke-width="2.5" marker-end="url(#a)"/>
|
||||
<path d="M770 167 C770 245 860 265 915 300" fill="none" stroke="#0f766e" stroke-width="2.8" marker-end="url(#t)"/>
|
||||
<path d="M1065 167 V255" fill="none" stroke="#b91c1c" stroke-width="2.4" stroke-dasharray="7 6"/>
|
||||
<text x="1065" y="274" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="700" fill="#b91c1c">comparison only</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
@@ -0,0 +1,54 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<text x="332.5" y="46" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">소스</text>
|
||||
<text x="597.5" y="46" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">수집</text>
|
||||
<text x="862.5" y="46" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">저장</text>
|
||||
<text x="1127.5" y="46" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">조회 · 통지</text>
|
||||
<text x="26" y="110" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#0f766e">Metrics</text>
|
||||
<text x="26" y="134" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">pull · scrape</text>
|
||||
<rect x="220" y="70" width="225" height="76" rx="12" fill="#fff" stroke="#0f766e" stroke-width="2.4"/>
|
||||
<text x="332.5" y="115" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Targets</text>
|
||||
<rect x="485" y="70" width="490" height="76" rx="12" fill="#fff" stroke="#0f766e" stroke-width="2.4"/>
|
||||
<text x="730.0" y="115" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Prometheus</text>
|
||||
<rect x="1015" y="70" width="225" height="76" rx="12" fill="#fff" stroke="#0f766e" stroke-width="2.4"/>
|
||||
<text x="1127.5" y="115" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Grafana</text>
|
||||
<line x1="449" y1="108" x2="481" y2="108" stroke="#0f766e" stroke-width="2.6" stroke-dasharray="9 6" marker-end="url(#t)"/>
|
||||
<line x1="979" y1="108" x2="1011" y2="108" stroke="#0f766e" stroke-width="2.6" stroke-dasharray="9 6" marker-end="url(#t)"/>
|
||||
<text x="26" y="205" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#2563eb">Logs</text>
|
||||
<text x="26" y="229" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">push</text>
|
||||
<rect x="220" y="165" width="225" height="76" rx="12" fill="#fff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="332.5" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Node / Pod</text>
|
||||
<rect x="485" y="165" width="225" height="76" rx="12" fill="#fff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="597.5" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Alloy</text>
|
||||
<rect x="750" y="165" width="225" height="76" rx="12" fill="#fff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="862.5" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Loki</text>
|
||||
<rect x="1015" y="165" width="225" height="76" rx="12" fill="#fff" stroke="#2563eb" stroke-width="2.4"/>
|
||||
<text x="1127.5" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Grafana</text>
|
||||
<line x1="449" y1="203" x2="481" y2="203" stroke="#2563eb" stroke-width="2.6" marker-end="url(#b)"/>
|
||||
<line x1="714" y1="203" x2="746" y2="203" stroke="#2563eb" stroke-width="2.6" marker-end="url(#b)"/>
|
||||
<line x1="979" y1="203" x2="1011" y2="203" stroke="#2563eb" stroke-width="2.6" marker-end="url(#b)"/>
|
||||
<text x="26" y="300" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#d97706">Traces</text>
|
||||
<text x="26" y="324" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">OTLP / gRPC</text>
|
||||
<rect x="220" y="260" width="225" height="76" rx="12" fill="#fff" stroke="#d97706" stroke-width="2.4"/>
|
||||
<text x="332.5" y="305" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Application</text>
|
||||
<rect x="485" y="260" width="225" height="76" rx="12" fill="#fff" stroke="#d97706" stroke-width="2.4"/>
|
||||
<text x="597.5" y="305" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Alloy</text>
|
||||
<rect x="750" y="260" width="225" height="76" rx="12" fill="#fff" stroke="#d97706" stroke-width="2.4"/>
|
||||
<text x="862.5" y="305" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Tempo</text>
|
||||
<rect x="1015" y="260" width="225" height="76" rx="12" fill="#fff" stroke="#d97706" stroke-width="2.4"/>
|
||||
<text x="1127.5" y="305" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Grafana</text>
|
||||
<line x1="449" y1="298" x2="481" y2="298" stroke="#d97706" stroke-width="2.6" marker-end="url(#o)"/>
|
||||
<line x1="714" y1="298" x2="746" y2="298" stroke="#d97706" stroke-width="2.6" marker-end="url(#o)"/>
|
||||
<line x1="979" y1="298" x2="1011" y2="298" stroke="#d97706" stroke-width="2.6" marker-end="url(#o)"/>
|
||||
<text x="26" y="395" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#b91c1c">Alerts</text>
|
||||
<text x="26" y="419" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="13" font-weight="600" fill="#64748b">rule fire</text>
|
||||
<rect x="220" y="355" width="225" height="76" rx="12" fill="#fff" stroke="#b91c1c" stroke-width="2.4"/>
|
||||
<text x="332.5" y="400" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Prometheus rule</text>
|
||||
<rect x="485" y="355" width="490" height="76" rx="12" fill="#fff" stroke="#b91c1c" stroke-width="2.4"/>
|
||||
<text x="730.0" y="400" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Alertmanager</text>
|
||||
<rect x="1015" y="355" width="225" height="76" rx="12" fill="#fff" stroke="#b91c1c" stroke-width="2.4"/>
|
||||
<text x="1127.5" y="400" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Slack</text>
|
||||
<line x1="449" y1="393" x2="481" y2="393" stroke="#b91c1c" stroke-width="2.6" marker-end="url(#r)"/>
|
||||
<line x1="979" y1="393" x2="1011" y2="393" stroke="#b91c1c" stroke-width="2.6" marker-end="url(#r)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.8 KiB |
@@ -0,0 +1,26 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="390" viewBox="0 0 1260 390">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="390" fill="white"/>
|
||||
<text x="330" y="58" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">읽은 row</text>
|
||||
<text x="200" y="131" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">OFFSET 1980</text>
|
||||
<rect x="216" y="100" width="300.0" height="48" rx="6" fill="#d97706"/>
|
||||
<text x="530.0" y="132" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#d97706">2,000</text>
|
||||
<text x="200" y="215" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">Keyset + index</text>
|
||||
<rect x="216" y="184" width="7" height="48" rx="6" fill="#0f766e"/>
|
||||
<text x="237" y="216" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#0f766e">20</text>
|
||||
<text x="200" y="299" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">Keyset − index</text>
|
||||
<rect x="216" y="268" width="300.0" height="48" rx="6" fill="#2563eb"/>
|
||||
<text x="530.0" y="300" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#2563eb">2,000</text>
|
||||
<text x="950" y="58" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">실행 시간</text>
|
||||
<text x="820" y="131" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">OFFSET 1980</text>
|
||||
<rect x="836" y="100" width="280.0" height="48" rx="6" fill="#d97706"/>
|
||||
<text x="1130.0" y="132" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#d97706">0.996 ms</text>
|
||||
<text x="820" y="215" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">Keyset + index</text>
|
||||
<rect x="836" y="184" width="21.36546184738956" height="48" rx="6" fill="#0f766e"/>
|
||||
<text x="871.3654618473896" y="216" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#0f766e">0.076 ms</text>
|
||||
<text x="820" y="299" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#34424e">Keyset − index</text>
|
||||
<rect x="836" y="268" width="104.85943775100401" height="48" rx="6" fill="#2563eb"/>
|
||||
<text x="954.859437751004" y="300" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#2563eb">0.373 ms</text>
|
||||
<line x1="630" y1="80" x2="630" y2="340" stroke="#dbe2e7" stroke-width="1.6"/>
|
||||
<text x="630" y="372" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="600" fill="#64748b">buffers — OFFSET 141 · Keyset + index 1 · Keyset − index 141</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,49 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="360" viewBox="0 0 1260 360">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker></defs>
|
||||
<rect width="1260" height="360" fill="white"/>
|
||||
<text x="40" y="30" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">Internet -> Host -> K3s -> Data</text>
|
||||
<rect x="35" y="62" width="175" height="245" rx="16" fill="#f8fafc" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="53" y="90" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="800" fill="#64748b">INTERNET</text>
|
||||
<rect x="230" y="62" width="230" height="245" rx="16" fill="#ecf8f6" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="248" y="90" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="800" fill="#64748b">HOST</text>
|
||||
<rect x="485" y="62" width="500" height="245" rx="16" fill="#fbfcfd" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="503" y="90" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="800" fill="#64748b">K3s</text>
|
||||
<rect x="1010" y="62" width="215" height="245" rx="16" fill="#fffaf5" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="1028" y="90" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="800" fill="#64748b">DATA</text>
|
||||
<circle cx="120" cy="145" r="14" fill="none" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="120" y1="159" x2="120" y2="195" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="98" y1="176" x2="142" y2="176" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="120" y1="195" x2="103" y2="220" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<line x1="120" y1="195" x2="137" y2="220" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="120" y="247" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#17212b">Client</text>
|
||||
<rect x="270" y="118" width="150" height="86" rx="12" fill="white" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="345.0" y="152" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">Host Nginx</text>
|
||||
<text x="345.0" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">TLS :443</text>
|
||||
<rect x="525" y="118" width="145" height="86" rx="12" fill="white" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="597.5" y="152" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">NodePort</text>
|
||||
<text x="597.5" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">127.0.0.1:30080</text>
|
||||
<rect x="705" y="118" width="145" height="86" rx="12" fill="white" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="777.5" y="152" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">Traefik</text>
|
||||
<text x="777.5" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">L7 routing</text>
|
||||
<rect x="875" y="92" width="90" height="70" rx="12" fill="white" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="920.0" y="126" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">Service</text>
|
||||
<text x="920.0" y="150" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">ClusterIP</text>
|
||||
<rect x="875" y="218" width="90" height="70" rx="12" fill="white" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="920.0" y="252" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">Pod</text>
|
||||
<text x="920.0" y="276" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">workload</text>
|
||||
<rect x="1045" y="128" width="145" height="78" fill="white" stroke="#d97706" stroke-width="2.3"/>
|
||||
<ellipse cx="1117.5" cy="128" rx="72.5" ry="9" fill="white" stroke="#d97706" stroke-width="2.3"/>
|
||||
<path d="M1045 206 A72.5 9 0 0 0 1190 206" fill="none" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="1117.5" y="156" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#17212b">PostgreSQL</text>
|
||||
<text x="1117.5" y="180" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">ClusterIP only</text>
|
||||
<line x1="150" y1="176" x2="260" y2="161" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="420" y1="161" x2="515" y2="161" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="670" y1="161" x2="695" y2="161" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="850" y1="151" x2="865" y2="127" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="920" y1="162" x2="920" y2="208" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="965" y1="253" x2="1035" y2="178" stroke="#d97706" stroke-width="3" marker-end="url(#a)"/>
|
||||
<text x="345" y="278" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#0f766e">TLS termination</text>
|
||||
<text x="600" y="278" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#b91c1c">loopback-only entry</text>
|
||||
<text x="750" y="278" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#0f766e">L7 boundary</text>
|
||||
<text x="1025" y="278" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#d97706">no Ingress / NodePort / LB</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.9 KiB |
@@ -0,0 +1,33 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="360" viewBox="0 0 1260 360"><defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker></defs><rect width="1260" height="360" fill="white"/><text x="40" y="32" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">PreparedStatement baseline</text>
|
||||
<line x1="70" y1="270.0" x2="720" y2="270.0" stroke="#dbe2e7"/>
|
||||
<text x="58" y="274.0" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">0</text>
|
||||
<line x1="70" y1="221.1904761904762" x2="720" y2="221.1904761904762" stroke="#dbe2e7"/>
|
||||
<text x="58" y="225.1904761904762" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">500</text>
|
||||
<line x1="70" y1="172.38095238095238" x2="720" y2="172.38095238095238" stroke="#dbe2e7"/>
|
||||
<text x="58" y="176.38095238095238" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">1000</text>
|
||||
<line x1="70" y1="123.57142857142856" x2="720" y2="123.57142857142856" stroke="#dbe2e7"/>
|
||||
<text x="58" y="127.57142857142856" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">1500</text>
|
||||
<line x1="70" y1="74.76190476190476" x2="720" y2="74.76190476190476" stroke="#dbe2e7"/>
|
||||
<text x="58" y="78.76190476190476" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="400" fill="#64748b">2000</text>
|
||||
<circle cx="150" cy="267.5595238095238" r="6" fill="#d97706"/>
|
||||
<text x="150" y="255.5595238095238" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#17212b">25</text>
|
||||
<circle cx="390" cy="248.32857142857142" r="6" fill="#d97706"/>
|
||||
<text x="390" y="236.32857142857142" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#17212b">222</text>
|
||||
<circle cx="650" cy="72.61428571428573" r="6" fill="#d97706"/>
|
||||
<text x="650" y="60.61428571428573" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#17212b">2,022</text>
|
||||
<polyline points="150,267.5595238095238 390,248.32857142857142 650,72.61428571428573" fill="none" stroke="#d97706" stroke-width="4"/>
|
||||
<text x="150" y="302" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="500" fill="#17212b">N=10</text>
|
||||
<text x="390" y="302" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="500" fill="#17212b">N=100</text>
|
||||
<text x="650" y="302" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="500" fill="#17212b">N=1,000</text>
|
||||
<rect x="780" y="72" width="410" height="225" rx="14" fill="#f6f8fa" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="815" y="105" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">N=1,000 decomposition</text>
|
||||
<text x="815" y="145" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="500" fill="#64748b">content</text>
|
||||
<text x="1145" y="145" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">1</text>
|
||||
<text x="815" y="178" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="500" fill="#64748b">count</text>
|
||||
<text x="1145" y="178" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">1</text>
|
||||
<text x="815" y="211" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="500" fill="#64748b">User ToOne</text>
|
||||
<text x="1145" y="211" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">20</text>
|
||||
<text x="815" y="244" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="500" fill="#64748b">Page ToOne</text>
|
||||
<text x="1145" y="244" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#d97706">1,000</text>
|
||||
<text x="815" y="277" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="500" fill="#64748b">Highlight collection</text>
|
||||
<text x="1145" y="277" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#d97706">1,000</text></svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,25 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="360" viewBox="0 0 1260 360">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker></defs>
|
||||
<rect width="1260" height="360" fill="white"/>
|
||||
<text x="40" y="32" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">N=1,000 strategy comparison</text>
|
||||
<text x="310" y="72" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">PreparedStatement</text>
|
||||
<text x="940" y="72" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Entity / collection work</text>
|
||||
<rect x="55" y="98" width="245" height="190" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="77" y="128" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#64748b">Baseline</text>
|
||||
<text x="278" y="164" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="28" font-weight="900" fill="#d97706">2,022</text>
|
||||
<text x="77" y="268" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="500" fill="#64748b">entity path</text>
|
||||
<line x1="310" y1="193" x2="365" y2="193" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="380" y="98" width="245" height="190" rx="14" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.3"/>
|
||||
<text x="402" y="128" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#64748b">Batch Fetch</text>
|
||||
<text x="603" y="164" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="28" font-weight="900" fill="#0f766e">23</text>
|
||||
<text x="402" y="268" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="500" fill="#64748b">collection fetch 1,000 -> 10</text>
|
||||
<rect x="690" y="98" width="245" height="190" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.3"/>
|
||||
<text x="712" y="128" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#64748b">Entity path</text>
|
||||
<text x="913" y="164" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="28" font-weight="900" fill="#d97706">1,569</text>
|
||||
<text x="712" y="268" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="500" fill="#64748b">entity load</text>
|
||||
<line x1="945" y1="193" x2="1000" y2="193" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="1015" y="98" width="190" height="190" rx="14" fill="#eef4ff" stroke="#2563eb" stroke-width="2.3"/>
|
||||
<text x="1037" y="128" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13" font-weight="700" fill="#64748b">Projection</text>
|
||||
<text x="1183" y="164" text-anchor="end" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="28" font-weight="900" fill="#2563eb">0</text>
|
||||
<text x="1037" y="268" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="500" fill="#64748b">2 queries fixed</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,28 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="390" viewBox="0 0 1260 390">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="390" fill="white"/>
|
||||
<rect x="30" y="62" width="356" height="236" rx="14" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5" stroke-dasharray="8 0"/>
|
||||
<circle cx="208" cy="108" r="27" fill="#0f766e"/>
|
||||
<text x="208" y="116" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="24" font-weight="700" fill="#fff">1</text>
|
||||
<text x="208" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">정상 refresh</text>
|
||||
<text x="208" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">R0 사용 → R1 발급</text>
|
||||
<rect x="138" y="236" width="140" height="40" rx="20" fill="#fff" stroke="#0f766e" stroke-width="2"/>
|
||||
<text x="208" y="263" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">성공</text>
|
||||
<rect x="452" y="62" width="356" height="236" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.5" stroke-dasharray="8 0"/>
|
||||
<circle cx="630" cy="108" r="27" fill="#d97706"/>
|
||||
<text x="630" y="116" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="24" font-weight="700" fill="#fff">2</text>
|
||||
<text x="630" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">같은 R0 동시 5건</text>
|
||||
<text x="630" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">refreshTokenMaxReuse=0 위반</text>
|
||||
<rect x="560" y="236" width="140" height="40" rx="20" fill="#fff" stroke="#d97706" stroke-width="2"/>
|
||||
<text x="630" y="263" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#d97706">재사용 감지</text>
|
||||
<rect x="874" y="62" width="356" height="236" rx="14" fill="#fef2f2" stroke="#b91c1c" stroke-width="2.5" stroke-dasharray="9 6"/>
|
||||
<circle cx="1052" cy="108" r="27" fill="#b91c1c"/>
|
||||
<text x="1052" y="116" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="24" font-weight="700" fill="#fff">3</text>
|
||||
<text x="1052" y="176" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">client session 무효화</text>
|
||||
<text x="1052" y="210" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">먼저 받은 R1도 거부</text>
|
||||
<rect x="982" y="236" width="140" height="40" rx="20" fill="#fff" stroke="#b91c1c" stroke-width="2"/>
|
||||
<text x="1052" y="263" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#b91c1c">실패</text>
|
||||
<line x1="390" y1="180" x2="448" y2="180" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="812" y1="180" x2="870" y2="180" stroke="#b91c1c" stroke-width="3" marker-end="url(#r)"/>
|
||||
<text x="630" y="348" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#b91c1c">순차 요청에서는 재현되지 않았고, 동시 재사용일 때만 client session이 끊겼습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,35 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="26" y="26" width="594" height="400" rx="16" fill="#fbfcfd" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="323" y="60" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#b91c1c">BEFORE · 같은 path를 네 곳에서 따로 생성</text>
|
||||
<rect x="58" y="84" width="530" height="58" rx="10" fill="#fef2f2" stroke="#b91c1c" stroke-width="2"/>
|
||||
<text x="80" y="120" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#17212b">OpenAPI contract</text>
|
||||
<text x="566" y="120" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">decisions#{slug}</text>
|
||||
<rect x="58" y="150" width="530" height="58" rx="10" fill="#fef2f2" stroke="#b91c1c" stroke-width="2"/>
|
||||
<text x="80" y="186" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#17212b">Publisher</text>
|
||||
<text x="566" y="186" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">decisions/{slug}</text>
|
||||
<rect x="58" y="216" width="530" height="58" rx="10" fill="#fef2f2" stroke="#b91c1c" stroke-width="2"/>
|
||||
<text x="80" y="252" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#17212b">Projection DB</text>
|
||||
<text x="566" y="252" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">저장된 path</text>
|
||||
<rect x="58" y="282" width="530" height="58" rx="10" fill="#fef2f2" stroke="#b91c1c" stroke-width="2"/>
|
||||
<text x="80" y="318" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#17212b">Frontend route</text>
|
||||
<text x="566" y="318" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">match 없음</text>
|
||||
<rect x="212" y="352" width="222" height="58" rx="10" fill="#fff" stroke="#b91c1c" stroke-width="2.6"/>
|
||||
<text x="323" y="391" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="28" font-weight="700" fill="#b91c1c">404</text>
|
||||
<rect x="640" y="26" width="594" height="400" rx="16" fill="#fbfcfd" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="937" y="60" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#0f766e">AFTER · route contract에서만 유도</text>
|
||||
<rect x="790" y="90" width="294" height="76" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="937.0" y="124.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">route contract</text>
|
||||
<text x="937.0" y="148.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">canonical source</text>
|
||||
<rect x="672" y="252" width="176" height="76" rx="10" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<text x="760" y="297" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">server response</text>
|
||||
<rect x="860" y="252" width="176" height="76" rx="10" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<text x="948" y="297" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">frontend route</text>
|
||||
<rect x="1048" y="252" width="176" height="76" rx="10" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<text x="1136" y="297" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="16" font-weight="700" fill="#17212b">Nginx serving</text>
|
||||
<path d="M937 166 V210 H760 V248" fill="none" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<line x1="937" y1="166" x2="937" y2="248" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<path d="M937 166 V210 H1136 V248" fill="none" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<text x="937" y="388" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">세 경로가 같은 값에서 나오므로 한 곳만 어긋날 수 없습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="390" viewBox="0 0 1260 390">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="390" fill="white"/>
|
||||
<rect x="40" y="62" width="262" height="148" rx="14" fill="#eef4ff" stroke="#2563eb" stroke-width="2.6"/>
|
||||
<text x="171" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="27" font-weight="700" fill="#17212b">working</text>
|
||||
<text x="171" y="168" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">저장만 됨 · 공개 안 됨</text>
|
||||
<rect x="348" y="62" width="262" height="148" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.6"/>
|
||||
<text x="479" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="27" font-weight="700" fill="#17212b">validate</text>
|
||||
<text x="479" y="168" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">실패하면 여기서 멈춤</text>
|
||||
<rect x="656" y="62" width="262" height="148" rx="14" fill="#fff7ed" stroke="#d97706" stroke-width="2.6"/>
|
||||
<text x="787" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="27" font-weight="700" fill="#17212b">preview</text>
|
||||
<text x="787" y="168" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">revision 바뀌면 stale</text>
|
||||
<rect x="964" y="62" width="262" height="148" rx="14" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.6"/>
|
||||
<text x="1095" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="27" font-weight="700" fill="#17212b">publish</text>
|
||||
<text x="1095" y="168" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">publishedVersion 고정</text>
|
||||
<line x1="302" y1="136" x2="344" y2="136" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="610" y1="136" x2="652" y2="136" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<line x1="918" y1="136" x2="960" y2="136" stroke="#17212b" stroke-width="3" marker-end="url(#a)"/>
|
||||
<rect x="40" y="250" width="1186" height="76" rx="14" fill="#f6f8fa" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="633" y="282" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Public read는 publication status와 publishedVersion만 봅니다</text>
|
||||
<text x="633" y="308" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">working version은 공개 화면에서 조회되지 않습니다</text>
|
||||
<text x="633" y="368" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">저장되는 시점과 공개되는 시점이 다른 version을 가리킵니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,15 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="390" viewBox="0 0 1260 390">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="390" fill="white"/>
|
||||
<text x="630" y="54" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">certificate 파일이 갱신된 시점 → 그 certificate가 실제로 serving되는 시점</text>
|
||||
<rect x="70" y="88" width="500" height="200" rx="16" fill="#fff7ed" stroke="#d97706" stroke-width="2.6"/>
|
||||
<text x="320" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#d97706">deploy hook 없음</text>
|
||||
<text x="320" y="214" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="62" font-weight="700" fill="#17212b">2,305 s</text>
|
||||
<text x="320" y="258" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">38분 25초 동안 갱신 전 인증서가 나감</text>
|
||||
<rect x="690" y="88" width="500" height="200" rx="16" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.6"/>
|
||||
<text x="940" y="130" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#0f766e">deploy hook 적용</text>
|
||||
<text x="940" y="214" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="62" font-weight="700" fill="#17212b">1–2 s</text>
|
||||
<text x="940" y="258" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">reload까지 이어져 바로 반영</text>
|
||||
<line x1="586" y1="188" x2="676" y2="188" stroke="#17212b" stroke-width="3.5" marker-end="url(#a)"/>
|
||||
<text x="630" y="344" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">certbot timer는 성공하고 있었고, 빠져 있던 것은 reload를 거는 deploy hook이었습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,34 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="26" y="26" width="594" height="400" rx="16" fill="#fbfcfd" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="323" y="60" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">LATERAL이 60행에서 멈춘 이유</text>
|
||||
<rect x="60" y="90" width="526" height="74" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<circle cx="102" cy="127" r="22" fill="#0f766e"/>
|
||||
<text x="102" y="134" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#fff">1</text>
|
||||
<text x="148" y="134" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">부모 id 하나를 받아</text>
|
||||
<line x1="323" y1="164" x2="323" y2="186" stroke="#0f766e" stroke-width="2.6" marker-end="url(#t)"/>
|
||||
<rect x="60" y="198" width="526" height="74" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<circle cx="102" cy="235" r="22" fill="#0f766e"/>
|
||||
<text x="102" y="242" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#fff">2</text>
|
||||
<text x="148" y="242" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">(feed_item_id, created_at DESC) index를 seek</text>
|
||||
<line x1="323" y1="272" x2="323" y2="294" stroke="#0f766e" stroke-width="2.6" marker-end="url(#t)"/>
|
||||
<rect x="60" y="306" width="526" height="74" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.2"/>
|
||||
<circle cx="102" cy="343" r="22" fill="#0f766e"/>
|
||||
<text x="102" y="350" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="20" font-weight="700" fill="#fff">3</text>
|
||||
<text x="148" y="350" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="600" fill="#17212b">LIMIT 3에서 중단</text>
|
||||
<text x="323" y="408" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#0f766e">부모 20개 × 3행 = 60행만 읽음</text>
|
||||
<rect x="640" y="26" width="594" height="400" rx="16" fill="#fbfcfd" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="937" y="60" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="19" font-weight="700" fill="#17212b">같은 query에서 index만 제거하면</text>
|
||||
<rect x="674" y="92" width="526" height="132" rx="14" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.4"/>
|
||||
<text x="700" y="130" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#0f766e">index on</text>
|
||||
<text x="1174" y="130" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">Index Scan + Limit</text>
|
||||
<text x="800" y="192" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="30" font-weight="700" fill="#17212b">168 buffers</text>
|
||||
<text x="1075" y="192" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="30" font-weight="700" fill="#0f766e">0.336 ms</text>
|
||||
<rect x="674" y="244" width="526" height="132" rx="14" fill="#fef2f2" stroke="#b91c1c" stroke-width="2.4"/>
|
||||
<text x="700" y="282" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#b91c1c">index off</text>
|
||||
<text x="1174" y="282" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="400" fill="#64748b">Seq Scan</text>
|
||||
<text x="800" y="344" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="30" font-weight="700" fill="#17212b">4,446 buffers</text>
|
||||
<text x="1075" y="344" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="30" font-weight="700" fill="#b91c1c">5.472 ms</text>
|
||||
<text x="937" y="408" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="17" font-weight="700" fill="#b91c1c">query 문법은 같았고 access path만 달라졌습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,32 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="360" viewBox="0 0 1260 360">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker></defs>
|
||||
<rect width="1260" height="360" fill="white"/>
|
||||
<text x="40" y="32" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="22" font-weight="700" fill="#17212b">Top-3 per parent</text>
|
||||
<text x="40" y="58" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="500" fill="#64748b">20 parents · K=3 · composite index available</text>
|
||||
<rect x="150" y="134.1" width="120" height="150.9" rx="7" fill="#d97706"/>
|
||||
<text x="210" y="123.11111111111111" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="800" fill="#d97706">1.552 ms</text>
|
||||
<text x="210" y="312" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">Window</text>
|
||||
<text x="210" y="336" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="600" fill="#64748b">430 buffers · 1,509 read</text>
|
||||
<rect x="380" y="253.6" width="120" height="31.4" rx="7" fill="#0f766e"/>
|
||||
<text x="440" y="242.59722222222223" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="800" fill="#0f766e">0.323 ms</text>
|
||||
<text x="440" y="312" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">LATERAL</text>
|
||||
<text x="440" y="336" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="600" fill="#64748b">204 buffers · 60 read</text>
|
||||
<rect x="610" y="121.1" width="120" height="163.9" rx="7" fill="#2563eb"/>
|
||||
<text x="670" y="110.08333333333334" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="800" fill="#2563eb">1.686 ms</text>
|
||||
<text x="670" y="312" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="13.5" font-weight="700" fill="#17212b">2-step</text>
|
||||
<text x="670" y="336" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="11.5" font-weight="600" fill="#64748b">430 buffers · 1,509 read</text>
|
||||
<line x1="780" y1="72" x2="780" y2="320" stroke="#dbe2e7" stroke-width="2"/>
|
||||
<text x="835" y="105" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="15" font-weight="800" fill="#17212b">Why LATERAL stopped early</text>
|
||||
<circle cx="850" cy="120" r="15" fill="#0f766e"/>
|
||||
<text x="850" y="125" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="900" fill="white">1</text>
|
||||
<text x="885" y="125" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">parent id</text>
|
||||
<line x1="850" y1="135" x2="850" y2="163" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<circle cx="850" cy="178" r="15" fill="#0f766e"/>
|
||||
<text x="850" y="183" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="900" fill="white">2</text>
|
||||
<text x="885" y="183" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">index seek</text>
|
||||
<line x1="850" y1="193" x2="850" y2="221" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<circle cx="850" cy="236" r="15" fill="#0f766e"/>
|
||||
<text x="850" y="241" text-anchor="middle" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12" font-weight="900" fill="white">3</text>
|
||||
<text x="885" y="241" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="14" font-weight="700" fill="#17212b">LIMIT 3</text>
|
||||
<text x="835" y="294" text-anchor="start" font-family="Noto Sans CJK KR,Arial,sans-serif" font-size="12.5" font-weight="700" fill="#0f766e">small K + large group + composite index</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,34 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1260" height="450" viewBox="0 0 1260 450">
|
||||
<defs><marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#17212b"/></marker><marker id="t" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#0f766e"/></marker><marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#2563eb"/></marker><marker id="o" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#d97706"/></marker><marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#b91c1c"/></marker><marker id="m" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10 z" fill="#64748b"/></marker></defs>
|
||||
<rect width="1260" height="450" fill="white"/>
|
||||
<rect x="26" y="34" width="1208" height="158" rx="16" fill="none" stroke="#dbe2e7" stroke-width="2" stroke-dasharray="8 7"/>
|
||||
<text x="50" y="62" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#64748b">K3s / Kubernetes</text>
|
||||
<rect x="26" y="254" width="1208" height="176" rx="16" fill="none" stroke="#0f766e" stroke-width="2" stroke-dasharray="8 7"/>
|
||||
<text x="50" y="282" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#0f766e">Vault 1.17.2</text>
|
||||
<rect x="64" y="78" width="270" height="92" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="199.0" y="120.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Vault Secrets Operator</text>
|
||||
<text x="199.0" y="144.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">ServiceAccount 보유</text>
|
||||
<rect x="640" y="78" width="270" height="92" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="775.0" y="120.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Kubernetes Secret</text>
|
||||
<text x="775.0" y="144.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">동기화 대상</text>
|
||||
<rect x="950" y="78" width="270" height="92" rx="12" fill="#eef4ff" stroke="#2563eb" stroke-width="2.5"/>
|
||||
<text x="1085.0" y="120.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Workload</text>
|
||||
<text x="1085.0" y="144.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">env / volume 으로만 소비</text>
|
||||
<line x1="910" y1="124" x2="946" y2="124" stroke="#2563eb" stroke-width="3" marker-end="url(#b)"/>
|
||||
<rect x="64" y="298" width="270" height="96" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="199.0" y="342.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">Kubernetes Auth</text>
|
||||
<text x="199.0" y="366.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">SA token 검증</text>
|
||||
<rect x="394" y="298" width="270" height="96" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="529.0" y="342.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">policy / role</text>
|
||||
<text x="529.0" y="366.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">읽을 수 있는 path 결정</text>
|
||||
<rect x="724" y="298" width="270" height="96" rx="12" fill="#ecf8f6" stroke="#0f766e" stroke-width="2.5"/>
|
||||
<text x="859.0" y="342.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="18" font-weight="700" fill="#17212b">KV-v2</text>
|
||||
<text x="859.0" y="366.0" text-anchor="middle" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="14" font-weight="400" fill="#64748b">secret source of truth</text>
|
||||
<line x1="334" y1="346" x2="390" y2="346" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<line x1="664" y1="346" x2="720" y2="346" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<line x1="199" y1="170" x2="199" y2="294" stroke="#0f766e" stroke-width="3" marker-end="url(#t)"/>
|
||||
<text x="215" y="228" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#0f766e">① ServiceAccount token 제출</text>
|
||||
<path d="M859 294 V226 H775 V174" fill="none" stroke="#d97706" stroke-width="3" marker-end="url(#o)"/>
|
||||
<text x="884" y="220" text-anchor="start" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#d97706">② 허용된 path만 읽어 Secret으로 동기화</text>
|
||||
<text x="1200" y="414" text-anchor="end" font-family="Noto Sans CJK KR,Noto Sans KR,Arial,sans-serif" font-size="15" font-weight="700" fill="#0f766e">workload는 Vault token을 갖지 않습니다</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,373 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>01-backend-performance-portfolio</title>
|
||||
<style>:root {
|
||||
color-scheme: light;
|
||||
--ink: #17212b;
|
||||
--muted: #5c6b77;
|
||||
--rule: #dbe2e7;
|
||||
--accent: #0f766e;
|
||||
--accent-dark: #0b5f59;
|
||||
--soft: #f2f8f7;
|
||||
--soft-2: #f6f8fa;
|
||||
--card: #ffffff;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: 297mm 167mm;
|
||||
margin: 10mm 14mm 9mm;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
|
||||
font-size: 9.15pt;
|
||||
line-height: 1.42;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 0;
|
||||
line-height: 1.18;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
/* Each page is exactly the content box, so its figure can flex into the slack. */
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 148mm;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page + .page {
|
||||
break-before: page;
|
||||
}
|
||||
|
||||
.page > h1 {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 1mm;
|
||||
padding-bottom: 2.2mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 21.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 3mm;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
font-size: 26pt;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 3.4mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 2.5mm;
|
||||
font-size: 10.8pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.4mm 0;
|
||||
}
|
||||
|
||||
strong { font-weight: 850; }
|
||||
|
||||
a {
|
||||
color: #0b5cad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
margin: 2.5mm 0;
|
||||
border: 0;
|
||||
background: var(--rule);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 2mm 0 2.4mm;
|
||||
padding: 2mm 2.6mm;
|
||||
border: 0;
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 3px;
|
||||
background: var(--soft);
|
||||
color: #28433f;
|
||||
font-size: 9.1pt;
|
||||
}
|
||||
|
||||
blockquote p { margin: 0; }
|
||||
|
||||
ul, ol {
|
||||
margin: 1.3mm 0 2mm;
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: .65mm 0;
|
||||
padding-left: .4mm;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: .1mm .55mm;
|
||||
border-radius: 2px;
|
||||
background: #eef2f4;
|
||||
color: #23303c;
|
||||
font-family: "JetBrains Mono", "D2Coding", Consolas, monospace;
|
||||
font-size: .91em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1.8mm 0;
|
||||
padding: 2mm 2.4mm;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 5px;
|
||||
background: var(--soft-2);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 7.5pt;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 1.8mm 0 2.3mm;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
font-size: 8.0pt;
|
||||
line-height: 1.32;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15mm 1.55mm;
|
||||
border-right: 1px solid var(--rule);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
vertical-align: top;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
border-top: 1px solid var(--rule);
|
||||
font-weight: 800;
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
td:first-child { border-left: 1px solid var(--rule); }
|
||||
tr:first-child td:first-child { border-top-left-radius: 5px; }
|
||||
tr:first-child td:last-child { border-top-right-radius: 5px; }
|
||||
tr:last-child td:first-child { border-bottom-left-radius: 5px; }
|
||||
tr:last-child td:last-child { border-bottom-right-radius: 5px; }
|
||||
|
||||
.two-col-table td:first-child {
|
||||
width: 33mm;
|
||||
background: #f7f9fa;
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.metric-table {
|
||||
border-spacing: 2mm 0;
|
||||
border-collapse: separate;
|
||||
margin-top: 2.3mm;
|
||||
}
|
||||
|
||||
.metric-table td {
|
||||
border: 0;
|
||||
text-align: center;
|
||||
background: var(--soft-2);
|
||||
}
|
||||
|
||||
.metric-table tr:first-child td {
|
||||
border: 0;
|
||||
padding-top: 2.3mm;
|
||||
padding-bottom: .8mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.metric-table tr:last-child td {
|
||||
padding-top: .7mm;
|
||||
padding-bottom: 2.3mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.0pt;
|
||||
}
|
||||
|
||||
.data-table tr:first-child td {
|
||||
background: #f3f6f7;
|
||||
color: #34424e;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
figure {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 0;
|
||||
margin: 1.6mm auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 0;
|
||||
margin: 0 auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
margin-top: .7mm;
|
||||
color: var(--muted);
|
||||
font-size: 6.8pt;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h2, h3, blockquote, table, figure {
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
tr, blockquote, figure {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
/* ── Cover: headline > experience axis > headline results > stack > contact ── */
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 6mm;
|
||||
font-size: 34pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 {
|
||||
margin-top: 3.4mm;
|
||||
max-width: 235mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 18.5pt;
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote {
|
||||
max-width: 235mm;
|
||||
margin-top: 3.6mm;
|
||||
padding: 2.6mm 3.2mm;
|
||||
font-size: 9.6pt;
|
||||
}
|
||||
|
||||
/* Headline results on the cover read louder than anything below them. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table {
|
||||
margin-top: 5.5mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table td {
|
||||
background: var(--soft);
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:first-child td {
|
||||
padding-top: 3.4mm;
|
||||
padding-bottom: 1.1mm;
|
||||
font-size: 19pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:last-child td {
|
||||
padding-bottom: 3.4mm;
|
||||
font-size: 8.4pt;
|
||||
}
|
||||
|
||||
/* Stack and contact are the quietest elements on the page. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p {
|
||||
margin-top: 4.2mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.6pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table {
|
||||
width: 118mm;
|
||||
margin-top: 3.4mm;
|
||||
font-size: 7.8pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td {
|
||||
padding: .85mm 1.4mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td:first-child {
|
||||
width: 26mm;
|
||||
}
|
||||
|
||||
/* ── Section pages ── */
|
||||
|
||||
/* The deck line under a section title stays subordinate to the h2 claim. */
|
||||
h2 + p strong:first-child {
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a { color: #0b5cad; }
|
||||
}
|
||||
|
||||
/* ── Figures ──────────────────────────────────────────────────────────────
|
||||
A figure is the flexible row of its .page column, so it receives exactly the
|
||||
space the text on that page leaves over and the image scales into it. Width
|
||||
(269mm of content box) is the binding constraint for wide diagrams, so the
|
||||
viewBox aspect ratio decides how large the labels inside an SVG end up:
|
||||
|
||||
rendered height(mm) = viewBox height / viewBox width * 269
|
||||
|
||||
A 1260x450 diagram therefore prints at ~96mm and its 20-unit labels at ~12pt.
|
||||
Nothing here caps the figure in millimetres; overflow is impossible because
|
||||
the page box is a fixed 148mm and the figure is the only element that flexes.
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
figcaption {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 1mm;
|
||||
font-size: 7.2pt;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<section class="page"><h1>강동현 · Backend Engineer</h1><h2>같은 조회를 query 수, 읽은 row, buffer, 실행 계획으로 나눠 비교했습니다</h2><blockquote><p>멘토링 과제로 진행한 Feed Query 성능 비교입니다. N+1, Batch Fetch, Projection, Top-N, index 의존성, pagination을 같은 데이터셋과 같은 측정 조건에서 비교했습니다. 뒤쪽에는 TechLog Backend에서 게시 상태와 module 경계, 인증 경계를 정리한 내용이 이어집니다.</p></blockquote><table class="metric-table"><tbody><tr><td><strong>2,022 → 23</strong></td><td><strong>1,569 → 0</strong></td><td><strong>2,000 → 20</strong></td></tr><tr><td>N=1,000 요청 1건의 PreparedStatement</td><td>Projection 적용 후 entity load</td><td>100번째 페이지에서 읽은 row</td></tr></tbody></table><p>PostgreSQL 16 · Hibernate Statistics · EXPLAIN (ANALYZE, BUFFERS) · Testcontainers · Java 21 · Spring Boot</p><table class="two-col-table"><tbody><tr><td>GitHub</td><td><a href="https://github.com/donghyeon-ka">github.com/donghyeon-ka</a></td></tr><tr><td>TechLog</td><td><a href="https://hyeonworks.com">hyeonworks.com</a></td></tr><tr><td>Email</td><td>donghyeonka68@gmail.com</td></tr></tbody></table></section>
|
||||
<section class="page"><h1>01 · Performance Lab · N+1 Baseline</h1><h2>요청 1건이 SQL 2,022개로 늘어났습니다</h2><p><strong>목록 1페이지를 여는 데 실제로 몇 번 질의하는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p><code>loadFeed(0, N)</code> 한 번이 N=1,000에서 PreparedStatement 2,022개를 만들었습니다. content 1 + count 1 + User 20 + Page 1,000 + Highlight 1,000으로 분해됩니다. 부모 행이 늘어난 만큼 질의가 따라 늘어나는 구조였습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/query-baseline-growth.svg" alt="WIDE"></figure><table class="data-table"><tbody><tr><td>N</td><td>Highlight collection</td><td>PreparedStatement</td><td>median (5)</td><td>max (5)</td></tr><tr><td>10</td><td>10</td><td>25</td><td>32.8 ms</td><td>36.1 ms</td></tr><tr><td>100</td><td>100</td><td>222</td><td>85.9 ms</td><td>108.3 ms</td></tr><tr><td>1,000</td><td>1,000</td><td><strong>2,022</strong></td><td>193.7 ms</td><td>238.4 ms</td></tr></tbody></table><p>PostgreSQL 16 Testcontainers · Hibernate Statistics · 동일 JVM · warm DB cache · single thread. 지연은 7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다.</p></section>
|
||||
<section class="page"><h1>02 · Performance Lab · Batch / Projection</h1><h2>PreparedStatement 2,022 → 23, entity load 1,569 → 0</h2><p><strong>왕복을 줄이는 것과 읽기 경로를 분리하는 것은 같은 선택인가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>같은 <code>loadFeed(0, N)</code>에서 조회 전략만 바꿔 N=1,000으로 다시 측정했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/query-growth.svg" alt="CHART"></figure><p>Batch Fetch는 PreparedStatement를 2,022 → 23으로, collection fetch를 1,000 → 10으로 줄였습니다. Projection은 query를 2개로 고정하고 entity load를 1,569 → 0으로 없앴습니다.</p><p>Batch는 기존 entity 조회 구조를 그대로 두고 왕복만 줄인 최적화이고, Projection은 읽기 전용 contract를 따로 만들어 경로 자체를 나눈 선택입니다. Projection 쪽은 수정 경로에서 쓰던 entity 기능을 쓸 수 없으므로, 목록처럼 읽기만 하는 화면에만 적용했습니다.</p></section>
|
||||
<section class="page"><h1>03 · Performance Lab · Top-N & Index</h1><h2>LATERAL은 index가 있을 때만 60행에서 멈췄습니다</h2><p><strong>부모별 최신 3건을 가져오려고 전체 row를 정렬해야 하는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>부모 20개에서 각각 최신 3건을 가져오는 질의를 Window Function / LATERAL / 2-step으로 비교한 뒤, 이긴 계획이 무엇에 기대고 있는지 다시 확인했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/topn-lateral-index.svg" alt="CHART"></figure><ul><li>Window: 60 rows · 430 buffers · 1.552 ms</li><li>LATERAL: 60 rows · <strong>204 buffers · 0.323 ms</strong></li><li>2-step: 1,509 rows · 430 buffers · 1.686 ms</li></ul><p>LATERAL이 빠른 기법이어서가 아니라, 부모별로 원하는 row를 바로 찾을 composite index가 있어서 <code>LIMIT 3</code>에서 멈출 수 있었습니다. 작은 K와 큰 group, 그리고 해당 index가 함께 있는 조건에서 측정한 결과입니다.</p></section>
|
||||
<section class="page"><h1>04 · Performance Lab · Pagination</h1><h2>100번째 페이지에서 OFFSET은 2,000행, Keyset은 20행을 읽었습니다</h2><p><strong>깊은 페이지에서 OFFSET은 무엇을 더 하고 있는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>seed 2,000건 · page size 20 · 같은 정렬 조건에서 마지막 페이지를 요청했습니다. OFFSET은 건너뛸 행도 일단 읽은 뒤 버리기 때문에 페이지가 깊어질수록 읽는 양이 같이 늘어납니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/pagination-depth.svg" alt="WIDE"></figure><ul><li>OFFSET 1980: 2,000 rows · 141 buffers · 0.996 ms</li><li>Keyset + index: <strong>20 rows · 1 buffer · 0.076 ms</strong></li></ul><p>Keyset이 항상 빠른 것은 아니고, 정렬 key가 안정적이고 cursor로 이어서 탐색하는 화면에서만 성립합니다. 같은 keyset 조건이어도 정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다.</p></section>
|
||||
<section class="page"><h1>05 · TechLog · Publication Workflow</h1><h2>저장되는 시점과 공개되는 시점을 분리했습니다</h2><p><strong>Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>Studio에서는 글을 고치는 동안 저장이 계속 일어납니다. 초기 구현에서는 저장된 내용이 곧 공개 화면의 내용이었기 때문에, 검증을 통과하지 못한 문서도 링크만 알면 보였습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/techlog-publication-workflow.svg" alt="CHART"></figure><p>Create / Save / Validate / Preview / Publish를 각각 별도 use case로 나누고 working version과 publishedVersion을 따로 저장합니다. 검증에 실패하면 publish 단계로 넘어가지 않고, 문서나 dependency의 revision이 바뀌면 이전 preview는 stale로 표시됩니다. 공개 화면은 endpoint 여러 개의 응답을 조합해 게시 여부를 추측하지 않고 publication status와 publishedVersion만 봅니다.</p></section>
|
||||
<section class="page"><h1>06 · TechLog · Contract Drift</h1><h2>게시까지 끝난 글의 링크가 404로 끝났습니다</h2><p><strong>같은 public path를 몇 군데에서 만들고 있었는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다. contract, publisher, projection, frontend route가 각각 같은 public path를 따로 만들고 있었고, 그중 한 곳만 규칙이 달라도 목록과 상세가 어긋났습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/techlog-contract-drift.svg" alt="FULL"></figure><p>지금은 route contract 한 곳에서 path를 만들고, 경계를 넘을 때마다 같은 정의를 쓰는지 확인합니다.</p><ul><li>OpenAPI operation과 RecordKind가 adapter 등록에서 빠졌는지 검사</li><li>server가 응답한 path가 frontend route로 실제 해석되는지 검사</li><li>Nginx serving pattern도 같은 route contract에서 유도</li><li>RecordKind는 <code>Record<RecordKind, _></code>와 exhaustive switch로 누락이 컴파일 단계에서 드러나게 함</li></ul></section>
|
||||
<section class="page"><h1>07 · TechLog · Dependency Direction</h1><h2>의존 방향을 사람 기억이 아니라 build에서 막습니다</h2><p><strong>module 18개에서 참조해도 되는 방향을 누가 기억하는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>web / gRPC / GraphQL / WebSocket과 outbound adapter가 늘면서, 어떤 module이 어떤 module을 참조해도 되는지가 각 Gradle 파일에 흩어졌습니다. 규칙을 리뷰에서 걸러내는 방식으로는 module 18개를 감당하기 어려웠습니다. 허용 edge를 <code>modules.json</code>에 한 번 선언하고 실제 project dependency와 비교합니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/clean-architecture-gates.svg" alt="CHART"></figure><ul><li><code>domain-core</code> / <code>shared-contract</code>는 허용 project dependency 0</li><li>선언하지 않은 project edge는 Gradle <code>check</code>에서 실패</li><li>domain의 framework dependency와 application의 adapter / transport dependency는 ArchUnit class graph에서 실패</li></ul></section>
|
||||
<section class="page"><h1>08 · TechLog · Contract Ownership</h1><h2>inbound adapter가 만든 interface를 outbound adapter가 구현하고 있었습니다</h2><p><strong>adapter 하나를 바꿀 때 어디까지 같이 고쳐야 하는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, outer adapter끼리 직접 참조하는 project dependency가 생겼습니다. transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/clean-architecture-contract-ownership.svg" alt="CHART"></figure><p>port를 application이 소유하도록 옮겼습니다. 이제 adapter는 서로를 모르고 application port만 구현합니다.</p><ul><li>application이 호출하는 동작은 application port로 선언</li><li>여러 adapter가 같이 봐야 하는 최소 타입만 <code>shared-contract</code>에 둠</li><li><code>app-bootstrap</code>은 구현체 선택과 runtime 조립만 담당</li></ul></section>
|
||||
<section class="page"><h1>09 · Authentication · 패턴 비교</h1><h2>네 가지 인증 구조를 같은 네 가지 질문으로 비교했습니다</h2><p><strong>구조 이름 말고 무엇을 기준으로 고를 것인가?</strong> · 4-pattern 인증 실험 · Authorization Code + PKCE</p><p>SPA / Token Mediator / BFF / Forward-Auth를 같은 Authorization Code + PKCE 흐름으로 각각 구현했습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, 무엇을 검증하는지를 네 구조에 똑같이 물었습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/oauth-pattern-comparison.svg" alt="CHART"></figure><p>브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. 이 표는 네 구조를 모두 구현해 본 실험 결과이고, 이 가운데 두 가지를 TechLog에 실제로 넣었습니다.</p></section>
|
||||
<section class="page"><h1>10 · TechLog · Authentication Modes</h1><h2>TechLog에는 <code>jwt</code>와 <code>redis-session</code> 두 mode를 구현했습니다</h2><p><strong>같은 endpoint인데 상태는 어디에 남는가?</strong> · TechLog Backend · <code>SecurityConfig</code> runtime branch</p><p><code>SecurityConfig</code>는 <code>auth-mode</code> 값에 따라 두 SecurityFilterChain 중 하나를 고릅니다. 두 branch는 같은 endpoint를 서비스하지만 상태가 남는 위치가 다릅니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/oauth-techlog-boundaries.svg" alt="CHART"></figure><p><code>jwt</code>는 Resource Server가 서명만 검증하고 서버에 session을 만들지 않습니다. <code>redis-session</code>은 <code>oauth2Login</code>으로 session을 만들고 SecurityContext를 Redis에 보관하며, session cookie를 쓰는 만큼 CSRF token 경계가 함께 붙습니다. repository 기본값과 현재 로컬 <code>.env</code>는 <code>jwt</code>이고, 공개 배포가 어느 mode로 떠 있는지는 이 작업공간에서 확인되지 않아 단정하지 않습니다. Forward-Auth는 비교 실험 범위이고 TechLog security branch에는 넣지 않았습니다.</p></section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,373 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>01-backend-portfolio</title>
|
||||
<style>:root {
|
||||
color-scheme: light;
|
||||
--ink: #17212b;
|
||||
--muted: #5c6b77;
|
||||
--rule: #dbe2e7;
|
||||
--accent: #0f766e;
|
||||
--accent-dark: #0b5f59;
|
||||
--soft: #f2f8f7;
|
||||
--soft-2: #f6f8fa;
|
||||
--card: #ffffff;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: 297mm 167mm;
|
||||
margin: 10mm 14mm 9mm;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
|
||||
font-size: 9.15pt;
|
||||
line-height: 1.42;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 0;
|
||||
line-height: 1.18;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
/* Each page is exactly the content box, so its figure can flex into the slack. */
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 148mm;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page + .page {
|
||||
break-before: page;
|
||||
}
|
||||
|
||||
.page > h1 {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 1mm;
|
||||
padding-bottom: 2.2mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 21.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 3mm;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
font-size: 26pt;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 3.4mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 2.5mm;
|
||||
font-size: 10.8pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.4mm 0;
|
||||
}
|
||||
|
||||
strong { font-weight: 850; }
|
||||
|
||||
a {
|
||||
color: #0b5cad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
margin: 2.5mm 0;
|
||||
border: 0;
|
||||
background: var(--rule);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 2mm 0 2.4mm;
|
||||
padding: 2mm 2.6mm;
|
||||
border: 0;
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 3px;
|
||||
background: var(--soft);
|
||||
color: #28433f;
|
||||
font-size: 9.1pt;
|
||||
}
|
||||
|
||||
blockquote p { margin: 0; }
|
||||
|
||||
ul, ol {
|
||||
margin: 1.3mm 0 2mm;
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: .65mm 0;
|
||||
padding-left: .4mm;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: .1mm .55mm;
|
||||
border-radius: 2px;
|
||||
background: #eef2f4;
|
||||
color: #23303c;
|
||||
font-family: "JetBrains Mono", "D2Coding", Consolas, monospace;
|
||||
font-size: .91em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1.8mm 0;
|
||||
padding: 2mm 2.4mm;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 5px;
|
||||
background: var(--soft-2);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 7.5pt;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 1.8mm 0 2.3mm;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
font-size: 8.0pt;
|
||||
line-height: 1.32;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15mm 1.55mm;
|
||||
border-right: 1px solid var(--rule);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
vertical-align: top;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
border-top: 1px solid var(--rule);
|
||||
font-weight: 800;
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
td:first-child { border-left: 1px solid var(--rule); }
|
||||
tr:first-child td:first-child { border-top-left-radius: 5px; }
|
||||
tr:first-child td:last-child { border-top-right-radius: 5px; }
|
||||
tr:last-child td:first-child { border-bottom-left-radius: 5px; }
|
||||
tr:last-child td:last-child { border-bottom-right-radius: 5px; }
|
||||
|
||||
.two-col-table td:first-child {
|
||||
width: 33mm;
|
||||
background: #f7f9fa;
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.metric-table {
|
||||
border-spacing: 2mm 0;
|
||||
border-collapse: separate;
|
||||
margin-top: 2.3mm;
|
||||
}
|
||||
|
||||
.metric-table td {
|
||||
border: 0;
|
||||
text-align: center;
|
||||
background: var(--soft-2);
|
||||
}
|
||||
|
||||
.metric-table tr:first-child td {
|
||||
border: 0;
|
||||
padding-top: 2.3mm;
|
||||
padding-bottom: .8mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.metric-table tr:last-child td {
|
||||
padding-top: .7mm;
|
||||
padding-bottom: 2.3mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.0pt;
|
||||
}
|
||||
|
||||
.data-table tr:first-child td {
|
||||
background: #f3f6f7;
|
||||
color: #34424e;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
figure {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 0;
|
||||
margin: 1.6mm auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 0;
|
||||
margin: 0 auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
margin-top: .7mm;
|
||||
color: var(--muted);
|
||||
font-size: 6.8pt;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h2, h3, blockquote, table, figure {
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
tr, blockquote, figure {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
/* ── Cover: headline > experience axis > headline results > stack > contact ── */
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 6mm;
|
||||
font-size: 34pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 {
|
||||
margin-top: 3.4mm;
|
||||
max-width: 235mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 18.5pt;
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote {
|
||||
max-width: 235mm;
|
||||
margin-top: 3.6mm;
|
||||
padding: 2.6mm 3.2mm;
|
||||
font-size: 9.6pt;
|
||||
}
|
||||
|
||||
/* Headline results on the cover read louder than anything below them. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table {
|
||||
margin-top: 5.5mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table td {
|
||||
background: var(--soft);
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:first-child td {
|
||||
padding-top: 3.4mm;
|
||||
padding-bottom: 1.1mm;
|
||||
font-size: 19pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:last-child td {
|
||||
padding-bottom: 3.4mm;
|
||||
font-size: 8.4pt;
|
||||
}
|
||||
|
||||
/* Stack and contact are the quietest elements on the page. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p {
|
||||
margin-top: 4.2mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.6pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table {
|
||||
width: 118mm;
|
||||
margin-top: 3.4mm;
|
||||
font-size: 7.8pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td {
|
||||
padding: .85mm 1.4mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td:first-child {
|
||||
width: 26mm;
|
||||
}
|
||||
|
||||
/* ── Section pages ── */
|
||||
|
||||
/* The deck line under a section title stays subordinate to the h2 claim. */
|
||||
h2 + p strong:first-child {
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a { color: #0b5cad; }
|
||||
}
|
||||
|
||||
/* ── Figures ──────────────────────────────────────────────────────────────
|
||||
A figure is the flexible row of its .page column, so it receives exactly the
|
||||
space the text on that page leaves over and the image scales into it. Width
|
||||
(269mm of content box) is the binding constraint for wide diagrams, so the
|
||||
viewBox aspect ratio decides how large the labels inside an SVG end up:
|
||||
|
||||
rendered height(mm) = viewBox height / viewBox width * 269
|
||||
|
||||
A 1260x450 diagram therefore prints at ~96mm and its 20-unit labels at ~12pt.
|
||||
Nothing here caps the figure in millimetres; overflow is impossible because
|
||||
the page box is a fixed 148mm and the figure is the only element that flexes.
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
figcaption {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 1mm;
|
||||
font-size: 7.2pt;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<section class="page"><h1>강동현 · Backend Engineer</h1><h2>게시 상태와 module 경계, 인증 경계를 코드로 고정해 왔습니다</h2><blockquote><p>TechLog Backend를 만들면서 겪은 세 가지 문제를 정리했습니다. 초안이 그대로 공개된 문제, 경로 계약이 흩어져 404가 난 문제, adapter가 늘면서 의존 방향이 사람 기억에 남은 문제입니다. 뒤쪽 Feed Query 성능 비교는 별도 멘토링 과제입니다.</p></blockquote><table class="metric-table"><tbody><tr><td><strong>초안 공개 차단</strong></td><td><strong>404 재발 차단</strong></td><td><strong>의존 방향 위반 차단</strong></td></tr><tr><td>validate·preview를 통과한 version만 publish</td><td>route contract 한 곳에서 path 생성</td><td>선언하지 않은 module edge는 build 실패</td></tr></tbody></table><p>Java 21 · Spring Boot · Spring Security · JPA · PostgreSQL · Gradle · ArchUnit · Testcontainers</p><table class="two-col-table"><tbody><tr><td>GitHub</td><td><a href="https://github.com/donghyeon-ka">github.com/donghyeon-ka</a></td></tr><tr><td>TechLog</td><td><a href="https://hyeonworks.com">hyeonworks.com</a></td></tr><tr><td>Email</td><td>donghyeonka68@gmail.com</td></tr></tbody></table></section>
|
||||
<section class="page"><h1>01 · TechLog · Publication Workflow</h1><h2>저장되는 시점과 공개되는 시점을 분리했습니다</h2><p><strong>Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>Studio에서는 글을 고치는 동안 저장이 계속 일어납니다. 초기 구현에서는 저장된 내용이 곧 공개 화면의 내용이었기 때문에, 검증을 통과하지 못한 문서도 링크만 알면 보였습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/techlog-publication-workflow.svg" alt="CHART"></figure><p>Create / Save / Validate / Preview / Publish를 각각 별도 use case로 나누고 working version과 publishedVersion을 따로 저장합니다. 검증에 실패하면 publish 단계로 넘어가지 않고, 문서나 dependency의 revision이 바뀌면 이전 preview는 stale로 표시됩니다. 공개 화면은 endpoint 여러 개의 응답을 조합해 게시 여부를 추측하지 않고 publication status와 publishedVersion만 봅니다.</p></section>
|
||||
<section class="page"><h1>02 · TechLog · Contract Drift</h1><h2>게시까지 끝난 글의 링크가 404로 끝났습니다</h2><p><strong>같은 public path를 몇 군데에서 만들고 있었는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다. contract, publisher, projection, frontend route가 각각 같은 public path를 따로 만들고 있었고, 그중 한 곳만 규칙이 달라도 목록과 상세가 어긋났습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/techlog-contract-drift.svg" alt="FULL"></figure><p>지금은 route contract 한 곳에서 path를 만들고, 경계를 넘을 때마다 같은 정의를 쓰는지 확인합니다.</p><ul><li>OpenAPI operation과 RecordKind가 adapter 등록에서 빠졌는지 검사</li><li>server가 응답한 path가 frontend route로 실제 해석되는지 검사</li><li>Nginx serving pattern도 같은 route contract에서 유도</li><li>RecordKind는 <code>Record<RecordKind, _></code>와 exhaustive switch로 누락이 컴파일 단계에서 드러나게 함</li></ul></section>
|
||||
<section class="page"><h1>03 · TechLog · Dependency Direction</h1><h2>의존 방향을 사람 기억이 아니라 build에서 막습니다</h2><p><strong>module 18개에서 참조해도 되는 방향을 누가 기억하는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>web / gRPC / GraphQL / WebSocket과 outbound adapter가 늘면서, 어떤 module이 어떤 module을 참조해도 되는지가 각 Gradle 파일에 흩어졌습니다. 규칙을 리뷰에서 걸러내는 방식으로는 module 18개를 감당하기 어려웠습니다. 허용 edge를 <code>modules.json</code>에 한 번 선언하고 실제 project dependency와 비교합니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/clean-architecture-gates.svg" alt="CHART"></figure><ul><li><code>domain-core</code> / <code>shared-contract</code>는 허용 project dependency 0</li><li>선언하지 않은 project edge는 Gradle <code>check</code>에서 실패</li><li>domain의 framework dependency와 application의 adapter / transport dependency는 ArchUnit class graph에서 실패</li></ul></section>
|
||||
<section class="page"><h1>04 · TechLog · Contract Ownership</h1><h2>inbound adapter가 만든 interface를 outbound adapter가 구현하고 있었습니다</h2><p><strong>adapter 하나를 바꿀 때 어디까지 같이 고쳐야 하는가?</strong> · TechLog Backend · 개인 프로젝트</p><p>inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, outer adapter끼리 직접 참조하는 project dependency가 생겼습니다. transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/clean-architecture-contract-ownership.svg" alt="CHART"></figure><p>port를 application이 소유하도록 옮겼습니다. 이제 adapter는 서로를 모르고 application port만 구현합니다.</p><ul><li>application이 호출하는 동작은 application port로 선언</li><li>여러 adapter가 같이 봐야 하는 최소 타입만 <code>shared-contract</code>에 둠</li><li><code>app-bootstrap</code>은 구현체 선택과 runtime 조립만 담당</li></ul></section>
|
||||
<section class="page"><h1>05 · Authentication · 패턴 비교</h1><h2>네 가지 인증 구조를 같은 네 가지 질문으로 비교했습니다</h2><p><strong>구조 이름 말고 무엇을 기준으로 고를 것인가?</strong> · 4-pattern 인증 실험 · Authorization Code + PKCE</p><p>SPA / Token Mediator / BFF / Forward-Auth를 같은 Authorization Code + PKCE 흐름으로 각각 구현했습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, 무엇을 검증하는지를 네 구조에 똑같이 물었습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/oauth-pattern-comparison.svg" alt="CHART"></figure><p>브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. 이 표는 네 구조를 모두 구현해 본 실험 결과이고, 이 가운데 두 가지를 TechLog에 실제로 넣었습니다.</p></section>
|
||||
<section class="page"><h1>06 · TechLog · Authentication Modes</h1><h2>TechLog에는 <code>jwt</code>와 <code>redis-session</code> 두 mode를 구현했습니다</h2><p><strong>같은 endpoint인데 상태는 어디에 남는가?</strong> · TechLog Backend · <code>SecurityConfig</code> runtime branch</p><p><code>SecurityConfig</code>는 <code>auth-mode</code> 값에 따라 두 SecurityFilterChain 중 하나를 고릅니다. 두 branch는 같은 endpoint를 서비스하지만 상태가 남는 위치가 다릅니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/oauth-techlog-boundaries.svg" alt="CHART"></figure><p><code>jwt</code>는 Resource Server가 서명만 검증하고 서버에 session을 만들지 않습니다. <code>redis-session</code>은 <code>oauth2Login</code>으로 session을 만들고 SecurityContext를 Redis에 보관하며, session cookie를 쓰는 만큼 CSRF token 경계가 함께 붙습니다. repository 기본값과 현재 로컬 <code>.env</code>는 <code>jwt</code>이고, 공개 배포가 어느 mode로 떠 있는지는 이 작업공간에서 확인되지 않아 단정하지 않습니다. Forward-Auth는 비교 실험 범위이고 TechLog security branch에는 넣지 않았습니다.</p></section>
|
||||
<section class="page"><h1>07 · Performance Lab · N+1 Baseline</h1><h2>요청 1건이 SQL 2,022개로 늘어났습니다</h2><p><strong>목록 1페이지를 여는 데 실제로 몇 번 질의하는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p><code>loadFeed(0, N)</code> 한 번이 N=1,000에서 PreparedStatement 2,022개를 만들었습니다. content 1 + count 1 + User 20 + Page 1,000 + Highlight 1,000으로 분해됩니다. 부모 행이 늘어난 만큼 질의가 따라 늘어나는 구조였습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/query-baseline-growth.svg" alt="WIDE"></figure><table class="data-table"><tbody><tr><td>N</td><td>Highlight collection</td><td>PreparedStatement</td><td>median (5)</td><td>max (5)</td></tr><tr><td>10</td><td>10</td><td>25</td><td>32.8 ms</td><td>36.1 ms</td></tr><tr><td>100</td><td>100</td><td>222</td><td>85.9 ms</td><td>108.3 ms</td></tr><tr><td>1,000</td><td>1,000</td><td><strong>2,022</strong></td><td>193.7 ms</td><td>238.4 ms</td></tr></tbody></table><p>PostgreSQL 16 Testcontainers · Hibernate Statistics · 동일 JVM · warm DB cache · single thread. 지연은 7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다.</p></section>
|
||||
<section class="page"><h1>08 · Performance Lab · Batch / Projection</h1><h2>PreparedStatement 2,022 → 23, entity load 1,569 → 0</h2><p><strong>왕복을 줄이는 것과 읽기 경로를 분리하는 것은 같은 선택인가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>같은 <code>loadFeed(0, N)</code>에서 조회 전략만 바꿔 N=1,000으로 다시 측정했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/query-growth.svg" alt="CHART"></figure><p>Batch Fetch는 PreparedStatement를 2,022 → 23으로, collection fetch를 1,000 → 10으로 줄였습니다. Projection은 query를 2개로 고정하고 entity load를 1,569 → 0으로 없앴습니다.</p><p>Batch는 기존 entity 조회 구조를 그대로 두고 왕복만 줄인 최적화이고, Projection은 읽기 전용 contract를 따로 만들어 경로 자체를 나눈 선택입니다. Projection 쪽은 수정 경로에서 쓰던 entity 기능을 쓸 수 없으므로, 목록처럼 읽기만 하는 화면에만 적용했습니다.</p></section>
|
||||
<section class="page"><h1>09 · Performance Lab · Top-N & Index</h1><h2>LATERAL은 index가 있을 때만 60행에서 멈췄습니다</h2><p><strong>부모별 최신 3건을 가져오려고 전체 row를 정렬해야 하는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>부모 20개에서 각각 최신 3건을 가져오는 질의를 Window Function / LATERAL / 2-step으로 비교한 뒤, 이긴 계획이 무엇에 기대고 있는지 다시 확인했습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/topn-lateral-index.svg" alt="CHART"></figure><ul><li>Window: 60 rows · 430 buffers · 1.552 ms</li><li>LATERAL: 60 rows · <strong>204 buffers · 0.323 ms</strong></li><li>2-step: 1,509 rows · 430 buffers · 1.686 ms</li></ul><p>LATERAL이 빠른 기법이어서가 아니라, 부모별로 원하는 row를 바로 찾을 composite index가 있어서 <code>LIMIT 3</code>에서 멈출 수 있었습니다. 작은 K와 큰 group, 그리고 해당 index가 함께 있는 조건에서 측정한 결과입니다.</p></section>
|
||||
<section class="page"><h1>10 · Performance Lab · Pagination</h1><h2>100번째 페이지에서 OFFSET은 2,000행, Keyset은 20행을 읽었습니다</h2><p><strong>깊은 페이지에서 OFFSET은 무엇을 더 하고 있는가?</strong> · 별도 멘토링 과제 · Feed Query Performance Lab</p><p>seed 2,000건 · page size 20 · 같은 정렬 조건에서 마지막 페이지를 요청했습니다. OFFSET은 건너뛸 행도 일단 읽은 뒤 버리기 때문에 페이지가 깊어질수록 읽는 양이 같이 늘어납니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/pagination-depth.svg" alt="WIDE"></figure><ul><li>OFFSET 1980: 2,000 rows · 141 buffers · 0.996 ms</li><li>Keyset + index: <strong>20 rows · 1 buffer · 0.076 ms</strong></li></ul><p>Keyset이 항상 빠른 것은 아니고, 정렬 key가 안정적이고 cursor로 이어서 탐색하는 화면에서만 성립합니다. 같은 keyset 조건이어도 정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다.</p></section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,373 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>02-infra-platform-portfolio</title>
|
||||
<style>:root {
|
||||
color-scheme: light;
|
||||
--ink: #17212b;
|
||||
--muted: #5c6b77;
|
||||
--rule: #dbe2e7;
|
||||
--accent: #0f766e;
|
||||
--accent-dark: #0b5f59;
|
||||
--soft: #f2f8f7;
|
||||
--soft-2: #f6f8fa;
|
||||
--card: #ffffff;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: 297mm 167mm;
|
||||
margin: 10mm 14mm 9mm;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
|
||||
font-size: 9.15pt;
|
||||
line-height: 1.42;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
main {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 0;
|
||||
line-height: 1.18;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
/* Each page is exactly the content box, so its figure can flex into the slack. */
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 148mm;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page + .page {
|
||||
break-before: page;
|
||||
}
|
||||
|
||||
.page > h1 {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 1mm;
|
||||
padding-bottom: 2.2mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 21.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 3mm;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
font-size: 26pt;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 3.4mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 2.5mm;
|
||||
font-size: 10.8pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.4mm 0;
|
||||
}
|
||||
|
||||
strong { font-weight: 850; }
|
||||
|
||||
a {
|
||||
color: #0b5cad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
margin: 2.5mm 0;
|
||||
border: 0;
|
||||
background: var(--rule);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 2mm 0 2.4mm;
|
||||
padding: 2mm 2.6mm;
|
||||
border: 0;
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 3px;
|
||||
background: var(--soft);
|
||||
color: #28433f;
|
||||
font-size: 9.1pt;
|
||||
}
|
||||
|
||||
blockquote p { margin: 0; }
|
||||
|
||||
ul, ol {
|
||||
margin: 1.3mm 0 2mm;
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: .65mm 0;
|
||||
padding-left: .4mm;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: .1mm .55mm;
|
||||
border-radius: 2px;
|
||||
background: #eef2f4;
|
||||
color: #23303c;
|
||||
font-family: "JetBrains Mono", "D2Coding", Consolas, monospace;
|
||||
font-size: .91em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 1.8mm 0;
|
||||
padding: 2mm 2.4mm;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 5px;
|
||||
background: var(--soft-2);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 7.5pt;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 1.8mm 0 2.3mm;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
font-size: 8.0pt;
|
||||
line-height: 1.32;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15mm 1.55mm;
|
||||
border-right: 1px solid var(--rule);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
vertical-align: top;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
border-top: 1px solid var(--rule);
|
||||
font-weight: 800;
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
td:first-child { border-left: 1px solid var(--rule); }
|
||||
tr:first-child td:first-child { border-top-left-radius: 5px; }
|
||||
tr:first-child td:last-child { border-top-right-radius: 5px; }
|
||||
tr:last-child td:first-child { border-bottom-left-radius: 5px; }
|
||||
tr:last-child td:last-child { border-bottom-right-radius: 5px; }
|
||||
|
||||
.two-col-table td:first-child {
|
||||
width: 33mm;
|
||||
background: #f7f9fa;
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.metric-table {
|
||||
border-spacing: 2mm 0;
|
||||
border-collapse: separate;
|
||||
margin-top: 2.3mm;
|
||||
}
|
||||
|
||||
.metric-table td {
|
||||
border: 0;
|
||||
text-align: center;
|
||||
background: var(--soft-2);
|
||||
}
|
||||
|
||||
.metric-table tr:first-child td {
|
||||
border: 0;
|
||||
padding-top: 2.3mm;
|
||||
padding-bottom: .8mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.metric-table tr:last-child td {
|
||||
padding-top: .7mm;
|
||||
padding-bottom: 2.3mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.0pt;
|
||||
}
|
||||
|
||||
.data-table tr:first-child td {
|
||||
background: #f3f6f7;
|
||||
color: #34424e;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
figure {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 0;
|
||||
margin: 1.6mm auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 0;
|
||||
margin: 0 auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
margin-top: .7mm;
|
||||
color: var(--muted);
|
||||
font-size: 6.8pt;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h2, h3, blockquote, table, figure {
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
tr, blockquote, figure {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
/* ── Cover: headline > experience axis > headline results > stack > contact ── */
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 6mm;
|
||||
font-size: 34pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 {
|
||||
margin-top: 3.4mm;
|
||||
max-width: 235mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 18.5pt;
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote {
|
||||
max-width: 235mm;
|
||||
margin-top: 3.6mm;
|
||||
padding: 2.6mm 3.2mm;
|
||||
font-size: 9.6pt;
|
||||
}
|
||||
|
||||
/* Headline results on the cover read louder than anything below them. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table {
|
||||
margin-top: 5.5mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table td {
|
||||
background: var(--soft);
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:first-child td {
|
||||
padding-top: 3.4mm;
|
||||
padding-bottom: 1.1mm;
|
||||
font-size: 19pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:last-child td {
|
||||
padding-bottom: 3.4mm;
|
||||
font-size: 8.4pt;
|
||||
}
|
||||
|
||||
/* Stack and contact are the quietest elements on the page. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p {
|
||||
margin-top: 4.2mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.6pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table {
|
||||
width: 118mm;
|
||||
margin-top: 3.4mm;
|
||||
font-size: 7.8pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td {
|
||||
padding: .85mm 1.4mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td:first-child {
|
||||
width: 26mm;
|
||||
}
|
||||
|
||||
/* ── Section pages ── */
|
||||
|
||||
/* The deck line under a section title stays subordinate to the h2 claim. */
|
||||
h2 + p strong:first-child {
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a { color: #0b5cad; }
|
||||
}
|
||||
|
||||
/* ── Figures ──────────────────────────────────────────────────────────────
|
||||
A figure is the flexible row of its .page column, so it receives exactly the
|
||||
space the text on that page leaves over and the image scales into it. Width
|
||||
(269mm of content box) is the binding constraint for wide diagrams, so the
|
||||
viewBox aspect ratio decides how large the labels inside an SVG end up:
|
||||
|
||||
rendered height(mm) = viewBox height / viewBox width * 269
|
||||
|
||||
A 1260x450 diagram therefore prints at ~96mm and its 20-unit labels at ~12pt.
|
||||
Nothing here caps the figure in millimetres; overflow is impossible because
|
||||
the page box is a fixed 148mm and the figure is the only element that flexes.
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
figcaption {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 1mm;
|
||||
font-size: 7.2pt;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<section class="page"><h1>강동현 · Infrastructure / Platform Engineer</h1><h2>장애를 직접 재현하고, 무엇이 끊기고 무엇이 남는지 숫자로 확인했습니다</h2><blockquote><p>K3s home lab에서 요청 경로와 상태가 남는 위치를 먼저 찾고, DB 지연·rolling restart·인증서 갱신·동시 refresh 같은 조건을 직접 만들어 관측했습니다. 아래 숫자는 모두 그 실험에서 측정한 값입니다.</p></blockquote><table class="metric-table"><tbody><tr><td><strong>66 → 1,872 ms</strong></td><td><strong>151 → 151</strong></td><td><strong>2,305 s → 1–2 s</strong></td></tr><tr><td>DB에 200 ms 지연을 넣었을 때 login 응답</td><td>rolling restart 전후 DB session row</td><td>인증서 갱신이 실제 serving에 반영되는 시간</td></tr></tbody></table><p>K3s · Nginx · Traefik · Keycloak · PostgreSQL · Redis · Vault · Prometheus · Grafana · Loki · Tempo</p><table class="two-col-table"><tbody><tr><td>GitHub</td><td><a href="https://github.com/donghyeon-ka">github.com/donghyeon-ka</a></td></tr><tr><td>TechLog</td><td><a href="https://hyeonworks.com">hyeonworks.com</a></td></tr><tr><td>Email</td><td>donghyeonka68@gmail.com</td></tr></tbody></table></section>
|
||||
<section class="page"><h1>01 · Request Path</h1><h2>외부에서 cluster로 들어오는 문을 Host Nginx 하나로 줄였습니다</h2><p><strong>요청이 실제로 어느 순서로 들어오는가?</strong> · 개인 home lab / dev · Host Nginx · K3s · Traefik · CloudNativePG</p><p>TLS는 Host Nginx :443에서 끝나고, 그 뒤 hop은 모두 loopback 안에서만 일어납니다. Traefik NodePort를 <code>127.0.0.1</code>에만 bind해 LAN에서 NodePort로 직접 들어오는 경로를 없앴고, PostgreSQL Service에는 Ingress / NodePort / LoadBalancer를 두지 않았습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/platform-request-path-simple.svg" alt="WIDE"></figure><p>들어오는 문이 하나면 인증서, forwarded header, 차단 규칙을 한 곳에서만 맞추면 됩니다. 대신 그 한 곳이 단일 실패 지점이므로, 아래 Edge Trust에서 무엇까지 Host Nginx가 책임지는지 정리했습니다.</p><p><strong>Scope</strong> — 단일 물리 서버 home lab입니다. 1/1 Ready나 Local PV Retain을 HA나 backup으로 표현하지 않습니다.</p></section>
|
||||
<section class="page"><h1>02 · Edge Trust</h1><h2>forwarded header를 믿기 전에 누가 만들 수 있는지부터 막았습니다</h2><p><strong>클라이언트가 보낸 값과 edge가 확정한 값을 어디서 구분하는가?</strong> · Host Nginx · Traefik</p><p>외부 요청이 보낸 <code>X-Forwarded-*</code>는 신뢰하지 않고 Host Nginx가 다시 만듭니다. Traefik은 그 Host Nginx만 trusted proxy로 인정하므로, 내부에서 보이는 hostname과 client IP는 edge가 확정한 값입니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/edge-trust-simple.svg" alt="WIDE"></figure><ul><li>Host Nginx upstream: <code>127.0.0.1:30080</code></li><li>K3s NodePort bind: <code>127.0.0.0/8</code></li><li>Traefik trusted proxy: <code>10.42.0.1/32</code></li><li>관리 hostname: LAN <code>192.168.0.0/24</code> + Tailscale <code>100.64.0.0/10</code> allowlist</li><li>Gitea / Grafana / metrics의 외부 우회 경로는 404</li></ul></section>
|
||||
<section class="page"><h1>03 · Keycloak · Session State</h1><h2>Persistent user session은 PostgreSQL에, cache는 각 replica에 남습니다</h2><p><strong>replica를 늘리면 세션은 정말 유지되는가?</strong> · VM 2대 · 2-node K3s · Keycloak 26 · JGroups</p><p><code>persistent-user-sessions</code>를 켜면 user session의 durable state는 PostgreSQL에 남고, 각 replica는 그와 별개로 local cache를 가집니다. JGroups는 node discovery와 cluster transport를 담당할 뿐 durable state를 소유하지 않습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/keycloak-session-ownership.svg" alt="CHART"></figure><p>replica가 2개라는 사실만으로 세션이 유지되는 것이 아니라, 유지되는 이유가 외부 PostgreSQL에 있습니다. 다음 페이지에서 실제로 replica를 재시작해 어느 쪽이 남는지 확인했습니다.</p></section>
|
||||
<section class="page"><h1>04 · Keycloak · Rolling Restart</h1><h2>restart 중에도 DB session은 151 → 151로 그대로였습니다</h2><p><strong>재시작하면 무엇이 끊기고 무엇이 남는가?</strong> · rolling restart · 2-node K3s</p><p>재시작하는 동안 service 응답은 계속 HTTP 200이었고, PostgreSQL의 session row는 <strong>151 → 151</strong>로 유지됐습니다. 재시작한 replica의 local session cache만 0에서 다시 만들어졌고, 재시작 전에 발급한 refresh token도 이후 요청에서 HTTP 200을 받았습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/keycloak-restart-before-after.svg" alt="FULL"></figure><p><strong>Scope</strong> — 한 물리 서버 안의 2 VM lab 결과입니다. 물리 장애를 포함한 production HA 결과가 아닙니다.</p></section>
|
||||
<section class="page"><h1>05 · Keycloak · Latency Fault</h1><h2>DB에 넣은 200 ms가 login 1,872 ms와 readiness 실패까지 커졌습니다</h2><p><strong>한 곳의 지연은 어디까지 번지는가?</strong> · PostgreSQL 앞단에 200 ms 지연 주입 · 동시 20건</p><p>200 ms는 login 한 번에 여러 번 일어나는 DB round trip마다 붙었고, 느려진 요청이 connection을 오래 쥐면서 뒤 요청의 pool wait까지 끌어올렸습니다. 마지막에는 readiness probe가 timeout되어 느린 Pod가 load-balancing 대상에서 빠졌습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/keycloak-latency-cascade.svg" alt="TOPOLOGY"></figure><p>주입한 지연 자체보다, 그 지연이 connection pool과 readiness를 거치며 한 자릿수 배가 아니라 20배 이상으로 커진 점이 이 실험의 결과입니다.</p></section>
|
||||
<section class="page"><h1>06 · Keycloak · Refresh Rotation</h1><h2>같은 refresh token을 동시에 쓰자 client session이 끊겼습니다</h2><p><strong>rotation 중에 요청이 겹치면 어느 쪽이 실패하는가?</strong> · <code>revokeRefreshToken=true</code> · <code>refreshTokenMaxReuse=0</code> · 동일 token 5건 동시 요청</p><p>같은 refresh token으로 5건을 동시에 보냈습니다. 재사용이 감지된 뒤 client session이 무효화됐고, 그중 먼저 성공 응답으로 받아 둔 <strong>새 refresh token도 이후에는 쓸 수 없었습니다.</strong></p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/refresh-rotation-horizontal.svg" alt="WIDE"></figure><p>순차로 보냈을 때는 같은 현상이 나오지 않았습니다. 클라이언트 입장에서는 "refresh 한 번 실패"와 "세션 자체가 끊김"이 다른 상황이므로, error handling에서 이 둘을 구분해 재로그인으로 넘길지 판단해야 합니다.</p></section>
|
||||
<section class="page"><h1>07 · Keycloak · JWKS Cache</h1><h2>같은 token이 replica에 따라 200과 401로 갈렸습니다</h2><p><strong>서명 키를 지우면 각 replica는 언제 그것을 아는가?</strong> · Resource Server 2 replica · Nimbus JWKS cache</p><p>realm에서 old signing key를 지운 직후 같은 old access token으로 반복 요청했더니 응답이 <strong>401 → 200 → 401 → 200 → 401 → 200 → 401 → 200</strong>으로 번갈아 나왔습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/jwks-cache-replicas.svg" alt="TOPOLOGY"></figure><p>검증은 Keycloak이 매 요청마다 해 주는 것이 아니라 각 Resource Server replica가 자기 JWKS cache로 합니다. 두 replica의 cache 갱신 시점이 달라서, 한쪽은 아직 old key를 들고 200을, 다른 쪽은 새 JWKS를 반영해 401을 반환했습니다. key를 지운 시점만으로는 이 교차를 설명할 수 없었고, replica별 cache 갱신 시점까지 봐야 설명됐습니다.</p></section>
|
||||
<section class="page"><h1>08 · TLS Renewal</h1><h2>인증서 파일이 갱신된 뒤 실제 serving까지 38분 25초가 비어 있었습니다</h2><p><strong>갱신은 성공했는데 왜 옛 인증서가 나가는가?</strong> · certbot timer · Host Nginx</p><p>certbot timer는 성공하고 있었지만 deploy hook이 없었습니다. 새 certificate 파일이 생긴 시점과 Nginx worker가 그 파일을 다시 읽는 시점이 분리돼 있어서, 그 사이에는 갱신 전 인증서가 계속 나갔습니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/tls-renewal-before-after.svg" alt="CHART"></figure><ul><li>renewal → serving gap: <strong>2,305 s → 1–2 s</strong> (deploy hook 적용 후)</li><li>별도의 manual reload 부하 실험: <strong>8,856 / 8,856 HTTP 200</strong>, p95 <strong>205.7 ms → 204.3 ms</strong></li><li>reload 중이던 845 KB 응답도 <strong>845,361 bytes 전부 수신</strong></li></ul></section>
|
||||
<section class="page"><h1>09 · Vault · Secret Delivery</h1><h2>workload는 Vault token 없이 Kubernetes Secret만 소비합니다</h2><p><strong>누가 인증되고 누가 secret을 읽는가?</strong> · Vault 1.17.2 · Vault Secrets Operator · Kubernetes Auth · KV-v2</p><p>secret의 source of truth는 Vault KV-v2에 두되, Vault와 직접 이야기하는 주체는 Vault Secrets Operator 하나로 제한했습니다. VSO가 자기 ServiceAccount token으로 Kubernetes Auth를 통과하면, policy와 role이 읽을 수 있는 path를 정하고, 그 결과만 Kubernetes Secret으로 동기화됩니다.</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/vault-secret-delivery.svg" alt="CHART"></figure><p>workload는 Vault API도 Vault token도 다루지 않습니다. secret을 바꿀 때 rotation이 무중단으로 반영되는지는 따로 측정하지 않았으므로 여기서는 전달 경로까지만 이야기합니다.</p><p><strong>Scope</strong> — Vault 1 replica · file storage · local-path PVC · manual init/unseal. 3-node Raft, auto-unseal, full Vault TLS 구성으로 확대하지 않습니다.</p></section>
|
||||
<section class="page"><h1>10 · Observability</h1><h2>metric · log · trace · alert는 보내는 방식부터 다릅니다</h2><p><strong>어떤 신호가 어디에 저장되고, 무엇으로 이어 보는가?</strong> · Prometheus · Loki · Tempo · Alertmanager</p><p>네 신호를 한 덩어리로 다루면 "어디를 봐야 하는가"에 답할 수 없습니다. 수집 방식부터 다릅니다. Prometheus는 target을 직접 scrape하고(pull), log와 trace는 소스가 Alloy로 보냅니다(push).</p><figure><img src="file:///home/donghyeon/workspace/chat-gpt-container/Resume/assets/portfolio/observability-paths-large.svg" alt="CHART"></figure><p>Grafana는 세 저장소를 같이 조회하는 지점이지 저장소가 아니고, alert는 Prometheus rule에서 갈라져 Slack으로 나갑니다. 한 요청을 metric·log·trace에서 이어 보려면 저장소가 아니라 request id 같은 공통 key를 각 신호에 같이 실어야 합니다.</p></section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,404 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>portfolio</title>
|
||||
<style>:root {
|
||||
color-scheme: light;
|
||||
--ink: #1f2933;
|
||||
--muted: #52616b;
|
||||
--rule: #d8dee4;
|
||||
--accent: #0f766e;
|
||||
--soft: #eef7f5;
|
||||
--code-bg: #f5f7f8;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 11mm 13mm 12mm;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #ffffff;
|
||||
color: var(--ink);
|
||||
font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
line-height: 1.48;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 184mm;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
margin: 0;
|
||||
line-height: 1.28;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
main > h1:first-of-type {
|
||||
padding-bottom: 3mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 19pt;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
main > h1:not(:first-of-type) {
|
||||
break-before: page;
|
||||
margin-top: 0;
|
||||
padding-bottom: 2.2mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
color: var(--ink);
|
||||
font-size: 16.5pt;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 5mm;
|
||||
padding-bottom: 1mm;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
color: var(--accent);
|
||||
font-size: 12.5pt;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 3.5mm;
|
||||
font-size: 10.4pt;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.8mm 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0b5cad;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
margin: 3.3mm 0;
|
||||
border: 0;
|
||||
background: var(--rule);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 2.2mm 0 3.4mm;
|
||||
border-collapse: collapse;
|
||||
font-size: 8.45pt;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 1.25mm 1.6mm;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
width: 27mm;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 2mm 0;
|
||||
padding: 1.7mm 2.4mm;
|
||||
border-left: 3px solid var(--accent);
|
||||
background: var(--soft);
|
||||
color: #334e4a;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
margin: 0.8mm 0;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 1.5mm 0 2.4mm;
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0.8mm 0;
|
||||
padding-left: 0.4mm;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0.1mm 0.65mm;
|
||||
border-radius: 2px;
|
||||
background: #f3f4f6;
|
||||
color: #1f2937;
|
||||
font-family: "JetBrains Mono", "D2Coding", Consolas, monospace;
|
||||
font-size: 0.91em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 2.2mm 0 3mm;
|
||||
padding: 2.2mm 2.6mm;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e0e5e9;
|
||||
border-radius: 4px;
|
||||
background: var(--code-bg);
|
||||
white-space: pre-wrap;
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 7.8pt;
|
||||
line-height: 1.42;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
blockquote,
|
||||
table,
|
||||
pre {
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
li,
|
||||
blockquote,
|
||||
tr {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
main > h1 + h2 {
|
||||
margin-top: 3.8mm;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a {
|
||||
color: #0b5cad;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>강동현 · Backend / Platform Engineering Portfolio</h1>
|
||||
<table><tbody><tr><td></td><td></td></tr><tr><td>Email</td><td>donghyeonka68@gmail.com</td></tr><tr><td>GitHub</td><td><a href="https://github.com/donghyeon-ka">github.com/donghyeon-ka</a></td></tr><tr><td>TechLog</td><td><a href="https://hyeonworks.com">hyeonworks.com</a></td></tr><tr><td>Blog</td><td><a href="https://velog.io/@donghyeon2">velog.io/@donghyeon2</a></td></tr></tbody></table>
|
||||
<hr>
|
||||
<h2>About</h2>
|
||||
<p>Java / Spring Boot를 중심으로 백엔드를 공부하고 있습니다. 현업 개발자의 멘토링 아래 약 6개월 동안 인증, 데이터 조회, 아키텍처, Kubernetes 인프라를 직접 구현하고 검증했습니다.</p>
|
||||
<p>제가 가장 많이 시간을 쓴 부분은 <strong>기술을 적용하는 것보다 실제 동작을 설명할 수 있게 만드는 과정</strong>이었습니다.</p>
|
||||
<ul><li>BFF를 적용했다면 브라우저에서 사라진 token은 어디로 갔는지</li><li>N+1을 없앴다면 쿼리 수 대신 다른 비용이 커지지는 않았는지</li><li>Kubernetes manifest에 설정이 있다면 실제 runtime에서도 집행되고 있는지</li><li>API 계약이 맞다면 값이 왜 화면까지 도착하지 않는지</li></ul>
|
||||
<p>이 포트폴리오에는 그 질문이 가장 잘 드러나는 네 가지 사례만 담았습니다.</p>
|
||||
<hr>
|
||||
<h2>한눈에 보기</h2>
|
||||
<table><tbody><tr><td>주제</td><td>시작한 질문</td><td>핵심 판단</td></tr><tr><td><strong>TechLog</strong></td><td>계약을 한 곳에서 관리하는데 왜 화면에서는 값이 사라질까?</td><td>계약 자체보다 <strong>값이 지나가는 경계와 수동 목록</strong>이 더 자주 깨졌다</td></tr><tr><td><strong>Keycloak 인증 경계</strong></td><td>브라우저에서 token을 없애면 더 좋은 구조일까?</td><td>token이 사라지는 것이 아니라 <strong>다른 계층이 state와 검증 책임을 가져간다</strong></td></tr><tr><td><strong>피드 조회 성능</strong></td><td>N+1은 fetch join으로 해결하면 끝일까?</td><td>쿼리 수뿐 아니라 <strong>row 수, paging, index, Top-N 비용</strong>을 같이 봐야 했다</td></tr><tr><td><strong>Home Platform</strong></td><td>서비스가 접속되면 인프라 구성이 끝난 걸까?</td><td>TLS, proxy trust, secret, state의 <strong>실제 경로를 runtime에서 확인할 수 있어야 했다</strong></td></tr></tbody></table>
|
||||
<hr>
|
||||
<h1>01. TechLog</h1>
|
||||
<h2>기술 기록을 다시 읽을 수 있는 서비스로 만들기</h2>
|
||||
<p>인증, 성능, 인프라 과제를 진행하면서 문서가 계속 늘었습니다. 문제는 기록이 부족한 것이 아니라 <strong>나중에 왜 이런 결정을 했는지 다시 따라가기 어려운 것</strong>이었습니다.</p>
|
||||
<p>그래서 단순 블로그가 아니라 프로젝트 → 주제 → 기록의 맥락을 유지하면서 작성·검증·미리보기·게시까지 할 수 있는 TechLog를 만들기 시작했습니다.</p>
|
||||
<p>현재 공개 화면은 <a href="https://hyeonworks.com">hyeonworks.com</a>에서 확인할 수 있습니다.</p>
|
||||
<section class="project"><h3>구조</h3><pre><code class="language-text">OpenAPI contract
|
||||
│
|
||||
├── Backend
|
||||
│ domain / application / inbound / outbound
|
||||
│
|
||||
└── Frontend
|
||||
domain / application / adapter / presentation
|
||||
|
||||
Studio
|
||||
Create → Save → Validate → Preview → Publish
|
||||
│
|
||||
▼
|
||||
Public</code></pre><p>Backend는 현재 <strong>18개 Gradle module</strong>로 나누고, module registry를 기준으로 허용 dependency와 runtime membership을 검증하도록 구성했습니다.</p></section>
|
||||
<section class="project"><h3>가장 어려웠던 문제 — 계약은 맞는데 값이 사라졌다</h3><p>처음에는 OpenAPI 계약을 한 저장소에서 관리하고 Backend와 Frontend가 같은 계약을 사용하면 서로 어긋날 일이 적을 것이라고 생각했습니다.</p><p>실제 문제는 다른 곳에서 나왔습니다.</p><pre><code class="language-text">PostgreSQL
|
||||
→ SQL adapter
|
||||
→ application view
|
||||
→ response mapper
|
||||
→ generated DTO
|
||||
→ HTTP
|
||||
→ frontend gateway
|
||||
→ application port
|
||||
→ component</code></pre><p>값 하나가 화면에 도착하기까지 여러 경계를 지나면서 <strong>어느 한 곳이 값을 조용히 버려도 타입 검사나 화면에서 오류가 나지 않는 경우</strong>가 있었습니다.</p><p>예를 들어 DB에는 값이 있고 API 계약에도 필드가 존재하지만, 중간 mapper가 해당 필드를 전달하지 않아 화면에서는 빈 값으로 보였습니다. 화면은 이를 오류가 아니라 “데이터가 없음”으로 표현했습니다.</p></section>
|
||||
<section class="project"><h3>문제를 어떻게 좁혔는가</h3><p>증상을 “화면이 비었다”로 보지 않고 <strong>값의 이동 경로를 끝까지 따라갔습니다.</strong></p><ul><li>DB row에 값이 있는지</li><li>persistence adapter가 읽었는지</li><li>application model에 남아 있는지</li><li>HTTP response mapper가 전달했는지</li><li>generated contract type에 필드가 있는지</li><li>frontend adapter가 mapping했는지</li><li>최종 component가 받은 값이 무엇인지</li></ul><p>이 방식으로 contract 자체의 오류와 <strong>contract 이후의 연결 오류</strong>를 분리했습니다.</p></section>
|
||||
<section class="project"><h3>반복해서 깨진 것 — 손으로 관리한 목록</h3><p>Record 종류나 route 종류를 배열·삼항식으로 직접 나열한 곳에서는 새 종류를 추가할 때 누락이 반복됐습니다.</p><pre><code class="language-ts">// 이런 구조에서는 새 종류를 빠뜨려도 마지막 분기로 조용히 떨어질 수 있다.
|
||||
const path =
|
||||
kind === "CASE" ? "/cases/" :
|
||||
kind === "REFERENCE" ? "/references/" :
|
||||
"/projects/";</code></pre><p>이를 <code>Record<Kind, Value></code>, exhaustive switch, contract coverage test처럼 <strong>누락 자체를 실패로 만드는 구조</strong>로 바꿨습니다.</p><p>핵심은 “사람이 잘 기억하자”가 아니라 <strong>컴파일러나 테스트가 목록의 완전성을 확인하도록 만드는 것</strong>이었습니다.</p></section>
|
||||
<section class="project"><h3>이 프로젝트에서 남은 기준</h3><ul><li>값은 중간 layer가 아니라 <strong>최종 사용자에게 보이는 지점까지 확인한다.</strong></li><li>종류를 수동으로 나열해야 한다면 completeness를 검증할 방법을 같이 둔다.</li><li>“없음”과 “읽지 못함”을 같은 UI 상태로 표현하지 않는다.</li><li>테스트가 존재하는 것보다 실제 CI / verification 경로에서 그 테스트가 실행되는지가 중요하다.</li></ul></section>
|
||||
<section class="project"><h3>Stack</h3><p><code>Java 21</code> <code>Spring Boot</code> <code>JPA</code> <code>PostgreSQL</code> <code>Gradle</code> <code>ArchUnit</code> <code>React</code> <code>TypeScript</code> <code>OpenAPI</code> <code>Vitest</code> <code>Playwright</code></p><hr></section>
|
||||
<h1>02. Keycloak 인증 경계</h1>
|
||||
<h2>“브라우저에서 token을 없애면 더 안전하다”를 구조로 확인하기</h2>
|
||||
<p>OAuth2 / OIDC를 공부할 때 SPA, BFF, Forward-Auth라는 이름은 많이 볼 수 있었습니다.</p>
|
||||
<p>하지만 이름만으로는 다음 질문에 답하기 어려웠습니다.</p>
|
||||
<ul><li>authorization code는 누가 token으로 교환하는가?</li><li>access token과 refresh token은 어디에 남는가?</li><li>실제 API caller는 browser인가, server인가?</li><li>Resource Server는 JWT를 검증하는가, trusted header를 믿는가?</li></ul>
|
||||
<p>같은 기능 요구사항을 두고 네 가지 구조를 직접 구현해 비교했습니다.</p>
|
||||
<section class="project"><h3>네 패턴을 credential 소유권으로 비교</h3><table><tbody><tr><td>구조</td><td>Browser</td><td>Server / Edge</td><td>API가 받는 값</td></tr><tr><td><strong>SPA</strong></td><td>access / refresh token 관리</td><td>없음</td><td>Bearer JWT</td></tr><tr><td><strong>Token Mediator</strong></td><td>access token 사용</td><td>refresh token / client state 관리</td><td>Browser가 보낸 Bearer JWT</td></tr><tr><td><strong>BFF</strong></td><td>session cookie</td><td>OAuth token + server session</td><td>BFF가 만든 Bearer JWT</td></tr><tr><td><strong>Forward-Auth</strong></td><td>proxy session cookie</td><td>OAuth login + identity projection</td><td>trusted identity header</td></tr></tbody></table><p>처음에는 SPA → BFF → Forward-Auth로 갈수록 token이 브라우저에서 멀어지므로 더 좋은 구조처럼 보였습니다.</p><p>직접 구현해보니 <strong>없어진 책임은 없었습니다.</strong></p></section>
|
||||
<section class="project"><h3>BFF — token 대신 state를 운영한다</h3><p>BFF에서는 JavaScript가 OAuth token을 받지 않습니다.</p><p>대신 Backend가 다음을 맡습니다.</p><ul><li>server-side session</li><li>authorized client / refresh token 저장</li><li>CSRF 검증</li><li>downstream API 호출</li><li>logout 시 session과 token state 정리</li><li>replica가 늘어났을 때 state 공유</li></ul><p>즉 브라우저 token 노출을 줄이는 대신 <strong>stateful backend를 운영하는 비용</strong>이 생겼습니다.</p></section>
|
||||
<section class="project"><h3>Forward-Auth — JWT 대신 header를 믿는다</h3><p>Forward-Auth에서는 upstream이 OAuth token을 직접 이해하지 않아도 됩니다.</p><p>하지만 edge가 만든 identity header를 신뢰하려면 조건이 필요했습니다.</p><ul><li>backend로 직접 들어가는 외부 경로를 닫는다.</li><li>browser가 보낸 인증 관련 header를 edge에서 덮어쓴다.</li><li>edge와 upstream 사이의 신뢰 범위를 제한한다.</li><li>endpoint가 늘어나도 동일한 인가 검증을 적용할 수 있어야 한다.</li></ul><p>결국 “token이 없다”가 아니라 <strong>신뢰할 credential의 형태가 JWT에서 header로 바뀐 것</strong>이었습니다.</p><hr></section>
|
||||
<h2>단일 인스턴스 설명에서 2-node 환경으로</h2>
|
||||
<p>인증 구조를 구현한 뒤에는 다음 질문이 남았습니다.</p>
|
||||
<blockquote><p>Keycloak replica를 늘리면 session은 실제로 어디에 존재하는가?</p></blockquote>
|
||||
<p>물리 서버 위에 VM 2대를 만들고 K3s server / agent로 구성해 Keycloak 두 인스턴스와 PostgreSQL, Redis를 배치했습니다.</p>
|
||||
<section class="project"><h3>예상과 달랐던 session 경로</h3><p>Keycloak 26의 기본 <code>persistent-user-sessions</code> 조건에서 교차 노드 session 처리는 단순히 “Infinispan이 session을 복제해서” 설명되지 않았습니다.</p><p>실제 SQL과 runtime 상태를 확인하면서 <strong>두 인스턴스가 공유 PostgreSQL의 persistent session state를 사용할 수 있다는 점</strong>을 확인했습니다.</p><p>반대로 persistent session을 끈 조건에서는 JGroups, cache, restart, DB 장애가 결과에 미치는 영향이 달라졌습니다.</p></section>
|
||||
<section class="project"><h3>장애 명령을 실행했다고 장애가 만들어진 것은 아니었다</h3><p>NetworkPolicy, iptables, <code>tc</code>를 이용해 network fault를 만들면서 가장 크게 바뀐 습관은 이것이었습니다.</p><blockquote><p>장애 결과를 보기 전에 <strong>장애 자체가 실제로 주입됐는지 먼저 확인한다.</strong></p></blockquote><p>기존 connection이 conntrack에 남아 있거나 rule 방향이 틀리면 명령은 성공했지만 통신은 계속될 수 있었습니다.</p><p>그래서 결과를 보기 전에 다음을 따로 확인했습니다.</p><ul><li>cluster membership</li><li>active connection / conntrack</li><li>packet counter</li><li>process / PID 상태</li><li>실제 요청 결과</li></ul></section>
|
||||
<section class="project"><h3>다중 replica에서만 보인 문제</h3><ul><li>Refresh Token Rotation 경쟁에서는 동시에 같은 refresh token을 사용했을 때 client session 자체가 무효화되는 조건을 확인했습니다.</li><li>Resource Server replica별 JWKS cache 상태가 다르면 같은 old token이 replica에 따라 다른 결과를 낼 수 있었습니다.</li><li>Session store와 OAuth2 Authorized Client store는 조회 key가 달라 <strong>session만 Redis로 옮긴다고 token state까지 해결되는 것은 아니었습니다.</strong></li></ul></section>
|
||||
<section class="project"><h3>이 실습에서 남은 기준</h3><p>인증 구조를 볼 때 이제는 패턴 이름보다 먼저 다음을 확인합니다.</p><ol><li>credential의 실제 소유자는 누구인가</li><li>state는 어느 저장소에 남는가</li><li>replica가 늘어나면 그 state를 어떻게 찾는가</li><li>보호 자원이 최종적으로 무엇을 신뢰하는가</li><li>실패했을 때 어느 계층이 401 / 403 / 재로그인을 결정하는가</li></ol></section>
|
||||
<section class="project"><h3>Stack</h3><p><code>Keycloak</code> <code>OAuth2 / OIDC</code> <code>Spring Security</code> <code>PKCE</code> <code>JWT / JWKS</code> <code>K3s</code> <code>PostgreSQL</code> <code>Redis</code> <code>JGroups</code> <code>Nginx</code> <code>oauth2-proxy</code></p><hr></section>
|
||||
<h1>03. 피드 조회 성능</h1>
|
||||
<h2>N+1을 없앤 뒤에도 느릴 수 있는 이유</h2>
|
||||
<p>피드에서 각 항목의 최신 Highlight와 공개 범위, pagination을 함께 조회하는 과제를 진행했습니다.</p>
|
||||
<p>처음 문제는 명확했습니다.</p>
|
||||
<blockquote><p>FeedItem을 N개 읽으면 연관 데이터를 가져오기 위한 SQL도 N에 비례해 증가한다.</p></blockquote>
|
||||
<p>PostgreSQL 16 Testcontainers와 Hibernate Statistics를 이용해 실제 쿼리 수를 측정했습니다.</p>
|
||||
<section class="project"><h3>기준선</h3><p>FeedItem 1,000개를 조회했을 때:</p><ul><li>PreparedStatement: <strong>2,022</strong></li><li>Highlight collection fetch: <strong>1,000</strong></li><li>local warm-cache 기준 median 약 <strong>193.7ms</strong></li></ul><p>중요했던 것은 시간보다 <strong>왜 2,022개의 SQL이 발생했는지 분리하는 것</strong>이었습니다.</p><hr></section>
|
||||
<h2>Fetch Join이 항상 답은 아니었다</h2>
|
||||
<p>N+1 해결책으로 가장 먼저 떠올릴 수 있는 fetch join을 적용했지만 다른 문제가 생겼습니다.</p>
|
||||
<section class="project"><h3>두 collection을 동시에 fetch</h3><p><code>MultipleBagFetchException</code>으로 실패했습니다.</p></section>
|
||||
<section class="project"><h3>collection 하나만 fetch</h3><p>쿼리 수는 줄었지만 join으로 인해 DB가 보내는 row 수가 늘어났습니다.</p></section>
|
||||
<section class="project"><h3>fetch join + pagination</h3><p>응답은 한 page였지만 SQL에는 기대한 <code>LIMIT</code>이 없고, 부모 데이터를 더 많이 읽은 뒤 memory에서 page를 잘라내는 문제가 나타났습니다.</p><p>즉 <strong>쿼리 수가 줄었다는 사실만으로 개선이라고 판단할 수 없었습니다.</strong></p><hr></section>
|
||||
<h2>Batch Fetch — 단순 조회를 유지하면서 쿼리 수 줄이기</h2>
|
||||
<p>Batch Fetch를 적용한 뒤 같은 N=1,000 조건에서:</p>
|
||||
<p><strong>PreparedStatement 2,022 → 23</strong></p>
|
||||
<p>으로 줄었습니다.</p>
|
||||
<p>엔티티 조회 구조를 크게 바꾸지 않고 N+1과 pagination을 함께 다루기에는 유효했습니다.</p>
|
||||
<p>하지만 여전히 화면에 필요하지 않은 entity까지 로드하는 비용이 남았습니다.</p>
|
||||
<p>그래서 다음 단계로 DTO Projection을 비교했습니다.</p>
|
||||
<ul><li>entity load 0</li><li>N이 증가해도 고정된 수의 query</li><li>필요한 컬럼 중심의 읽기 경로</li></ul>
|
||||
<hr>
|
||||
<h2>부모마다 최신 3개 — Window vs LATERAL vs 2-step</h2>
|
||||
<p>다음 요구사항은 단순 LIMIT으로 해결되지 않았습니다.</p>
|
||||
<blockquote><p>“전체에서 3개”가 아니라 <strong>각 FeedItem마다 최신 Highlight 3개</strong></p></blockquote>
|
||||
<p>세 가지 접근을 같은 데이터에서 비교했습니다.</p>
|
||||
<ul><li>Window Function</li><li>LATERAL</li><li>2-step query</li></ul>
|
||||
<p>현재 데이터에서는 <strong>작은 K=3과 복합 인덱스 seek가 가능한 조건</strong>에서 LATERAL이 유리했습니다.</p>
|
||||
<p>하지만 인덱스를 제거하거나 K가 커지면 이점이 줄었습니다.</p>
|
||||
<p>따라서 결론을 “LATERAL이 빠르다”가 아니라 다음처럼 정리했습니다.</p>
|
||||
<blockquote><p>LATERAL의 이점은 문법 자체보다 <strong>부모별로 적은 수의 row를 index seek할 수 있는 조건</strong>에서 나온다.</p></blockquote>
|
||||
<hr>
|
||||
<h2>깊은 페이지 — OFFSET vs Keyset</h2>
|
||||
<p>2,000행 데이터의 100번째 page를 비교했습니다.</p>
|
||||
<ul><li>OFFSET: 앞의 row를 포함해 <strong>2,000행</strong> 탐색</li><li>Keyset + 정렬키 index: 다음 page에 필요한 <strong>20행</strong> 탐색</li></ul>
|
||||
<p>실행계획에서도 scan-then-discard와 index seek의 차이를 확인했습니다.</p>
|
||||
<p>Keyset 역시 항상 정답은 아니었습니다. 정렬 조건을 만족하는 index가 없으면 장점이 크게 줄었습니다.</p>
|
||||
<section class="project"><h3>이 실습에서 남은 기준</h3><p>조회 성능을 볼 때 다음 순서로 확인합니다.</p><ol><li>query count</li><li>DB가 실제 읽고 반환한 row</li><li>entity materialization</li><li>sort / index 사용 여부</li><li>pagination이 DB에서 일어나는지 memory에서 일어나는지</li><li>데이터 분포와 K가 바뀌어도 같은 결론인지</li></ol></section>
|
||||
<section class="project"><h3>Stack</h3><p><code>Spring Data JPA</code> <code>Hibernate</code> <code>PostgreSQL 16</code> <code>Testcontainers</code> <code>Flyway</code> <code>EXPLAIN (ANALYZE, BUFFERS)</code></p><hr></section>
|
||||
<h1>04. Home Platform</h1>
|
||||
<h2>“서비스가 뜬다”에서 “요청 경계를 설명할 수 있다”로</h2>
|
||||
<p>개인 서버에 서비스를 하나씩 올리면서 처음에는 host에 Nginx 설정을 추가하고 K3s 안에 필요한 workload를 배치했습니다.</p>
|
||||
<p>서비스가 늘어나자 다음 질문에 바로 답하기 어려워졌습니다.</p>
|
||||
<ul><li>TLS는 어디에서 종료되는가?</li><li>외부 요청이 Kubernetes로 들어가는 문은 몇 개인가?</li><li><code>X-Forwarded-*</code>는 누가 만들고 누가 신뢰하는가?</li><li>DB와 object storage는 외부에서 직접 접근 가능한가?</li><li>Secret은 어디가 원본인가?</li><li>manifest에 적힌 설정과 실제 cluster state가 같은가?</li></ul>
|
||||
<p>그래서 저장소 설정, 문서, live cluster를 대조하며 현재 구조를 다시 정리했습니다.</p>
|
||||
<hr>
|
||||
<h2>요청 경로</h2>
|
||||
<pre><code class="language-text">Client
|
||||
│ HTTPS
|
||||
▼
|
||||
Host Nginx :443
|
||||
│ TLS termination
|
||||
│ forwarded header overwrite
|
||||
│ source allowlist
|
||||
▼
|
||||
127.0.0.1:30080
|
||||
│
|
||||
▼
|
||||
Traefik NodePort
|
||||
│
|
||||
▼
|
||||
Kubernetes Service
|
||||
│
|
||||
├── Gitea
|
||||
├── Keycloak
|
||||
├── Grafana
|
||||
├── pgAdmin
|
||||
└── Object Storage Console</code></pre>
|
||||
<p>핵심은 두 가지였습니다.</p>
|
||||
<section class="project"><h3>TLS는 Host Nginx에서 한 번만 종료</h3><p>Nginx 뒤의 cluster 진입은 HTTP로 단순화했습니다.</p></section>
|
||||
<section class="project"><h3>NodePort를 loopback에 제한</h3><p>Traefik NodePort를 LAN 전체에 노출하지 않고 <code>127.0.0.1</code> 경로로 제한해 <strong>클러스터 진입점을 Host Nginx 뒤로 고정</strong>했습니다.</p><p>또한 외부에서 들어온 <code>X-Forwarded-*</code>를 Nginx가 다시 작성하고, Traefik은 실제 upstream source만 trusted proxy로 인정하도록 범위를 좁혔습니다.</p><hr></section>
|
||||
<h2>상태를 어디에 둘 것인가</h2>
|
||||
<p>같은 cluster 안에서도 state의 성격을 분리했습니다.</p>
|
||||
<ul><li>PostgreSQL — CloudNativePG</li><li>Keycloak — PostgreSQL 기반 identity state</li><li>Gitea — PostgreSQL + Local PV</li><li>Object Storage — 별도 XFS 영역</li><li>Observability — Prometheus / Loki / Tempo 등 각 저장 경로</li></ul>
|
||||
<p>Local PV는 노드와 디스크에 강하게 묶입니다.</p>
|
||||
<p>따라서 <code>Retain</code>이나 PVC가 있다고 해서 이를 백업이나 HA로 표현하지 않았습니다.</p>
|
||||
<p>현재 환경은 단일 노드 home lab이므로 노드 자체가 사라지면 플랫폼 전체가 영향을 받습니다. 오프사이트 백업도 별도 과제로 남아 있습니다.</p>
|
||||
<hr>
|
||||
<h2>Secret Delivery — Vault를 쓰는 이유를 경로로 설명하기</h2>
|
||||
<p>Secret을 Git에서 제거하는 것만으로는 secret 관리가 끝나지 않았습니다.</p>
|
||||
<p>누가 Vault에 접근하고 workload는 무엇을 읽는지까지 분리했습니다.</p>
|
||||
<pre><code class="language-text">Vault KV-v2
|
||||
│
|
||||
▼
|
||||
Vault Secrets Operator
|
||||
│
|
||||
▼
|
||||
Kubernetes Secret
|
||||
│
|
||||
▼
|
||||
Workload</code></pre>
|
||||
<p>애플리케이션이 Vault API를 직접 호출하지 않고 Kubernetes Secret만 소비하도록 구성했습니다.</p>
|
||||
<ul><li>Kubernetes Auth</li><li>role / policy 분리</li><li>VaultConnection / VaultAuth</li><li>VaultStaticSecret</li><li>bootstrap dependency</li></ul>
|
||||
<p>현재 lab Vault는 1 replica / file storage 기준이며 이를 HA 구성으로 표현하지 않습니다.</p>
|
||||
<hr>
|
||||
<h2>관측 — 선언과 runtime을 구분하기</h2>
|
||||
<p>인프라를 정리하면서 가장 중요하게 둔 기준은 다음 다섯 가지였습니다.</p>
|
||||
<table><tbody><tr><td>표현</td><td>의미</td></tr><tr><td><strong>관측</strong></td><td>실제 host / cluster에서 명령을 실행해 확인</td></tr><tr><td><strong>선언</strong></td><td>manifest나 설정 파일에 존재</td></tr><tr><td><strong>기록</strong></td><td>과거 문서에서 확인한 상태</td></tr><tr><td><strong>추론</strong></td><td>관측과 선언을 근거로 판단</td></tr><tr><td><strong>미확인</strong></td><td>아직 확인하지 못함</td></tr></tbody></table>
|
||||
<p>예를 들어 NetworkPolicy YAML이 저장소에 있다는 사실만으로 실제 통신이 막힌다고 판단하지 않았습니다.</p>
|
||||
<p>Prometheus / Grafana / Loki / Tempo / Blackbox Exporter를 구성하고, 필요한 경우 실제 endpoint와 cluster state를 함께 확인했습니다.</p>
|
||||
<section class="project"><h3>이 프로젝트에서 남은 기준</h3><ul><li>manifest는 <strong>의도</strong>이고 runtime은 <strong>결과</strong>다.</li><li><code>1/1 Ready</code>는 HA를 의미하지 않는다.</li><li><code>Retain</code>은 backup을 의미하지 않는다.</li><li>proxy header를 신뢰하려면 proxy를 우회할 경로도 같이 닫아야 한다.</li><li>장애나 보안 정책은 “설정했다”가 아니라 실제 상태 변화로 확인한다.</li></ul></section>
|
||||
<section class="project"><h3>Stack</h3><p><code>K3s</code> <code>Kubernetes</code> <code>Nginx</code> <code>Traefik</code> <code>Kustomize</code> <code>CloudNativePG</code> <code>Vault</code> <code>VSO</code> <code>Prometheus</code> <code>Grafana</code> <code>Loki</code> <code>Tempo</code></p><hr></section>
|
||||
<h2>제가 문제를 확인하는 방식</h2>
|
||||
<p>네 프로젝트의 주제는 다르지만 문제를 확인하는 순서는 비슷했습니다.</p>
|
||||
<pre><code class="language-text">1. 먼저 기준선을 만든다.
|
||||
↓
|
||||
2. 내가 예상한 동작을 적는다.
|
||||
↓
|
||||
3. 실제 요청 / SQL / packet / runtime state를 본다.
|
||||
↓
|
||||
4. 예상과 다른 지점을 가장 작은 경계까지 좁힌다.
|
||||
↓
|
||||
5. 수정 후 같은 관측 지점에서 다시 확인한다.
|
||||
↓
|
||||
6. 아직 확인하지 않은 범위를 따로 남긴다.</code></pre>
|
||||
<p>이 방식 때문에 결과가 기대와 다르게 나와도 실습을 실패했다고 보지 않습니다.</p>
|
||||
<p>오히려 <strong>예상과 실제가 갈리는 지점이 다음 설계 판단의 근거</strong>가 되었습니다.</p>
|
||||
<hr>
|
||||
<h2>Additional Work</h2>
|
||||
<h2>Clean Architecture Backend Template</h2>
|
||||
<p>Java / Spring 기반 프로젝트에서 domain과 application policy가 framework detail에 끌려가지 않도록 multi-module template을 구성하고 있습니다.</p>
|
||||
<p>Gradle에는 module dependency direction을 두고, application / adapter / bootstrap의 책임을 분리하며 ArchUnit과 테스트로 경계를 검증하는 방향으로 개선했습니다.</p>
|
||||
<h2>Virtualization</h2>
|
||||
<p>CPU virtualization에서 시작해 Network, Storage, Memory까지 실제 host 관점에서 학습하고 문서화했습니다.</p>
|
||||
<p>KVM / QEMU, vCPU와 VM-exit, virtio / vhost-net / TAP / Linux Bridge, NAT, IOMMU / VFIO 등의 흐름을 명령과 실제 구성 기준으로 정리했습니다.</p>
|
||||
<hr>
|
||||
<h2>Links</h2>
|
||||
<ul><li><strong>TechLog</strong> — <a href="https://hyeonworks.com">https://hyeonworks.com</a></li><li><strong>GitHub</strong> — <a href="https://github.com/donghyeon-ka">https://github.com/donghyeon-ka</a></li><li><strong>Blog</strong> — <a href="https://velog.io/@donghyeon2">https://velog.io/@donghyeon2</a></li></ul>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,11 @@
|
||||
{
|
||||
"scripts": {
|
||||
"pdf": "node scripts/md-to-pdf.mjs",
|
||||
"portfolio": "PDF_CSS=portfolio.css node scripts/md-to-pdf.mjs portfolio.md dist/portfolio.pdf"
|
||||
"portfolio:backend:source": "node scripts/build-backend-portfolios.mjs product",
|
||||
"portfolio:backend:performance-source": "node scripts/build-backend-portfolios.mjs performance",
|
||||
"portfolio:backend": "npm run portfolio:backend:source && PDF_CSS=portfolio.css node scripts/md-to-pdf.mjs 01-backend-portfolio.md dist/01-backend-portfolio.pdf",
|
||||
"portfolio:backend-performance": "npm run portfolio:backend:performance-source && PDF_CSS=portfolio.css node scripts/md-to-pdf.mjs 01-backend-performance-portfolio.md dist/01-backend-performance-portfolio.pdf",
|
||||
"portfolio:infra": "PDF_CSS=portfolio.css node scripts/md-to-pdf.mjs 02-infra-platform-portfolio.md dist/02-infra-platform-portfolio.pdf",
|
||||
"portfolio:all": "npm run portfolio:backend && npm run portfolio:backend-performance && npm run portfolio:infra"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,82 +1,92 @@
|
||||
:root {
|
||||
color-scheme: light;
|
||||
--ink: #1f2933;
|
||||
--muted: #52616b;
|
||||
--rule: #d8dee4;
|
||||
--ink: #17212b;
|
||||
--muted: #5c6b77;
|
||||
--rule: #dbe2e7;
|
||||
--accent: #0f766e;
|
||||
--soft: #eef7f5;
|
||||
--code-bg: #f5f7f8;
|
||||
--accent-dark: #0b5f59;
|
||||
--soft: #f2f8f7;
|
||||
--soft-2: #f6f8fa;
|
||||
--card: #ffffff;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 11mm 13mm 12mm;
|
||||
size: 297mm 167mm;
|
||||
margin: 10mm 14mm 9mm;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #ffffff;
|
||||
background: #fff;
|
||||
color: var(--ink);
|
||||
font-family: "Noto Sans CJK KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
line-height: 1.48;
|
||||
font-size: 9.15pt;
|
||||
line-height: 1.42;
|
||||
word-break: keep-all;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 184mm;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
h1, h2, h3 {
|
||||
margin: 0;
|
||||
line-height: 1.28;
|
||||
letter-spacing: 0;
|
||||
line-height: 1.18;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
|
||||
main > h1:first-of-type {
|
||||
padding-bottom: 3mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 19pt;
|
||||
font-weight: 800;
|
||||
/* Each page is exactly the content box, so its figure can flex into the slack. */
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 148mm;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
main > h1:not(:first-of-type) {
|
||||
.page + .page {
|
||||
break-before: page;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.page > h1 {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 1mm;
|
||||
padding-bottom: 2.2mm;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
font-size: 21.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 3mm;
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
font-size: 26pt;
|
||||
color: var(--ink);
|
||||
font-size: 16.5pt;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 5mm;
|
||||
padding-bottom: 1mm;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
color: var(--accent);
|
||||
font-size: 12.5pt;
|
||||
font-weight: 800;
|
||||
margin-top: 3.4mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 3.5mm;
|
||||
font-size: 10.4pt;
|
||||
font-weight: 800;
|
||||
margin-top: 2.5mm;
|
||||
font-size: 10.8pt;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1.8mm 0;
|
||||
margin: 1.4mm 0;
|
||||
}
|
||||
|
||||
strong { font-weight: 850; }
|
||||
|
||||
a {
|
||||
color: #0b5cad;
|
||||
text-decoration: none;
|
||||
@@ -84,116 +94,256 @@ a {
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
margin: 3.3mm 0;
|
||||
margin: 2.5mm 0;
|
||||
border: 0;
|
||||
background: var(--rule);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 2.2mm 0 3.4mm;
|
||||
border-collapse: collapse;
|
||||
font-size: 8.45pt;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 1.25mm 1.6mm;
|
||||
border-bottom: 1px solid var(--rule);
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
td:first-child {
|
||||
width: 27mm;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 2mm 0;
|
||||
padding: 1.7mm 2.4mm;
|
||||
border-left: 3px solid var(--accent);
|
||||
margin: 2mm 0 2.4mm;
|
||||
padding: 2mm 2.6mm;
|
||||
border: 0;
|
||||
border-left: 4px solid var(--accent);
|
||||
border-radius: 3px;
|
||||
background: var(--soft);
|
||||
color: #334e4a;
|
||||
color: #28433f;
|
||||
font-size: 9.1pt;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
margin: 0.8mm 0;
|
||||
}
|
||||
blockquote p { margin: 0; }
|
||||
|
||||
ul,
|
||||
ol {
|
||||
margin: 1.5mm 0 2.4mm;
|
||||
ul, ol {
|
||||
margin: 1.3mm 0 2mm;
|
||||
padding-left: 5mm;
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0.8mm 0;
|
||||
padding-left: 0.4mm;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 800;
|
||||
margin: .65mm 0;
|
||||
padding-left: .4mm;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 0.1mm 0.65mm;
|
||||
padding: .1mm .55mm;
|
||||
border-radius: 2px;
|
||||
background: #f3f4f6;
|
||||
color: #1f2937;
|
||||
background: #eef2f4;
|
||||
color: #23303c;
|
||||
font-family: "JetBrains Mono", "D2Coding", Consolas, monospace;
|
||||
font-size: 0.91em;
|
||||
font-size: .91em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 2.2mm 0 3mm;
|
||||
padding: 2.2mm 2.6mm;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e0e5e9;
|
||||
border-radius: 4px;
|
||||
background: var(--code-bg);
|
||||
margin: 1.8mm 0;
|
||||
padding: 2mm 2.4mm;
|
||||
border: 1px solid var(--rule);
|
||||
border-radius: 5px;
|
||||
background: var(--soft-2);
|
||||
white-space: pre-wrap;
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 7.8pt;
|
||||
line-height: 1.42;
|
||||
white-space: pre-wrap;
|
||||
font-size: 7.5pt;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 1.8mm 0 2.3mm;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
font-size: 8.0pt;
|
||||
line-height: 1.32;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15mm 1.55mm;
|
||||
border-right: 1px solid var(--rule);
|
||||
border-bottom: 1px solid var(--rule);
|
||||
vertical-align: top;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
tr:first-child td {
|
||||
border-top: 1px solid var(--rule);
|
||||
font-weight: 800;
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
td:first-child { border-left: 1px solid var(--rule); }
|
||||
tr:first-child td:first-child { border-top-left-radius: 5px; }
|
||||
tr:first-child td:last-child { border-top-right-radius: 5px; }
|
||||
tr:last-child td:first-child { border-bottom-left-radius: 5px; }
|
||||
tr:last-child td:last-child { border-bottom-right-radius: 5px; }
|
||||
|
||||
.two-col-table td:first-child {
|
||||
width: 33mm;
|
||||
background: #f7f9fa;
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.metric-table {
|
||||
border-spacing: 2mm 0;
|
||||
border-collapse: separate;
|
||||
margin-top: 2.3mm;
|
||||
}
|
||||
|
||||
.metric-table td {
|
||||
border: 0;
|
||||
text-align: center;
|
||||
background: var(--soft-2);
|
||||
}
|
||||
|
||||
.metric-table tr:first-child td {
|
||||
border: 0;
|
||||
padding-top: 2.3mm;
|
||||
padding-bottom: .8mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 14.5pt;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.metric-table tr:last-child td {
|
||||
padding-top: .7mm;
|
||||
padding-bottom: 2.3mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.0pt;
|
||||
}
|
||||
|
||||
.data-table tr:first-child td {
|
||||
background: #f3f6f7;
|
||||
color: #34424e;
|
||||
font-weight: 850;
|
||||
}
|
||||
|
||||
figure {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
min-height: 0;
|
||||
margin: 1.6mm auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 0;
|
||||
margin: 0 auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
margin-top: .7mm;
|
||||
color: var(--muted);
|
||||
font-size: 6.8pt;
|
||||
}
|
||||
|
||||
.project {
|
||||
display: block;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
blockquote,
|
||||
table,
|
||||
pre {
|
||||
h2, h3, blockquote, table, figure {
|
||||
break-after: avoid;
|
||||
}
|
||||
|
||||
li,
|
||||
blockquote,
|
||||
tr {
|
||||
tr, blockquote, figure {
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
main > h1 + h2 {
|
||||
margin-top: 3.8mm;
|
||||
/* ── Cover: headline > experience axis > headline results > stack > contact ── */
|
||||
|
||||
.page:first-child > h1 {
|
||||
margin-top: 6mm;
|
||||
font-size: 34pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 {
|
||||
margin-top: 3.4mm;
|
||||
max-width: 235mm;
|
||||
color: var(--accent-dark);
|
||||
font-size: 18.5pt;
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote {
|
||||
max-width: 235mm;
|
||||
margin-top: 3.6mm;
|
||||
padding: 2.6mm 3.2mm;
|
||||
font-size: 9.6pt;
|
||||
}
|
||||
|
||||
/* Headline results on the cover read louder than anything below them. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table {
|
||||
margin-top: 5.5mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table td {
|
||||
background: var(--soft);
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:first-child td {
|
||||
padding-top: 3.4mm;
|
||||
padding-bottom: 1.1mm;
|
||||
font-size: 19pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table tr:last-child td {
|
||||
padding-bottom: 3.4mm;
|
||||
font-size: 8.4pt;
|
||||
}
|
||||
|
||||
/* Stack and contact are the quietest elements on the page. */
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p {
|
||||
margin-top: 4.2mm;
|
||||
color: var(--muted);
|
||||
font-size: 8.6pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table {
|
||||
width: 118mm;
|
||||
margin-top: 3.4mm;
|
||||
font-size: 7.8pt;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td {
|
||||
padding: .85mm 1.4mm;
|
||||
}
|
||||
|
||||
.page:first-child > h1 + h2 + blockquote + .metric-table + p + .two-col-table td:first-child {
|
||||
width: 26mm;
|
||||
}
|
||||
|
||||
/* ── Section pages ── */
|
||||
|
||||
/* The deck line under a section title stays subordinate to the h2 claim. */
|
||||
h2 + p strong:first-child {
|
||||
color: #34424e;
|
||||
}
|
||||
|
||||
@media print {
|
||||
a {
|
||||
color: #0b5cad;
|
||||
}
|
||||
a { color: #0b5cad; }
|
||||
}
|
||||
|
||||
/* ── Figures ──────────────────────────────────────────────────────────────
|
||||
A figure is the flexible row of its .page column, so it receives exactly the
|
||||
space the text on that page leaves over and the image scales into it. Width
|
||||
(269mm of content box) is the binding constraint for wide diagrams, so the
|
||||
viewBox aspect ratio decides how large the labels inside an SVG end up:
|
||||
|
||||
rendered height(mm) = viewBox height / viewBox width * 269
|
||||
|
||||
A 1260x450 diagram therefore prints at ~96mm and its 20-unit labels at ~12pt.
|
||||
Nothing here caps the figure in millimetres; overflow is impossible because
|
||||
the page box is a fixed 148mm and the figure is the only element that flexes.
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
figcaption {
|
||||
flex: 0 0 auto;
|
||||
margin-top: 1mm;
|
||||
font-size: 7.2pt;
|
||||
}
|
||||
|
||||
@@ -1,547 +0,0 @@
|
||||
# 강동현 · Backend / Platform Engineering Portfolio
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Blog | [velog.io/@donghyeon2](https://velog.io/@donghyeon2) |
|
||||
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
Java / Spring Boot를 중심으로 백엔드를 공부하고 있습니다.
|
||||
현업 개발자의 멘토링 아래 약 6개월 동안 인증, 데이터 조회, 아키텍처, Kubernetes 인프라를 직접 구현하고 검증했습니다.
|
||||
|
||||
제가 가장 많이 시간을 쓴 부분은 **기술을 적용하는 것보다 실제 동작을 설명할 수 있게 만드는 과정**이었습니다.
|
||||
|
||||
- BFF를 적용했다면 브라우저에서 사라진 token은 어디로 갔는지
|
||||
- N+1을 없앴다면 쿼리 수 대신 다른 비용이 커지지는 않았는지
|
||||
- Kubernetes manifest에 설정이 있다면 실제 runtime에서도 집행되고 있는지
|
||||
- API 계약이 맞다면 값이 왜 화면까지 도착하지 않는지
|
||||
|
||||
이 포트폴리오에는 그 질문이 가장 잘 드러나는 네 가지 사례만 담았습니다.
|
||||
|
||||
---
|
||||
|
||||
## 한눈에 보기
|
||||
|
||||
| 주제 | 시작한 질문 | 핵심 판단 |
|
||||
|---|---|---|
|
||||
| **TechLog** | 계약을 한 곳에서 관리하는데 왜 화면에서는 값이 사라질까? | 계약 자체보다 **값이 지나가는 경계와 수동 목록**이 더 자주 깨졌다 |
|
||||
| **Keycloak 인증 경계** | 브라우저에서 token을 없애면 더 좋은 구조일까? | token이 사라지는 것이 아니라 **다른 계층이 state와 검증 책임을 가져간다** |
|
||||
| **피드 조회 성능** | N+1은 fetch join으로 해결하면 끝일까? | 쿼리 수뿐 아니라 **row 수, paging, index, Top-N 비용**을 같이 봐야 했다 |
|
||||
| **Home Platform** | 서비스가 접속되면 인프라 구성이 끝난 걸까? | TLS, proxy trust, secret, state의 **실제 경로를 runtime에서 확인할 수 있어야 했다** |
|
||||
|
||||
---
|
||||
|
||||
# 01. TechLog
|
||||
|
||||
## 기술 기록을 다시 읽을 수 있는 서비스로 만들기
|
||||
|
||||
인증, 성능, 인프라 과제를 진행하면서 문서가 계속 늘었습니다.
|
||||
문제는 기록이 부족한 것이 아니라 **나중에 왜 이런 결정을 했는지 다시 따라가기 어려운 것**이었습니다.
|
||||
|
||||
그래서 단순 블로그가 아니라 프로젝트 → 주제 → 기록의 맥락을 유지하면서 작성·검증·미리보기·게시까지 할 수 있는 TechLog를 만들기 시작했습니다.
|
||||
|
||||
현재 공개 화면은 [hyeonworks.com](https://hyeonworks.com)에서 확인할 수 있습니다.
|
||||
|
||||
### 구조
|
||||
|
||||
```text
|
||||
OpenAPI contract
|
||||
│
|
||||
├── Backend
|
||||
│ domain / application / inbound / outbound
|
||||
│
|
||||
└── Frontend
|
||||
domain / application / adapter / presentation
|
||||
|
||||
Studio
|
||||
Create → Save → Validate → Preview → Publish
|
||||
│
|
||||
▼
|
||||
Public
|
||||
```
|
||||
|
||||
Backend는 현재 **18개 Gradle module**로 나누고, module registry를 기준으로 허용 dependency와 runtime membership을 검증하도록 구성했습니다.
|
||||
|
||||
### 가장 어려웠던 문제 — 계약은 맞는데 값이 사라졌다
|
||||
|
||||
처음에는 OpenAPI 계약을 한 저장소에서 관리하고 Backend와 Frontend가 같은 계약을 사용하면 서로 어긋날 일이 적을 것이라고 생각했습니다.
|
||||
|
||||
실제 문제는 다른 곳에서 나왔습니다.
|
||||
|
||||
```text
|
||||
PostgreSQL
|
||||
→ SQL adapter
|
||||
→ application view
|
||||
→ response mapper
|
||||
→ generated DTO
|
||||
→ HTTP
|
||||
→ frontend gateway
|
||||
→ application port
|
||||
→ component
|
||||
```
|
||||
|
||||
값 하나가 화면에 도착하기까지 여러 경계를 지나면서 **어느 한 곳이 값을 조용히 버려도 타입 검사나 화면에서 오류가 나지 않는 경우**가 있었습니다.
|
||||
|
||||
예를 들어 DB에는 값이 있고 API 계약에도 필드가 존재하지만, 중간 mapper가 해당 필드를 전달하지 않아 화면에서는 빈 값으로 보였습니다. 화면은 이를 오류가 아니라 “데이터가 없음”으로 표현했습니다.
|
||||
|
||||
### 문제를 어떻게 좁혔는가
|
||||
|
||||
증상을 “화면이 비었다”로 보지 않고 **값의 이동 경로를 끝까지 따라갔습니다.**
|
||||
|
||||
- DB row에 값이 있는지
|
||||
- persistence adapter가 읽었는지
|
||||
- application model에 남아 있는지
|
||||
- HTTP response mapper가 전달했는지
|
||||
- generated contract type에 필드가 있는지
|
||||
- frontend adapter가 mapping했는지
|
||||
- 최종 component가 받은 값이 무엇인지
|
||||
|
||||
이 방식으로 contract 자체의 오류와 **contract 이후의 연결 오류**를 분리했습니다.
|
||||
|
||||
### 반복해서 깨진 것 — 손으로 관리한 목록
|
||||
|
||||
Record 종류나 route 종류를 배열·삼항식으로 직접 나열한 곳에서는 새 종류를 추가할 때 누락이 반복됐습니다.
|
||||
|
||||
```ts
|
||||
// 이런 구조에서는 새 종류를 빠뜨려도 마지막 분기로 조용히 떨어질 수 있다.
|
||||
const path =
|
||||
kind === "CASE" ? "/cases/" :
|
||||
kind === "REFERENCE" ? "/references/" :
|
||||
"/projects/";
|
||||
```
|
||||
|
||||
이를 `Record<Kind, Value>`, exhaustive switch, contract coverage test처럼 **누락 자체를 실패로 만드는 구조**로 바꿨습니다.
|
||||
|
||||
핵심은 “사람이 잘 기억하자”가 아니라 **컴파일러나 테스트가 목록의 완전성을 확인하도록 만드는 것**이었습니다.
|
||||
|
||||
### 이 프로젝트에서 남은 기준
|
||||
|
||||
- 값은 중간 layer가 아니라 **최종 사용자에게 보이는 지점까지 확인한다.**
|
||||
- 종류를 수동으로 나열해야 한다면 completeness를 검증할 방법을 같이 둔다.
|
||||
- “없음”과 “읽지 못함”을 같은 UI 상태로 표현하지 않는다.
|
||||
- 테스트가 존재하는 것보다 실제 CI / verification 경로에서 그 테스트가 실행되는지가 중요하다.
|
||||
|
||||
### Stack
|
||||
|
||||
`Java 21` `Spring Boot` `JPA` `PostgreSQL` `Gradle` `ArchUnit`
|
||||
`React` `TypeScript` `OpenAPI` `Vitest` `Playwright`
|
||||
|
||||
---
|
||||
|
||||
# 02. Keycloak 인증 경계
|
||||
|
||||
## “브라우저에서 token을 없애면 더 안전하다”를 구조로 확인하기
|
||||
|
||||
OAuth2 / OIDC를 공부할 때 SPA, BFF, Forward-Auth라는 이름은 많이 볼 수 있었습니다.
|
||||
|
||||
하지만 이름만으로는 다음 질문에 답하기 어려웠습니다.
|
||||
|
||||
- authorization code는 누가 token으로 교환하는가?
|
||||
- access token과 refresh token은 어디에 남는가?
|
||||
- 실제 API caller는 browser인가, server인가?
|
||||
- Resource Server는 JWT를 검증하는가, trusted header를 믿는가?
|
||||
|
||||
같은 기능 요구사항을 두고 네 가지 구조를 직접 구현해 비교했습니다.
|
||||
|
||||
### 네 패턴을 credential 소유권으로 비교
|
||||
|
||||
| 구조 | Browser | Server / Edge | API가 받는 값 |
|
||||
|---|---|---|---|
|
||||
| **SPA** | access / refresh token 관리 | 없음 | Bearer JWT |
|
||||
| **Token Mediator** | access token 사용 | refresh token / client state 관리 | Browser가 보낸 Bearer JWT |
|
||||
| **BFF** | session cookie | OAuth token + server session | BFF가 만든 Bearer JWT |
|
||||
| **Forward-Auth** | proxy session cookie | OAuth login + identity projection | trusted identity header |
|
||||
|
||||
처음에는 SPA → BFF → Forward-Auth로 갈수록 token이 브라우저에서 멀어지므로 더 좋은 구조처럼 보였습니다.
|
||||
|
||||
직접 구현해보니 **없어진 책임은 없었습니다.**
|
||||
|
||||
### BFF — token 대신 state를 운영한다
|
||||
|
||||
BFF에서는 JavaScript가 OAuth token을 받지 않습니다.
|
||||
|
||||
대신 Backend가 다음을 맡습니다.
|
||||
|
||||
- server-side session
|
||||
- authorized client / refresh token 저장
|
||||
- CSRF 검증
|
||||
- downstream API 호출
|
||||
- logout 시 session과 token state 정리
|
||||
- replica가 늘어났을 때 state 공유
|
||||
|
||||
즉 브라우저 token 노출을 줄이는 대신 **stateful backend를 운영하는 비용**이 생겼습니다.
|
||||
|
||||
### Forward-Auth — JWT 대신 header를 믿는다
|
||||
|
||||
Forward-Auth에서는 upstream이 OAuth token을 직접 이해하지 않아도 됩니다.
|
||||
|
||||
하지만 edge가 만든 identity header를 신뢰하려면 조건이 필요했습니다.
|
||||
|
||||
- backend로 직접 들어가는 외부 경로를 닫는다.
|
||||
- browser가 보낸 인증 관련 header를 edge에서 덮어쓴다.
|
||||
- edge와 upstream 사이의 신뢰 범위를 제한한다.
|
||||
- endpoint가 늘어나도 동일한 인가 검증을 적용할 수 있어야 한다.
|
||||
|
||||
결국 “token이 없다”가 아니라 **신뢰할 credential의 형태가 JWT에서 header로 바뀐 것**이었습니다.
|
||||
|
||||
---
|
||||
|
||||
## 단일 인스턴스 설명에서 2-node 환경으로
|
||||
|
||||
인증 구조를 구현한 뒤에는 다음 질문이 남았습니다.
|
||||
|
||||
> Keycloak replica를 늘리면 session은 실제로 어디에 존재하는가?
|
||||
|
||||
물리 서버 위에 VM 2대를 만들고 K3s server / agent로 구성해 Keycloak 두 인스턴스와 PostgreSQL, Redis를 배치했습니다.
|
||||
|
||||
### 예상과 달랐던 session 경로
|
||||
|
||||
Keycloak 26의 기본 `persistent-user-sessions` 조건에서 교차 노드 session 처리는 단순히 “Infinispan이 session을 복제해서” 설명되지 않았습니다.
|
||||
|
||||
실제 SQL과 runtime 상태를 확인하면서 **두 인스턴스가 공유 PostgreSQL의 persistent session state를 사용할 수 있다는 점**을 확인했습니다.
|
||||
|
||||
반대로 persistent session을 끈 조건에서는 JGroups, cache, restart, DB 장애가 결과에 미치는 영향이 달라졌습니다.
|
||||
|
||||
### 장애 명령을 실행했다고 장애가 만들어진 것은 아니었다
|
||||
|
||||
NetworkPolicy, iptables, `tc`를 이용해 network fault를 만들면서 가장 크게 바뀐 습관은 이것이었습니다.
|
||||
|
||||
> 장애 결과를 보기 전에 **장애 자체가 실제로 주입됐는지 먼저 확인한다.**
|
||||
|
||||
기존 connection이 conntrack에 남아 있거나 rule 방향이 틀리면 명령은 성공했지만 통신은 계속될 수 있었습니다.
|
||||
|
||||
그래서 결과를 보기 전에 다음을 따로 확인했습니다.
|
||||
|
||||
- cluster membership
|
||||
- active connection / conntrack
|
||||
- packet counter
|
||||
- process / PID 상태
|
||||
- 실제 요청 결과
|
||||
|
||||
### 다중 replica에서만 보인 문제
|
||||
|
||||
- Refresh Token Rotation 경쟁에서는 동시에 같은 refresh token을 사용했을 때 client session 자체가 무효화되는 조건을 확인했습니다.
|
||||
- Resource Server replica별 JWKS cache 상태가 다르면 같은 old token이 replica에 따라 다른 결과를 낼 수 있었습니다.
|
||||
- Session store와 OAuth2 Authorized Client store는 조회 key가 달라 **session만 Redis로 옮긴다고 token state까지 해결되는 것은 아니었습니다.**
|
||||
|
||||
### 이 실습에서 남은 기준
|
||||
|
||||
인증 구조를 볼 때 이제는 패턴 이름보다 먼저 다음을 확인합니다.
|
||||
|
||||
1. credential의 실제 소유자는 누구인가
|
||||
2. state는 어느 저장소에 남는가
|
||||
3. replica가 늘어나면 그 state를 어떻게 찾는가
|
||||
4. 보호 자원이 최종적으로 무엇을 신뢰하는가
|
||||
5. 실패했을 때 어느 계층이 401 / 403 / 재로그인을 결정하는가
|
||||
|
||||
### Stack
|
||||
|
||||
`Keycloak` `OAuth2 / OIDC` `Spring Security` `PKCE` `JWT / JWKS`
|
||||
`K3s` `PostgreSQL` `Redis` `JGroups` `Nginx` `oauth2-proxy`
|
||||
|
||||
---
|
||||
|
||||
# 03. 피드 조회 성능
|
||||
|
||||
## N+1을 없앤 뒤에도 느릴 수 있는 이유
|
||||
|
||||
피드에서 각 항목의 최신 Highlight와 공개 범위, pagination을 함께 조회하는 과제를 진행했습니다.
|
||||
|
||||
처음 문제는 명확했습니다.
|
||||
|
||||
> FeedItem을 N개 읽으면 연관 데이터를 가져오기 위한 SQL도 N에 비례해 증가한다.
|
||||
|
||||
PostgreSQL 16 Testcontainers와 Hibernate Statistics를 이용해 실제 쿼리 수를 측정했습니다.
|
||||
|
||||
### 기준선
|
||||
|
||||
FeedItem 1,000개를 조회했을 때:
|
||||
|
||||
- PreparedStatement: **2,022**
|
||||
- Highlight collection fetch: **1,000**
|
||||
- local warm-cache 기준 median 약 **193.7ms**
|
||||
|
||||
중요했던 것은 시간보다 **왜 2,022개의 SQL이 발생했는지 분리하는 것**이었습니다.
|
||||
|
||||
---
|
||||
|
||||
## Fetch Join이 항상 답은 아니었다
|
||||
|
||||
N+1 해결책으로 가장 먼저 떠올릴 수 있는 fetch join을 적용했지만 다른 문제가 생겼습니다.
|
||||
|
||||
### 두 collection을 동시에 fetch
|
||||
|
||||
`MultipleBagFetchException`으로 실패했습니다.
|
||||
|
||||
### collection 하나만 fetch
|
||||
|
||||
쿼리 수는 줄었지만 join으로 인해 DB가 보내는 row 수가 늘어났습니다.
|
||||
|
||||
### fetch join + pagination
|
||||
|
||||
응답은 한 page였지만 SQL에는 기대한 `LIMIT`이 없고, 부모 데이터를 더 많이 읽은 뒤 memory에서 page를 잘라내는 문제가 나타났습니다.
|
||||
|
||||
즉 **쿼리 수가 줄었다는 사실만으로 개선이라고 판단할 수 없었습니다.**
|
||||
|
||||
---
|
||||
|
||||
## Batch Fetch — 단순 조회를 유지하면서 쿼리 수 줄이기
|
||||
|
||||
Batch Fetch를 적용한 뒤 같은 N=1,000 조건에서:
|
||||
|
||||
**PreparedStatement 2,022 → 23**
|
||||
|
||||
으로 줄었습니다.
|
||||
|
||||
엔티티 조회 구조를 크게 바꾸지 않고 N+1과 pagination을 함께 다루기에는 유효했습니다.
|
||||
|
||||
하지만 여전히 화면에 필요하지 않은 entity까지 로드하는 비용이 남았습니다.
|
||||
|
||||
그래서 다음 단계로 DTO Projection을 비교했습니다.
|
||||
|
||||
- entity load 0
|
||||
- N이 증가해도 고정된 수의 query
|
||||
- 필요한 컬럼 중심의 읽기 경로
|
||||
|
||||
---
|
||||
|
||||
## 부모마다 최신 3개 — Window vs LATERAL vs 2-step
|
||||
|
||||
다음 요구사항은 단순 LIMIT으로 해결되지 않았습니다.
|
||||
|
||||
> “전체에서 3개”가 아니라 **각 FeedItem마다 최신 Highlight 3개**
|
||||
|
||||
세 가지 접근을 같은 데이터에서 비교했습니다.
|
||||
|
||||
- Window Function
|
||||
- LATERAL
|
||||
- 2-step query
|
||||
|
||||
현재 데이터에서는 **작은 K=3과 복합 인덱스 seek가 가능한 조건**에서 LATERAL이 유리했습니다.
|
||||
|
||||
하지만 인덱스를 제거하거나 K가 커지면 이점이 줄었습니다.
|
||||
|
||||
따라서 결론을 “LATERAL이 빠르다”가 아니라 다음처럼 정리했습니다.
|
||||
|
||||
> LATERAL의 이점은 문법 자체보다 **부모별로 적은 수의 row를 index seek할 수 있는 조건**에서 나온다.
|
||||
|
||||
---
|
||||
|
||||
## 깊은 페이지 — OFFSET vs Keyset
|
||||
|
||||
2,000행 데이터의 100번째 page를 비교했습니다.
|
||||
|
||||
- OFFSET: 앞의 row를 포함해 **2,000행** 탐색
|
||||
- Keyset + 정렬키 index: 다음 page에 필요한 **20행** 탐색
|
||||
|
||||
실행계획에서도 scan-then-discard와 index seek의 차이를 확인했습니다.
|
||||
|
||||
Keyset 역시 항상 정답은 아니었습니다. 정렬 조건을 만족하는 index가 없으면 장점이 크게 줄었습니다.
|
||||
|
||||
### 이 실습에서 남은 기준
|
||||
|
||||
조회 성능을 볼 때 다음 순서로 확인합니다.
|
||||
|
||||
1. query count
|
||||
2. DB가 실제 읽고 반환한 row
|
||||
3. entity materialization
|
||||
4. sort / index 사용 여부
|
||||
5. pagination이 DB에서 일어나는지 memory에서 일어나는지
|
||||
6. 데이터 분포와 K가 바뀌어도 같은 결론인지
|
||||
|
||||
### Stack
|
||||
|
||||
`Spring Data JPA` `Hibernate` `PostgreSQL 16` `Testcontainers` `Flyway`
|
||||
`EXPLAIN (ANALYZE, BUFFERS)`
|
||||
|
||||
---
|
||||
|
||||
# 04. Home Platform
|
||||
|
||||
## “서비스가 뜬다”에서 “요청 경계를 설명할 수 있다”로
|
||||
|
||||
개인 서버에 서비스를 하나씩 올리면서 처음에는 host에 Nginx 설정을 추가하고 K3s 안에 필요한 workload를 배치했습니다.
|
||||
|
||||
서비스가 늘어나자 다음 질문에 바로 답하기 어려워졌습니다.
|
||||
|
||||
- TLS는 어디에서 종료되는가?
|
||||
- 외부 요청이 Kubernetes로 들어가는 문은 몇 개인가?
|
||||
- `X-Forwarded-*`는 누가 만들고 누가 신뢰하는가?
|
||||
- DB와 object storage는 외부에서 직접 접근 가능한가?
|
||||
- Secret은 어디가 원본인가?
|
||||
- manifest에 적힌 설정과 실제 cluster state가 같은가?
|
||||
|
||||
그래서 저장소 설정, 문서, live cluster를 대조하며 현재 구조를 다시 정리했습니다.
|
||||
|
||||
---
|
||||
|
||||
## 요청 경로
|
||||
|
||||
```text
|
||||
Client
|
||||
│ HTTPS
|
||||
▼
|
||||
Host Nginx :443
|
||||
│ TLS termination
|
||||
│ forwarded header overwrite
|
||||
│ source allowlist
|
||||
▼
|
||||
127.0.0.1:30080
|
||||
│
|
||||
▼
|
||||
Traefik NodePort
|
||||
│
|
||||
▼
|
||||
Kubernetes Service
|
||||
│
|
||||
├── Gitea
|
||||
├── Keycloak
|
||||
├── Grafana
|
||||
├── pgAdmin
|
||||
└── Object Storage Console
|
||||
```
|
||||
|
||||
핵심은 두 가지였습니다.
|
||||
|
||||
### TLS는 Host Nginx에서 한 번만 종료
|
||||
|
||||
Nginx 뒤의 cluster 진입은 HTTP로 단순화했습니다.
|
||||
|
||||
### NodePort를 loopback에 제한
|
||||
|
||||
Traefik NodePort를 LAN 전체에 노출하지 않고 `127.0.0.1` 경로로 제한해 **클러스터 진입점을 Host Nginx 뒤로 고정**했습니다.
|
||||
|
||||
또한 외부에서 들어온 `X-Forwarded-*`를 Nginx가 다시 작성하고, Traefik은 실제 upstream source만 trusted proxy로 인정하도록 범위를 좁혔습니다.
|
||||
|
||||
---
|
||||
|
||||
## 상태를 어디에 둘 것인가
|
||||
|
||||
같은 cluster 안에서도 state의 성격을 분리했습니다.
|
||||
|
||||
- PostgreSQL — CloudNativePG
|
||||
- Keycloak — PostgreSQL 기반 identity state
|
||||
- Gitea — PostgreSQL + Local PV
|
||||
- Object Storage — 별도 XFS 영역
|
||||
- Observability — Prometheus / Loki / Tempo 등 각 저장 경로
|
||||
|
||||
Local PV는 노드와 디스크에 강하게 묶입니다.
|
||||
|
||||
따라서 `Retain`이나 PVC가 있다고 해서 이를 백업이나 HA로 표현하지 않았습니다.
|
||||
|
||||
현재 환경은 단일 노드 home lab이므로 노드 자체가 사라지면 플랫폼 전체가 영향을 받습니다. 오프사이트 백업도 별도 과제로 남아 있습니다.
|
||||
|
||||
---
|
||||
|
||||
## Secret Delivery — Vault를 쓰는 이유를 경로로 설명하기
|
||||
|
||||
Secret을 Git에서 제거하는 것만으로는 secret 관리가 끝나지 않았습니다.
|
||||
|
||||
누가 Vault에 접근하고 workload는 무엇을 읽는지까지 분리했습니다.
|
||||
|
||||
```text
|
||||
Vault KV-v2
|
||||
│
|
||||
▼
|
||||
Vault Secrets Operator
|
||||
│
|
||||
▼
|
||||
Kubernetes Secret
|
||||
│
|
||||
▼
|
||||
Workload
|
||||
```
|
||||
|
||||
애플리케이션이 Vault API를 직접 호출하지 않고 Kubernetes Secret만 소비하도록 구성했습니다.
|
||||
|
||||
- Kubernetes Auth
|
||||
- role / policy 분리
|
||||
- VaultConnection / VaultAuth
|
||||
- VaultStaticSecret
|
||||
- bootstrap dependency
|
||||
|
||||
현재 lab Vault는 1 replica / file storage 기준이며 이를 HA 구성으로 표현하지 않습니다.
|
||||
|
||||
---
|
||||
|
||||
## 관측 — 선언과 runtime을 구분하기
|
||||
|
||||
인프라를 정리하면서 가장 중요하게 둔 기준은 다음 다섯 가지였습니다.
|
||||
|
||||
| 표현 | 의미 |
|
||||
|---|---|
|
||||
| **관측** | 실제 host / cluster에서 명령을 실행해 확인 |
|
||||
| **선언** | manifest나 설정 파일에 존재 |
|
||||
| **기록** | 과거 문서에서 확인한 상태 |
|
||||
| **추론** | 관측과 선언을 근거로 판단 |
|
||||
| **미확인** | 아직 확인하지 못함 |
|
||||
|
||||
예를 들어 NetworkPolicy YAML이 저장소에 있다는 사실만으로 실제 통신이 막힌다고 판단하지 않았습니다.
|
||||
|
||||
Prometheus / Grafana / Loki / Tempo / Blackbox Exporter를 구성하고, 필요한 경우 실제 endpoint와 cluster state를 함께 확인했습니다.
|
||||
|
||||
### 이 프로젝트에서 남은 기준
|
||||
|
||||
- manifest는 **의도**이고 runtime은 **결과**다.
|
||||
- `1/1 Ready`는 HA를 의미하지 않는다.
|
||||
- `Retain`은 backup을 의미하지 않는다.
|
||||
- proxy header를 신뢰하려면 proxy를 우회할 경로도 같이 닫아야 한다.
|
||||
- 장애나 보안 정책은 “설정했다”가 아니라 실제 상태 변화로 확인한다.
|
||||
|
||||
### Stack
|
||||
|
||||
`K3s` `Kubernetes` `Nginx` `Traefik` `Kustomize`
|
||||
`CloudNativePG` `Vault` `VSO` `Prometheus` `Grafana` `Loki` `Tempo`
|
||||
|
||||
---
|
||||
|
||||
## 제가 문제를 확인하는 방식
|
||||
|
||||
네 프로젝트의 주제는 다르지만 문제를 확인하는 순서는 비슷했습니다.
|
||||
|
||||
```text
|
||||
1. 먼저 기준선을 만든다.
|
||||
↓
|
||||
2. 내가 예상한 동작을 적는다.
|
||||
↓
|
||||
3. 실제 요청 / SQL / packet / runtime state를 본다.
|
||||
↓
|
||||
4. 예상과 다른 지점을 가장 작은 경계까지 좁힌다.
|
||||
↓
|
||||
5. 수정 후 같은 관측 지점에서 다시 확인한다.
|
||||
↓
|
||||
6. 아직 확인하지 않은 범위를 따로 남긴다.
|
||||
```
|
||||
|
||||
이 방식 때문에 결과가 기대와 다르게 나와도 실습을 실패했다고 보지 않습니다.
|
||||
|
||||
오히려 **예상과 실제가 갈리는 지점이 다음 설계 판단의 근거**가 되었습니다.
|
||||
|
||||
---
|
||||
|
||||
## Additional Work
|
||||
|
||||
## Clean Architecture Backend Template
|
||||
|
||||
Java / Spring 기반 프로젝트에서 domain과 application policy가 framework detail에 끌려가지 않도록 multi-module template을 구성하고 있습니다.
|
||||
|
||||
Gradle에는 module dependency direction을 두고, application / adapter / bootstrap의 책임을 분리하며 ArchUnit과 테스트로 경계를 검증하는 방향으로 개선했습니다.
|
||||
|
||||
## Virtualization
|
||||
|
||||
CPU virtualization에서 시작해 Network, Storage, Memory까지 실제 host 관점에서 학습하고 문서화했습니다.
|
||||
|
||||
KVM / QEMU, vCPU와 VM-exit, virtio / vhost-net / TAP / Linux Bridge, NAT, IOMMU / VFIO 등의 흐름을 명령과 실제 구성 기준으로 정리했습니다.
|
||||
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- **TechLog** — [https://hyeonworks.com](https://hyeonworks.com)
|
||||
- **GitHub** — [https://github.com/donghyeon-ka](https://github.com/donghyeon-ka)
|
||||
- **Blog** — [https://velog.io/@donghyeon2](https://velog.io/@donghyeon2)
|
||||
@@ -0,0 +1,16 @@
|
||||
# 강동현 · Backend Engineer
|
||||
|
||||
## 같은 조회를 query 수, 읽은 row, buffer, 실행 계획으로 나눠 비교했습니다
|
||||
|
||||
> 멘토링 과제로 진행한 Feed Query 성능 비교입니다. N+1, Batch Fetch, Projection, Top-N, index 의존성, pagination을 같은 데이터셋과 같은 측정 조건에서 비교했습니다. 뒤쪽에는 TechLog Backend에서 게시 상태와 module 경계, 인증 경계를 정리한 내용이 이어집니다.
|
||||
|
||||
| **2,022 → 23** | **1,569 → 0** | **2,000 → 20** |
|
||||
|---|---|---|
|
||||
| N=1,000 요청 1건의 PreparedStatement | Projection 적용 후 entity load | 100번째 페이지에서 읽은 row |
|
||||
|
||||
PostgreSQL 16 · Hibernate Statistics · EXPLAIN (ANALYZE, BUFFERS) · Testcontainers · Java 21 · Spring Boot
|
||||
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
|---|---|
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
@@ -0,0 +1,16 @@
|
||||
# 강동현 · Backend Engineer
|
||||
|
||||
## 게시 상태와 module 경계, 인증 경계를 코드로 고정해 왔습니다
|
||||
|
||||
> TechLog Backend를 만들면서 겪은 세 가지 문제를 정리했습니다. 초안이 그대로 공개된 문제, 경로 계약이 흩어져 404가 난 문제, adapter가 늘면서 의존 방향이 사람 기억에 남은 문제입니다. 뒤쪽 Feed Query 성능 비교는 별도 멘토링 과제입니다.
|
||||
|
||||
| **초안 공개 차단** | **404 재발 차단** | **의존 방향 위반 차단** |
|
||||
|---|---|---|
|
||||
| validate·preview를 통과한 version만 publish | route contract 한 곳에서 path 생성 | 선언하지 않은 module edge는 build 실패 |
|
||||
|
||||
Java 21 · Spring Boot · Spring Security · JPA · PostgreSQL · Gradle · ArchUnit · Testcontainers
|
||||
|
||||
| GitHub | [github.com/donghyeon-ka](https://github.com/donghyeon-ka) |
|
||||
|---|---|
|
||||
| TechLog | [hyeonworks.com](https://hyeonworks.com) |
|
||||
| Email | donghyeonka68@gmail.com |
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"cover": "performance.md",
|
||||
"output": "01-backend-performance-portfolio.md",
|
||||
"sections": [
|
||||
"perf-baseline.md",
|
||||
"perf-batch-projection.md",
|
||||
"perf-lateral.md",
|
||||
"perf-pagination.md",
|
||||
"publication.md",
|
||||
"contract-drift.md",
|
||||
"dependency-direction.md",
|
||||
"contract-ownership.md",
|
||||
"auth-decision.md",
|
||||
"auth-boundaries.md"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"cover": "product.md",
|
||||
"output": "01-backend-portfolio.md",
|
||||
"sections": [
|
||||
"publication.md",
|
||||
"contract-drift.md",
|
||||
"dependency-direction.md",
|
||||
"contract-ownership.md",
|
||||
"auth-decision.md",
|
||||
"auth-boundaries.md",
|
||||
"perf-baseline.md",
|
||||
"perf-batch-projection.md",
|
||||
"perf-lateral.md",
|
||||
"perf-pagination.md"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# TechLog · Authentication Modes
|
||||
|
||||
## TechLog에는 `jwt`와 `redis-session` 두 mode를 구현했습니다
|
||||
|
||||
**같은 endpoint인데 상태는 어디에 남는가?** · TechLog Backend · `SecurityConfig` runtime branch
|
||||
|
||||
`SecurityConfig`는 `auth-mode` 값에 따라 두 SecurityFilterChain 중 하나를 고릅니다. 두 branch는 같은 endpoint를 서비스하지만 상태가 남는 위치가 다릅니다.
|
||||
|
||||

|
||||
|
||||
`jwt`는 Resource Server가 서명만 검증하고 서버에 session을 만들지 않습니다. `redis-session`은 `oauth2Login`으로 session을 만들고 SecurityContext를 Redis에 보관하며, session cookie를 쓰는 만큼 CSRF token 경계가 함께 붙습니다. repository 기본값과 현재 로컬 `.env`는 `jwt`이고, 공개 배포가 어느 mode로 떠 있는지는 이 작업공간에서 확인되지 않아 단정하지 않습니다. Forward-Auth는 비교 실험 범위이고 TechLog security branch에는 넣지 않았습니다.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Authentication · 패턴 비교
|
||||
|
||||
## 네 가지 인증 구조를 같은 네 가지 질문으로 비교했습니다
|
||||
|
||||
**구조 이름 말고 무엇을 기준으로 고를 것인가?** · 4-pattern 인증 실험 · Authorization Code + PKCE
|
||||
|
||||
SPA / Token Mediator / BFF / Forward-Auth를 같은 Authorization Code + PKCE 흐름으로 각각 구현했습니다. 브라우저가 무엇을 들고 있는지, API를 누가 호출하는지, 서버가 무엇을 저장하는지, 무엇을 검증하는지를 네 구조에 똑같이 물었습니다.
|
||||
|
||||

|
||||
|
||||
브라우저에서 token을 치우면 서버 쪽에 세션 상태가 생기고, 세션 쿠키를 쓰면 CSRF 경계가 따라옵니다. 이 표는 네 구조를 모두 구현해 본 실험 결과이고, 이 가운데 두 가지를 TechLog에 실제로 넣었습니다.
|
||||
@@ -0,0 +1,16 @@
|
||||
# TechLog · Contract Drift
|
||||
|
||||
## 게시까지 끝난 글의 링크가 404로 끝났습니다
|
||||
|
||||
**같은 public path를 몇 군데에서 만들고 있었는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Project Decision은 publish까지 끝났고 목록에도 보였지만, 링크를 누르면 404가 났습니다. contract, publisher, projection, frontend route가 각각 같은 public path를 따로 만들고 있었고, 그중 한 곳만 규칙이 달라도 목록과 상세가 어긋났습니다.
|
||||
|
||||

|
||||
|
||||
지금은 route contract 한 곳에서 path를 만들고, 경계를 넘을 때마다 같은 정의를 쓰는지 확인합니다.
|
||||
|
||||
- OpenAPI operation과 RecordKind가 adapter 등록에서 빠졌는지 검사
|
||||
- server가 응답한 path가 frontend route로 실제 해석되는지 검사
|
||||
- Nginx serving pattern도 같은 route contract에서 유도
|
||||
- RecordKind는 `Record<RecordKind, _>`와 exhaustive switch로 누락이 컴파일 단계에서 드러나게 함
|
||||
@@ -0,0 +1,15 @@
|
||||
# TechLog · Contract Ownership
|
||||
|
||||
## inbound adapter가 만든 interface를 outbound adapter가 구현하고 있었습니다
|
||||
|
||||
**adapter 하나를 바꿀 때 어디까지 같이 고쳐야 하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
inbound adapter가 자기 interface를 정의하고 outbound adapter가 그 타입을 구현하면서, outer adapter끼리 직접 참조하는 project dependency가 생겼습니다. transport 하나를 바꾸면 관계없는 저장소 adapter까지 같이 열어야 했습니다.
|
||||
|
||||

|
||||
|
||||
port를 application이 소유하도록 옮겼습니다. 이제 adapter는 서로를 모르고 application port만 구현합니다.
|
||||
|
||||
- application이 호출하는 동작은 application port로 선언
|
||||
- 여러 adapter가 같이 봐야 하는 최소 타입만 `shared-contract`에 둠
|
||||
- `app-bootstrap`은 구현체 선택과 runtime 조립만 담당
|
||||
@@ -0,0 +1,13 @@
|
||||
# TechLog · Dependency Direction
|
||||
|
||||
## 의존 방향을 사람 기억이 아니라 build에서 막습니다
|
||||
|
||||
**module 18개에서 참조해도 되는 방향을 누가 기억하는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
web / gRPC / GraphQL / WebSocket과 outbound adapter가 늘면서, 어떤 module이 어떤 module을 참조해도 되는지가 각 Gradle 파일에 흩어졌습니다. 규칙을 리뷰에서 걸러내는 방식으로는 module 18개를 감당하기 어려웠습니다. 허용 edge를 `modules.json`에 한 번 선언하고 실제 project dependency와 비교합니다.
|
||||
|
||||

|
||||
|
||||
- `domain-core` / `shared-contract`는 허용 project dependency 0
|
||||
- 선언하지 않은 project edge는 Gradle `check`에서 실패
|
||||
- domain의 framework dependency와 application의 adapter / transport dependency는 ArchUnit class graph에서 실패
|
||||
@@ -0,0 +1,17 @@
|
||||
# Performance Lab · N+1 Baseline
|
||||
|
||||
## 요청 1건이 SQL 2,022개로 늘어났습니다
|
||||
|
||||
**목록 1페이지를 여는 데 실제로 몇 번 질의하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
`loadFeed(0, N)` 한 번이 N=1,000에서 PreparedStatement 2,022개를 만들었습니다. content 1 + count 1 + User 20 + Page 1,000 + Highlight 1,000으로 분해됩니다. 부모 행이 늘어난 만큼 질의가 따라 늘어나는 구조였습니다.
|
||||
|
||||

|
||||
|
||||
| N | Highlight collection | PreparedStatement | median (5) | max (5) |
|
||||
|---:|---:|---:|---:|---:|
|
||||
| 10 | 10 | 25 | 32.8 ms | 36.1 ms |
|
||||
| 100 | 100 | 222 | 85.9 ms | 108.3 ms |
|
||||
| 1,000 | 1,000 | **2,022** | 193.7 ms | 238.4 ms |
|
||||
|
||||
PostgreSQL 16 Testcontainers · Hibernate Statistics · 동일 JVM · warm DB cache · single thread. 지연은 7회 중 앞 2회를 warm-up으로 제외한 5회의 median / max입니다.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Performance Lab · Batch / Projection
|
||||
|
||||
## PreparedStatement 2,022 → 23, entity load 1,569 → 0
|
||||
|
||||
**왕복을 줄이는 것과 읽기 경로를 분리하는 것은 같은 선택인가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
같은 `loadFeed(0, N)`에서 조회 전략만 바꿔 N=1,000으로 다시 측정했습니다.
|
||||
|
||||

|
||||
|
||||
Batch Fetch는 PreparedStatement를 2,022 → 23으로, collection fetch를 1,000 → 10으로 줄였습니다. Projection은 query를 2개로 고정하고 entity load를 1,569 → 0으로 없앴습니다.
|
||||
|
||||
Batch는 기존 entity 조회 구조를 그대로 두고 왕복만 줄인 최적화이고, Projection은 읽기 전용 contract를 따로 만들어 경로 자체를 나눈 선택입니다. Projection 쪽은 수정 경로에서 쓰던 entity 기능을 쓸 수 없으므로, 목록처럼 읽기만 하는 화면에만 적용했습니다.
|
||||
@@ -0,0 +1,15 @@
|
||||
# Performance Lab · Top-N & Index
|
||||
|
||||
## LATERAL은 index가 있을 때만 60행에서 멈췄습니다
|
||||
|
||||
**부모별 최신 3건을 가져오려고 전체 row를 정렬해야 하는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
부모 20개에서 각각 최신 3건을 가져오는 질의를 Window Function / LATERAL / 2-step으로 비교한 뒤, 이긴 계획이 무엇에 기대고 있는지 다시 확인했습니다.
|
||||
|
||||

|
||||
|
||||
- Window: 60 rows · 430 buffers · 1.552 ms
|
||||
- LATERAL: 60 rows · **204 buffers · 0.323 ms**
|
||||
- 2-step: 1,509 rows · 430 buffers · 1.686 ms
|
||||
|
||||
LATERAL이 빠른 기법이어서가 아니라, 부모별로 원하는 row를 바로 찾을 composite index가 있어서 `LIMIT 3`에서 멈출 수 있었습니다. 작은 K와 큰 group, 그리고 해당 index가 함께 있는 조건에서 측정한 결과입니다.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Performance Lab · Pagination
|
||||
|
||||
## 100번째 페이지에서 OFFSET은 2,000행, Keyset은 20행을 읽었습니다
|
||||
|
||||
**깊은 페이지에서 OFFSET은 무엇을 더 하고 있는가?** · 별도 멘토링 과제 · Feed Query Performance Lab
|
||||
|
||||
seed 2,000건 · page size 20 · 같은 정렬 조건에서 마지막 페이지를 요청했습니다. OFFSET은 건너뛸 행도 일단 읽은 뒤 버리기 때문에 페이지가 깊어질수록 읽는 양이 같이 늘어납니다.
|
||||
|
||||

|
||||
|
||||
- OFFSET 1980: 2,000 rows · 141 buffers · 0.996 ms
|
||||
- Keyset + index: **20 rows · 1 buffer · 0.076 ms**
|
||||
|
||||
Keyset이 항상 빠른 것은 아니고, 정렬 key가 안정적이고 cursor로 이어서 탐색하는 화면에서만 성립합니다. 같은 keyset 조건이어도 정렬 index를 제거하면 다시 전체 scan으로 돌아갔습니다.
|
||||
@@ -0,0 +1,11 @@
|
||||
# TechLog · Publication Workflow
|
||||
|
||||
## 저장되는 시점과 공개되는 시점을 분리했습니다
|
||||
|
||||
**Studio에서 고치는 중인 글이 그대로 공개되어도 되는가?** · TechLog Backend · 개인 프로젝트
|
||||
|
||||
Studio에서는 글을 고치는 동안 저장이 계속 일어납니다. 초기 구현에서는 저장된 내용이 곧 공개 화면의 내용이었기 때문에, 검증을 통과하지 못한 문서도 링크만 알면 보였습니다.
|
||||
|
||||

|
||||
|
||||
Create / Save / Validate / Preview / Publish를 각각 별도 use case로 나누고 working version과 publishedVersion을 따로 저장합니다. 검증에 실패하면 publish 단계로 넘어가지 않고, 문서나 dependency의 revision이 바뀌면 이전 preview는 stale로 표시됩니다. 공개 화면은 endpoint 여러 개의 응답을 조합해 게시 여부를 추측하지 않고 publication status와 publishedVersion만 봅니다.
|
||||
@@ -0,0 +1,28 @@
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const resumeRoot = resolve(here, "..");
|
||||
const sourceRoot = resolve(resumeRoot, "portfolio/backend");
|
||||
|
||||
function readText(path) {
|
||||
return readFileSync(path, "utf8").trimEnd();
|
||||
}
|
||||
|
||||
function numberSection(markdown, index) {
|
||||
const n = String(index).padStart(2, "0");
|
||||
return markdown.replace(/^#\s+/, `# ${n} · `);
|
||||
}
|
||||
|
||||
for (const profileName of process.argv.slice(2)) {
|
||||
const profilePath = resolve(sourceRoot, "profiles", `${profileName}.json`);
|
||||
const profile = JSON.parse(readText(profilePath));
|
||||
const cover = readText(resolve(sourceRoot, "covers", profile.cover));
|
||||
const sections = profile.sections.map((name, index) =>
|
||||
numberSection(readText(resolve(sourceRoot, "sections", name)), index + 1),
|
||||
);
|
||||
const output = `${cover}\n\n${sections.join("\n\n")}\n`;
|
||||
writeFileSync(resolve(resumeRoot, profile.output), output, "utf8");
|
||||
console.log(`${profileName}: ${profile.output} (${profile.sections.length + 1} pages by section)`);
|
||||
}
|
||||
@@ -248,6 +248,17 @@ function renderMarkdown(source) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const image = /^!\[([^\]]*)\]\(([^)]+)\)$/.exec(line.trim());
|
||||
if (image) {
|
||||
const alt = image[1];
|
||||
const caption = alt.replace(/^(FULL|CHART|WIDE|TOPOLOGY|STATE|SMALL)\s*·?\s*/, "").trim();
|
||||
const imagePath = resolve(dirname(inputPath), image[2]);
|
||||
const figcaption = caption ? `<figcaption>${escapeHtml(caption)}</figcaption>` : "";
|
||||
blocks.push(`<figure><img src="file://${imagePath}" alt="${escapeHtml(alt)}">${figcaption}</figure>`);
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isTableStart(lines, index)) {
|
||||
const rows = [];
|
||||
rows.push(parseTableRow(lines[index]));
|
||||
@@ -300,6 +311,7 @@ function renderMarkdown(source) {
|
||||
!lines[index].startsWith(">") &&
|
||||
!/^- /.test(lines[index]) &&
|
||||
!/^\d+\.\s+/.test(lines[index]) &&
|
||||
!/^!\[[^\]]*\]\([^)]+\)$/.test(lines[index].trim()) &&
|
||||
!isTableStart(lines, index)
|
||||
) {
|
||||
paragraph.push(lines[index].trim());
|
||||
@@ -308,7 +320,38 @@ function renderMarkdown(source) {
|
||||
blocks.push(`<p>${inline(paragraph.join(" "))}</p>`);
|
||||
}
|
||||
|
||||
return groupProjectSections(blocks).map((block) => ` ${block}`).join("\n");
|
||||
return groupPages(groupProjectSections(blocks)).map((block) => ` ${block}`).join("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap every <h1> and the blocks that follow it in a fixed-height page box.
|
||||
* The page box is a flex column, which lets its figure claim whatever vertical
|
||||
* space the text on that page leaves over instead of being capped by a guess.
|
||||
*/
|
||||
function groupPages(blocks) {
|
||||
const pages = [];
|
||||
let current = null;
|
||||
|
||||
for (const block of blocks) {
|
||||
if (block.startsWith("<h1>")) {
|
||||
if (current) {
|
||||
pages.push(current);
|
||||
}
|
||||
current = [block];
|
||||
continue;
|
||||
}
|
||||
if (current) {
|
||||
current.push(block);
|
||||
} else {
|
||||
pages.push([block]);
|
||||
}
|
||||
}
|
||||
|
||||
if (current) {
|
||||
pages.push(current);
|
||||
}
|
||||
|
||||
return pages.map((page) => `<section class="page">${page.join("")}</section>`);
|
||||
}
|
||||
|
||||
function groupProjectSections(blocks) {
|
||||
@@ -363,7 +406,9 @@ function parseTableRow(line) {
|
||||
}
|
||||
|
||||
function renderTable(rows) {
|
||||
return `<table><tbody>${rows
|
||||
const columns = rows[0]?.length ?? 0;
|
||||
const className = columns === 3 ? "metric-table" : columns === 2 ? "two-col-table" : "data-table";
|
||||
return `<table class="${className}"><tbody>${rows
|
||||
.map((row) => `<tr>${row.map((cell) => `<td>${inline(cell)}</td>`).join("")}</tr>`)
|
||||
.join("")}</tbody></table>`;
|
||||
}
|
||||
|
||||