Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
deploy:
resources:
limits:
memory: 600M
memory: 1000M

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

ν˜„μž¬ app μ„œλΉ„μŠ€μ˜ λ©”λͺ¨λ¦¬ μ œν•œμ΄ 1000M둜 상ν–₯λ˜μ—ˆκ³ , prometheus(800M), kafka(600M) λ“± λ‹€λ₯Έ μ„œλΉ„μŠ€λ“€μ˜ λ©”λͺ¨λ¦¬ μ œν•œλ„ ν•¨κ»˜ 크게 μ¦κ°€ν•˜μ—¬ 전체 μ„œλΉ„μŠ€μ˜ λ©”λͺ¨λ¦¬ μ œν•œ 합계가 μ•½ 3.5GB에 λ‹¬ν•©λ‹ˆλ‹€.\n\nν•˜μ§€λ§Œ 파일의 10번째 라인 μ£Όμ„μ—λŠ” μ—¬μ „νžˆ t3.small μΈμŠ€ν„΄μŠ€(λ©”λͺ¨λ¦¬ 2GB)λ₯Ό κΈ°μ€€μœΌλ‘œ ν•œ 섀정이라고 λͺ…μ‹œλ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. λ§Œμ•½ μ‹€μ œ 운영 ν™˜κ²½μ΄ μ—¬μ „νžˆ t3.small μΈμŠ€ν„΄μŠ€μ—μ„œ μ‹€ν–‰ 쀑이라면, 물리 λ©”λͺ¨λ¦¬ λΆ€μ‘±μœΌλ‘œ 인해 OOM(Out-Of-Memory) λ°œμƒ 및 μ»¨ν…Œμ΄λ„ˆ κ°•μ œ μ’…λ£Œκ°€ 일어날 μœ„ν—˜μ΄ 맀우 λ†’μŠ΅λ‹ˆλ‹€.\n\n운영 μ„œλ²„μ˜ μΈμŠ€ν„΄μŠ€ μŠ€νŽ™μ΄ μ—…κ·Έλ ˆμ΄λ“œλ˜μ—ˆλ‹€λ©΄ 10번째 라인의 주석을 μ΅œμ‹  μŠ€νŽ™μ— 맞게 μˆ˜μ •ν•΄ μ£Όμ‹œκ³ , κ·Έλ ‡μ§€ μ•Šλ‹€λ©΄ 전체적인 λ©”λͺ¨λ¦¬ μ œν•œ 섀정을 λ‹€μ‹œ κ²€ν† ν•΄ μ£Όμ„Έμš”.

reservations:
memory: 400M
healthcheck:
Expand Down Expand Up @@ -85,7 +85,7 @@ services:
deploy:
resources:
limits:
memory: 350M
memory: 800M
restart: unless-stopped
networks:
- catchtable-net
Expand All @@ -102,7 +102,7 @@ services:
deploy:
resources:
limits:
memory: 200M
memory: 300M
restart: unless-stopped
networks:
- catchtable-net
Expand All @@ -121,7 +121,7 @@ services:
deploy:
resources:
limits:
memory: 100M
memory: 200M
restart: unless-stopped
networks:
- catchtable-net
Expand All @@ -144,7 +144,7 @@ services:
deploy:
resources:
limits:
memory: 200M
memory: 300M
restart: unless-stopped
networks:
- catchtable-net
Expand All @@ -171,7 +171,7 @@ services:
deploy:
resources:
limits:
memory: 100M
memory: 200M
restart: unless-stopped
networks:
- catchtable-net
Expand Down Expand Up @@ -216,7 +216,7 @@ services:
deploy:
resources:
limits:
memory: 400M
memory: 600M

restart: unless-stopped
networks:
Expand Down
3 changes: 2 additions & 1 deletion k6/05-store-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const options = {
};

