qwlake's Blog

어서오세요, 반갑습니다 :)

[SpringBoot] Redis Message Queue

Why Redis for Message Queue? In my case already using Redis. Useally it comes with Kafka but our team does not using that yet. And buisness requirements are not heavy. So We decided to use Redis f...

[TroubleShooting] Complete Service Outage

상황 어느날 백엔드 api의 response가 모두 404로 나가는 장애가 보고됨 문제점 모든 api가 정상동작 하지 않으므로 서비스 전체 먹통 내가 생각했던 원인 특정 api 호출시 간헐적으로 무기한 대기에 빠짐 에러 로그에서 A사를 호출하는 rest template 코드를 공통적으로 발견했기 때문 ...

[SpringBoot] Api validation using ip and its TestCode

In my previous post, there is AcceptApiFilter . It uses ApiUrlValidationService . So this post find out how it works and how test it. Testing is so important in this case. Because if someone added ...

[TroubleShooting] Too many sessions on session stoarge (Redis)

상황 어느날 프론트팀의 배포 이후 서버 로그에서 세션 수가 과도하게 많다는 warnning 발생 문제점 세션 스토리지(Redis)의 메모리 사용량 지속적 증가 내가 생각했던 원인 토큰 발급 및 검증 관련 api가 과도하게 호출되지 않는지 의심 -> 세션 수가 과도하게 많기 때문 원인 검증 모니터링 툴로 확인한 결과 토큰 관련 a...

[SpringBoot] SecurityFilterChain

What is SecurityFilterChain? Filter do some process what you want before Controller. SecurityFilter is do something before other filters. In my case I need some processes in SecurityFilter phase. ...

[SpringBoot] Distributed Lock with Redis

Before we go What is Distributed Lock? Syncronizing datas or api calls for multiple servers. Why Redis for Distributed Lock? Eastest way in my case. Because of not heavy requirements. Why impl...

[IntelliJ] 인텔리제이 핫스왑으로 개발 효율을 높여보자

핫스왑이란? 실행중인 app을 중단하지 않고 수정된 파일만을 compile 하여 reload하는 것 Before use gradle 파일에 org.springframework.boot:spring-boot-devtools 추가 Run/Debug Configuration → Modify options → On 'Update' action ...

[Spring] 내장DB(Embedded mariadb) mariaDB4j 실행 관련 에러 (feat. openssl)

내장 mariadb 설치 testImplementation*("ch.vorburger.mariaDB4j:mariaDB4j:2.5.3") 설치 후 실행(Junit test)하는데 에러 현재 맥 계열(intel, silicon)에서만 발견한 문제이다. (리눅스는 확인 못해봤고, 윈도우에서는 정상동작) 1 2 3 4 5 6 ... dyld[30098]...

[Nginx] nginx ssl certificate 검증을 위한 인증서 세팅

nginx에서 ssl 인증서를 검증하기 위해서는 아래의 조건이 필요 검증된 루트 인증서들의 모음이 필요하다. 루트 인증서, 체인 인증서, 도메인 인증서 가 하나의 인증서로 묶여야 한다. 검증된 루트 인증서를 구하는 방법 자바의 루트 인증서 모음을 가져온다. $JAVA_HOME\lib\security\cacerts 해당 cacerts...

[Nginx] mTLS 샘플 인증서 발급 및 검증

테스트용 인증서 발급 ca 인증서 발급 1 2 3 4 5 6 7 8 openssl req \ -newkey rsa:4096 \ -x509 \ -keyout ca.key \ -out ca.crt \ -days 30 \ -nodes \ -subj "/CN=my_ca" 서버 인증서 발급 1 2 3 4 5 6 7 8 9 10...