전체 글
-
[Spring Security] Stateless 서버를 위한 JWT 인증 방식개발 2021. 7. 28. 20:47
이번 포스팅을 통해 해소하고 싶은 궁금증들은 다음과 같다. - 로그인은 어떻게 이루어지나? - JWT 토큰은 왜 쓰는거야? - 인증 서버의 구조? - OAuth2 인증 - 브라우저마다 달라지는 로컬 스토리지 저장 방식 - 자동로그인 처리 방식? 포스팅을 본격적으로 시작하기 전에 먼저 알아두어야 할 것이 있다. Stateless 서버는 모든 요청에 대해 사용자의 상태를 저장하지 않는다. Stateless 란 사용자의 이전 상태, 즉 세션 정보를 기록하지 않는 접속이다. 서버에서는 모든 API 요청에 대해 인가된 사용자에게만 응답을 보내주어야 한다. 서버가 응답하는 데이터는 매우 민감한 개인 정보가 포함 될 수 있기 때문에, 적절한 권한을 가진 사용자의 요청에만 응답을 보내주어야 한다. 그러나 Statele..
-
[메시지큐] Kafka, RabbitMQ 비교 및 쓰는 이유개발 2021. 7. 21. 21:39
https://ellune.tistory.com/29 메시지 큐는 왜 쓸까? 메시지 큐는 주로 어플리케이션의 요청에 대해 서버가 실시간으로 응답해야 할 때 사용한다. Application 과 서버가 강하게 결합되어 있을 경우, db나 백엔드 단에서 문제가 발생하면 어플리케이션에도 장애가 발생한다. 즉 서버와 어플리케이션 간의 의존성이 높다. 메시지큐를 사용하면.. 느슨하게 결합된 설계 어플리케이션 아키텍쳐가 DB성능에 영향을 덜 받는다. 여러 다른 API 로부터 비동기 통신이 가능하다 다수의 프로세스로부터 메시지 처리 가능 비동기: Queue 에 넣기 때문에 나중에 처리 가능 메시지 큐 종류 Kafka RabbitMQ ActiveMQ 셋 다 비동기 통신하고, Sender 와 Receiver 를 구분하지만..
-
[Kafka] 카프카 개념, Topic, Broker, Partition, Lag, Burrow 등 기초편개발 2021. 7. 21. 20:41
** 본 글은 dev원영 님의 카프카 기초 강의를 기반으로 작성되었습니다. Kafka Application 혹은 서비스와 연결 된 데이터 소스가 많아 짐에 따라 데이터 파이프라인의 관리가 힘듬 데이터 소스와 실제 애플리케이션의 Coupling 을 약하게 만들려는 의도 Fault Tolerance / High Throughput / Low Latency Queue 의 한 종류라고 알면 됨 Topic? 데이터가 들어가는 공간 AMQP 와는 다르게 동작 1. Partition이 하나 인 경우 Kafka 는 하나의 큐처럼 작동함 (FIFO) 하나의 컨슈머가 record 를 가져가도 삭제 되지 않음. consumer 그룹이 다를 경우 이전 데이터를 다른 어플리케이션이 가져 갈 수 있음 조건 컨슈머 그룹이 다를 것..