ghkdqhrbals / spring-chatting-server

In this project, we develop a chat server with automatic distribution, automatic scale in/out, and maintenance functions! For more information, please visit https://ghkdqhrbals.github.io/portfolios/docs/project
MIT License
42 stars 3 forks source link

[Performance] ๐ŸŸข MTTFB AVG Diff. 30.5% Improved by - RDB b-tree indexing with Long `POST /api-chat/chat` #354

Open ghkdqhrbals opened 11 months ago

ghkdqhrbals commented 11 months ago

์„ฑ๋Šฅ๊ฐœ์„  ์ด์ „์— ๊ธฐ์กด ์„œ๋น„์Šค์˜ ์„ฑ๋Šฅ์ธก์ •

10๋ถ„๊ฐ„ ์ฑ„ํŒ…์ „์†ก API ์˜ ํผํฌ๋จผ์Šค๋ฅผ ramp-up VUSER 300 ์œผ๋กœ ์ธก์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์˜ ํ…Œ์ด๋ธ”์€ Thread warm up ์ด์ „๊ณผ ์ดํ›„ ์ฐจ์ด๋ฅผ ๊ด€์ฐฐํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๊ทธ๋ž˜ํ”„๋Š” ์›œ์—… ์ดํ›„์˜ ๊ทธ๋ž˜ํ”„์ž…๋‹ˆ๋‹ค.

์ดํ›„ ์„ฑ๋Šฅ๊ฐœ์„  ๋น„๊ต๋Š” warm-up ์ดํ›„๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋น„๊ตํ•ฉ๋‹ˆ๋‹ค.

Metric Before Thread Warm-up After Thread Warm-up Change
TPS ํ‰๊ท  (Average) 341.90 390.94 14.34% ๐ŸŸข
TPS p95 446.50 464.73 4.08% ๐ŸŸข
TPS p99 500.07 491.26 -1.76% ๐Ÿ”ด
MTTFB ํ‰๊ท  649.70 ms 496.27 ms 23.62% ๐ŸŸข
MTTFB p95 1602.63 ms 882.81 ms 44.91% ๐ŸŸข
MTTFB p99 2231.59 ms 1163.81 ms 47.85% ๐ŸŸข
MTTFB ์ฐจ์ด ํ‰๊ท  184.45 ms 106.51 ms 42.26% ๐ŸŸข
MTTFB ํ‰๊ท ์ ์ธ ๋ณ€๋™๋ฅ  22.49% 20.77% 7.65% ๐ŸŸข
image image image image
ghkdqhrbals commented 11 months ago

Chatting ํ…Œ์ด๋ธ” PK ๋ฅผ String ์—์„œ Long ํƒ€์ž…์œผ๋กœ ๋ณ€๊ฒฝ ํ›„ seq ์— ๋”ฐ๋ผ ์ž๋™์œผ๋กœ ์‚ฝ์ž…๋˜๋„๋ก ์„ค์ •

Metric Before After Change
TPS ํ‰๊ท  390.94 416.85 6.63% ๐ŸŸข
TPS p95 464.73 472.70 1.71% ๐ŸŸข
TPS p99 491.26 520.06 5.86% ๐ŸŸข
MTTFB ํ‰๊ท  496.27 ms 456.42 ms 8.03% ๐ŸŸข
MTTFB p95 882.81 ms 799.67 ms 9.42% ๐ŸŸข
MTTFB p99 1163.81 ms 1130.67 ms 2.85% ๐ŸŸข
MTTFB ์ฐจ์ด ํ‰๊ท  106.51 ms 74.02 ms 30.5% ๐ŸŸข
MTTFB ํ‰๊ท ์ ์ธ ๋ณ€๋™๋ฅ  20.77% 15.27% 26.48% ๐ŸŸข
image image image