전체 글
-
[Mac] homebrew jmeter 설치 및 테스트성능테스트 2023. 11. 19. 00:01
homebrew란? macOS의 패키지 관리 소프트웨어로써 쉽게 설치/삭제를 할 수 있도록 지원합니다. Homebrew로 설치 & 실행 터미널에서 설치 brew install jmeter 터미널에서 실행 open /opt/homebrew/bin/Jmeter Jmeter UI Jmeter란? Apache에서 자바로 만든 웹 애플리케이션 성능 테스트 오픈 소스입니다. 위의 그림과 같은 GUI를 지원합니다. JMeter 테스트 용어 - Thread Group : 테스트에 사용될 스레드 개수, 스레드 1개당 사용자 1명 - Sampler : 사용자의 액션 (예: 로그인, 게시물 작성, 게시물 조회 등) - Listener : 응답을 받아 리포팅, 검증, 그래프 등 다양한 처리 - Configuration : S..
-
토스 SLASH 23 - 토스는 Gateway 이렇게 씁니다.세미나, 영상 요약정리 2023. 11. 18. 00:01
https://www.youtube.com/watch?v=Zs3jVelp0L8 발표를 요약해보고자 합니다. Gateway란? 라우팅 및 프로토콜 변환을 담당하며 마이크로 서비스의 중개자 역할을 수행합니다. Client와 독립적으로 확장할 수 있고 보안, 모니터링을 위한 단일지점을 제공합니다. 예를 들어 게이트웨이가 없는 경우 인증을 위해 각서버 개발자는 인증 서버의 업데이트 사항을 추적해야 합니다. 실수로 누락된다면 장애로 이어질 수 있습니다. 게이트웨이가 있는 경우는 유저의 요청을 받고 필요한 인증 등의 공통 로직을 통합하여 처리하고 업스트림 서버로 넘겨줍니다. BFF(Backend For Frontend) Gateway를 2개로 구성함에 따라 필요한 관심사를 분리하고 Client에 맞는 전략을 가져갈..
-
내가 만든 ThreadPool 모니터링 하기모니터링 2023. 11. 17. 00:01
개요 내가 만든 ThreadPool 모니터링하기 의존성 및 yml 설정 dependencies { implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("io.micrometer:micrometer-core") } actuator를 통한 모니터링과 custom metric을 등록하기 위해 micrometer 의존성을 추가합니다. application.yml management: health: db: enabled: false redis: enabled: false endpoints: web: exposure: include: metrics,health Spring Boot Actuator Metrics ..
-
Dead Letter Queue란 무엇인가?프로젝트/kafka 2023. 11. 16. 00:01
개요 Dead Letter Queue(Topic)란 무엇인가? Dead Letter Queue를 사용하는 이유는 무엇인가? Deale Letter Queue 전략 Dead Letter Queue란? DLQ(Dead Letter Queue) , DLT(Dead Letter Topic)로도 불리며 Message Queue에서 소비되지 못한 메시지가 이동할 수 있는 Queue 또는 Topic을 뜻합니다. Kafka의 경우에는 Topic이지만 용어의 통일성을 위하여 Dead Letter Queue라고 명칭 하겠습니다. Consumer Application 내의 잘못된 조건이나 예기치 않은 상태 변경 등 다양한 문제로 메시지가 처리되지 않을 수 있습니다. Consumer Application이 메시지를 처리하려고..
-
kafka Consumer Lag 모니터링하기프로젝트/kafka 2023. 11. 15. 00:01
개요 만약 Application에서 메시지를 publish 하는 양을 cosumer가 따라오지 못하는 경우 어떻게 인지할 수 있을까요? 이 경우를 인지하기 위해서 kafka Consumer Lag을 모니터링해야 합니다. Kafka Consumer Lag 이란? 예를 들어 토픽에 파티션이 하나 있다고 가정하겠습니다. 이때 Consumer가 처리하는 속도가 Producer에서 메시지를 발행하는 속도보다 느려지는 상황에서 Producer는 4번째 메시지까지 발행했지만 Cosumer에서는 1번째 메시지를 읽고 있을 수 있습니다. 이런 경우 메시지간 Offset의 차이가 발생하게 되고 이를 Consumer Lag이라고 부릅니다. Lag을 번역하면 "지연"이라는 의미를 가집니다. 한마디로 Producer의 속도를 ..
-
Kotlin ObjectMapper 주의사항Spring Framework 2023. 11. 14. 00:01
개요 Kotlin에서는 직렬화 역직렬화를 위해 Jackson을 지원합니다. 의존성 추가 Maven com.fasterxml.jackson.module jackson-module-kotlin 2.15.3 Gradle(Kotlin) implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.3") 테스트 클래스 data class Movie( var name: String, var studio: String, var rating: Float? = 1f, ) jacksonObjectMapper 테스트 @Test fun `kotlin에서 지원하는 jacksonObjectMapper를 사용해보기`(){ val objectMapper = jack..
-
8장 - 인덱스CS/Real MySQL 8.0 요약 2023. 11. 13. 00:01
디스크 읽기 방식 순차 I/O - 3개의 페이지를 기록하기 위해 1번의 시스템 콜(OS) 랜덤 I/O - 3개의 페이지를 기록하기 위해 3번의 시스템 콜(OS) 데이터베이스의 성능 튜닝은 랜덤 I/O를 줄이는 것입니다. 랜덤 I/O를 줄인다는 것은 꼭 필요한 데이터만 읽도록 쿼리를 개선하는 것입니다. 인덱스란? 책의 색인에 비유되며 책의 내용은 데이터 파일에 해당됩니다. 책에서 "ㄱ", "ㄴ", "ㄷ" 형태로 정렬되어 있는 것처럼 인덱스로 키가 정렬되어 있습니다. 정렬되어 있기 때문에 저장을 수행할 때 성능을 희생되고 읽기를 수행할 때 성능이 좋습니다. 따라서 모든 칼럼에 인덱스를 거는 건 역효과를 낼 수 있습니다. 인덱스는 PK인지 아닌지에 따라 프라이머리 키와 세컨더리 키로 구분할 수 있습니다. 저장..
-
QuerydslRepositorySupport FetchResults Deprecated 대안JPA 2023. 11. 12. 00:01
개요 QuerydslRepositorySupport를 활용하여 Paging을 구현하다가 FetchResults의 Deprecated를 발견하고 어떻게 대처했는지 기록하고자 합니다. QuerydslRepositorySupport란 무엇인가? QuerydslRepositorySupport에서 Paging을 처리하는 방법 FetchResults가 Deprecated 된 이유 대안 및 해결방안 QuerydslRepositorySuppprt란? public abstract class QuerydslRepositorySupport 추상클래스로써 QueryDsl을 편하게 사용하기 위해 구현된 클래스입니다. QuerydslRepositorySupport에서 Paging을 처리하는 방법 public JPQLQuery a..