Open O0oO0Oo opened 9 months ago
CPU 사용량, 메모리 피크가 현저히 줄어들었다. CPU : 20\~30% -> 0\~10% 메모리 : 300MB이상 -> 100MB이하 개선 전 개선 후
--- 192.168.35.247 ping statistics ---
175 packets transmitted, 175 received, 0% packet loss, time 174121ms
rtt min/avg/max/mdev = 12.730/188.073/427.028/95.848 ms
대부분의 시간 소모가 네트워크에서 발생한다.
Redis 를 다음과 같이 개발 환경에 구성했을떄 BTC를 소비 후 다시 BTC로 되돌아 오는데 0.5초로 단축된다. 전 : Redis <-무선-> 공유기 <-무선-> 개발환경 후 : Redis <-유선-> 공유기 <-무선-> 개발환경
--- 192.168.35.179 ping statistics ---
75 packets transmitted, 75 received, 0% packet loss, time 74159ms
rtt min/avg/max/mdev = 0.703/1.720/2.265/0.333 ms
기존 key : order:{type}:{coinName}:{price} member : {orderId}:{walletId}:{userId}:{quantity}
wallet 테이블의 보유 수량에 반영하기 위해 2가지 항목 -> walletId, quantity 여기에서 userId 는 필요하지 않음.
개선 key : order:{type}:{coinName}:{price} member : {orderId}:{walletId}:{quantity}
기존 key : order:{type}:{coinName}:{price} member : {orderId}:{walletId}:{userId}:{quantity}
user 테이블 잔고에 반영하기 위해 2가지 항목 -> userId, price * quantity 여기에서 walletId 는 필요하지 않음.
개선 key : order:{type}:{coinName}:{price} member : {orderId}:{userId}:{quantity}
이슈 개요
리팩토링 작업 메모
작업 목록