const CATEGORIES = ['KOREAN', 'JAPANESE', 'CHINESE', 'WESTERN', 'CAFE'];
const DISTRICTS = ['강남ꡬ', '마포ꡬ', 'μ’…λ‘œκ΅¬', 'μš©μ‚°κ΅¬', '성동ꡬ'];
const DISTRICTS = ['GANGNAM', 'MAPO', 'JONGNO', 'YONGSAN', 'SEONGDONG'];

export default function () {
const isSpike = exec.scenario.name === 'event_spike';
Expand All @@ -87,6 +87,7 @@ export default function () {
'λͺ©λ‘ 쑰회 200': (r) => r.status === 200,
'응닡 body 쑴재': (r) => r.body && r.body.length > 0,
});
if (!ok) console.log(`[ERROR] status=${res.status} url=${url} body=${res.body?.substring(0, 200)}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

λΆ€ν•˜ ν…ŒμŠ€νŠΈ(특히 50 VU μ΄μƒμ˜ Spike ν…ŒμŠ€νŠΈ) 쀑에 μ‹€νŒ¨ν•œ λͺ¨λ“  μš”μ²­μ— λŒ€ν•΄ console.logλ₯Ό ν˜ΈμΆœν•˜λ©΄, k6 μ‹€ν–‰ λŸ¬λ„ˆμ— κ³Όλ„ν•œ I/O λΆ€ν•˜λ₯Ό μ£Όμ–΄ ν…ŒμŠ€νŠΈ 도ꡬ 자체의 μ„±λŠ₯ μ €ν•˜ 및 응닡 μ‹œκ°„ μ™œκ³‘(μΈ‘μ •κ°’ μ™œκ³‘)을 μ΄ˆλž˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€.\n\n디버깅 λͺ©μ μ΄ μ•„λ‹ˆλΌλ©΄ ν”„λ‘œλ•μ…˜ λΆ€ν•˜ ν…ŒμŠ€νŠΈ μ‹€ν–‰ μ‹œμ—λŠ” 둜그 좜λ ₯을 μ΅œμ†Œν™”ν•˜κ±°λ‚˜, μ—λŸ¬μœ¨μ΄ 높을 λ•Œλ§Œ μ œν•œμ μœΌλ‘œ 좜λ ₯ν•˜λ„λ‘ __ENV.DEBUG 같은 ν™˜κ²½ λ³€μˆ˜λ₯Ό 톡해 μ œμ–΄ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€.

Suggested change
if (!ok) console.log(`[ERROR] status=${res.status} url=${url} body=${res.body?.substring(0, 200)}`);
if (!ok && __ENV.DEBUG) console.log(`[ERROR] status=${res.status} url=${url} body=${res.body?.substring(0, 200)}`);

errorRate.add(!ok);
});

Expand Down
4 changes: 2 additions & 2 deletions k6/06-store-nearby.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function () {
group(`근처 λ§€μž₯ 쑰회 (nearby) - ${loc.name}`, () => {
const res = http.get(
`${BASE_URL}/api/v1/stores/nearby?latitude=${lat}&longitude=${lng}&page=0&size=10`,
{ headers: HEADERS_JSON, timeout: '15s' },
{ headers: HEADERS_JSON, timeout: '15s', tags: { name: 'GET_nearby' } },
);
nearbyDuration.add(res.timings.duration);
record(res.timings.duration);
Expand All @@ -104,7 +104,7 @@ export default function () {
`?minLat=${loc.minLat}&maxLat=${loc.maxLat}` +
`&minLng=${loc.minLng}&maxLng=${loc.maxLng}` +
`&centerLat=${lat}&centerLng=${lng}&limit=50`;
const res = http.get(url, { headers: HEADERS_JSON, timeout: '15s' });
const res = http.get(url, { headers: HEADERS_JSON, timeout: '15s', tags: { name: 'GET_in_bounds' } });
inBoundsDuration.add(res.timings.duration);
record(res.timings.duration);
if (res.timings.duration >= 15000 || res.status === 0) timeoutCount.add(1);
Expand Down
Loading