전체 글
-
토스 SLASH 22- 애플 한 주가 고객에게 전달 되기까지세미나, 영상 요약정리 2023. 7. 30. 00:01
https://www.youtube.com/watch?v=UOWy6zdsD-c 토스증권 서버 개발자 이승천 님의 발표를 요약해 보겠습니다. 해외주식 아키텍처 게이트웨이, 채널계, 해외원장, 국내 원장로 구성되어 있습니다. 대부분의 증권사들의 원장계는 C 기반 모놀리틱으로 구성되어 있지만 토스증권은 MSA 기반으로 구성되어 있습니다. 토스증권은 한국법인으로 나스닥과 같은 현지 거래소와 직접 거래할 수 없습니다. 따라서 브로커를 통해 주문을 제출하게 됩니다. 매매 서버 -> 매매 요청 서버 -> 브로커에게 전달 -> 브로커는 현지 거래소에 요청 체결 수신 서버 -> kafka를 거쳐 매매서버에서 처리가 이루어집니다. 매매 요청서버와 체결 수신서버가 별개로 이루어진 이유는 나중에 밝힙니다. 동시성으로부터 고객..
-
kafka는 왜 속도가 빠를까?프로젝트/kafka 2023. 7. 29. 00:01
개요 메시지큐에는 Kafka, RabbitMQ, ActiveMQ 등 다양한 선택지들이 있습니다. 보통 Kafka를 처리량이 많은 분산 메시징 시스템에서 사용하며 확장성, 고성능 및 높은 처리량이 항상 키워드로 따라옵니다. Kafka vs ActiveMQ, RabbitMQ 성능차이 Kafka의 특징 중 하나로 메시지를 메모리에 저장하는 Rabbit MQ, Active MQ와 다르게 파일에 저장합니다. 파일에 저장한다는것은 Disk에 저장하고 읽는다는 것인데 어떻게 빠르게 동작할 수 있을까요? 물론 처리량이 낮은 30MB/s이하에서는 RabbitMQ 가 조금 더 낮은 레이턴시를 보여줍니다. 하지만 30MB/s 이상 처리해야한다면? 카프카를 사용해야 할 것 같습니다. 카프카가 빠른 이유에 대해서 알아보도록 하..
-
Spring Boot WebSocket with Kafka프로젝트/WebSocket 2023. 7. 28. 00:01
개요 지난번 포스팅에서는 Spring WebSocket External Broker 적용을 통해 In-memory Broker인 SimpleBroker를 사용하지 않고 External Broker인 STOMP Message Broker인 ActiveMQ를 적용해 보았습니다. 하지만 저를 포함한 팀원들이 ActiveMQ에 대해 자세히 알지 못했으며 추후 트러블슈팅이나 운영 등을 생각해서 팀원들이 알고 있는 메시지 브로커인 Kafka로 WebSocket을 활용해보고자 합니다. 다시 보는 External Broker를 활용한 STOMP 구조도 하지만 Kafka는 STOMP 프로토콜을 지원하지 않습니다.. Kafka 어떻게 적용하지? - 다시 SimpleBroker로 다시 SimpleBroker로 돌아갑니다. ..
-
Amazon MSK란?AWS 2023. 7. 27. 00:01
Amazon MSK란? MSK는 Managed Streaming for Apache Kafka의 약자로 AWS에서 제공하는 완전 관리형 서비스로, 실시간 데이터 스트리밍을 위해 Apache Kafka를 사용하는 애플리케이션을 쉽게 빌드하고 실행할 수 있도록 지원합니다. Apache Kafka는 높은 처리량, 내결함성, 확장성으로 잘 알려진 오픈 소스 분산 이벤트 스트리밍 플랫폼입니다. 기본 인프라 관리 작업을 처리하여 클러스터의 설정, 관리 및 운영을 간소화하여 개발자가 애플리케이션 구축과 데이터 처리에 더 집중할 수 있도록 해줍니다. Apache Kafka clusters 직접 구성해서 사용하는 것에 비해 제공되는 이점 하드웨어 구성 소프트웨어 설치 및 구성 유지 관리 작업 모니터링 확장성 고가용성 보..
-
How to use Spring Cloud Dataflow - 이세왕세미나, 영상 요약정리 2023. 7. 26. 00:01
https://www.youtube.com/watch?v=awIHq5CyxPg 라인플러스의 이세왕님의 발표를 요약해 보면서 Spring Cloud DataFlow에 대해 알아보고자 합니다. 주요 내용 Spring Cloud Dataflow란? 실무에서 어떻게 사용되는지? Spring Cloud Dataflow란? 데이터를 Function 단위의 Application으로 파이프라인을 구성할 수 있게 함 Batch, Stream을 구성하는 application과 application 간의 Channel을 관리해 줌 kafka로 예시를 들면(topic, group, partition 등을 관리) Target Platform에 따라 application을 배포해줌 실행하기에 필요한 플랫폼들 docker dat..
-
Spring Cloud Data Flow란?Spring Framework 2023. 7. 25. 00:01
Spring Cloud Data Flow란? 약자를 따서 SCDF라고도 불리며 핵심 요소로 Streaming과 Batch 작업을 수행할 수 있도록 도와줍니다. Source, Sink, Processor 등을 추상화하여 개발자가 비즈니스 로직과 데이터 처리 작업을 집중할 수 있도록 도와줍니다. Data Flow Server와 Skipper Server 2가지 주요 서버 컴포넌트로 구성되어 있습니다. Data Flow server은 데이터 흐름의 주요 진입점을 담당합니다. Restful API를 통해 이루어지고, 웹 대시보드가 제공됩니다. 이외에도 Cloud Foundry, Kubernetes 또는 local 머신에서 실행할 수 있습니다. Skipper Server는 하나 이상의 플랫폼에 스트림을 배포하거나..
-
4장 - MySQL 엔진 아키텍처CS/Real MySQL 8.0 요약 2023. 7. 24. 00:01
개요 MySQL 아키텍처를 정리해 보고, 더 잘 이해해보고자 합니다. MySQL 아키텍처 구성도 MySQL 서버는 MySQL 엔진과 스토리지 엔진으로 구성되어 있습니다. MySQL 엔진은 사람의 머리 역할을 담당하고, 스토리지 엔진은 손과 발의 역할을 담당합니다. MySQL 엔진에는 Connection Handler, SQL Interface, SQL Parser, Optimizer, Caches & Bufferes가 있습니다. 스토리지 엔진에는 InnoDB, MyIsam, Memory 등이 존재합니다. File System와 Files & Logs 부분은 운영체제 & 하드웨어에 부분에 해당합니다. MySQL Connectors 다양한 언어들의 애플리케이션이 MySQL 데이터베이스에 연결하고 상호작용할 ..
-
8장 - 통합 테스트를 하는 이유테스트코드(Test Code)/단위테스트 - 생산성과품질을위한 단위테스트원칙과패턴 2023. 7. 23. 00:01
8장에서 다루는 내용 통합 테스트의 역할 이해 테스트 피라미드의 개념 자세히 살펴보기 가치 있는 통합 테스트 작성 단위 테스트에만 전적으로 의존하면 시스템이 전체적으로 잘 동작하는지 확신할 수 없습니다. 각 부분이 데이터베이스나 메시지 버스 등의 외부 시스템과 어떻게 통합되는지 확인해야 합니다. 예를 들어 다음과 같은 경우가 있을 수 있습니다. 단위 테스트는 통과했지만 Spring Bean Wiring이 되지 않아 애플리케이션이 실행되지 않을 수 있습니다. 통합 테스트란? 간단하게 단위 테스트가 아닌 모든 테스트는 통합 테스트이다. 통합 테스트가 어려운 이유 2가지 관련된 협력자가 많아 테스트가 비대해짐 프로세스 외부 의존성 운영이 필요 빠른 피드백, 유지 보수성을 포기하는 대신 회귀 방지와 리팩토링 내..