분류 전체보기
-
[AWS] ElastiCache로 Redis 클러스터 모드 생성 및 적용해보기AWS 2024. 8. 17. 09:39
AWS ElastiCacheAmazon Web Services(AWS)에서 제공하는 완전 관리형 인메모리 데이터베이스 서비스입니다. 고속 데이터 캐싱을 통해 애플리케이션의 성능을 향상시키고, Redis와 Memached 두 가지 엔진을 지원하고 있습니다. 적용하기 전에ElastiCache For Redis에서 클러스터를 구성할 때 아래와 같은 세가지 옵션이 존재합니다.싱글 클러스터 노드 (단일 노드)클러스터 모드 없이 Replication만 지원 (클러스터 모드 비활성화)클러스터 모드와 Replication 모두 지원 (클러스터 모드 활성화) 위 사진에서 왼쪽이 클러스터 모드 비활성화된 옵션의 모습이고, 오른쪽이 클러스터 모드 활성화된 옵션의 모습입니다.클러스터 모드 비활성화(왼쪽)는 하나의 prim..
-
MacOS 로컬 환경에서 Docker Redis Cluster 설정 및 Springboot와 연동하기Redis 2024. 8. 9. 12:22
Docker ComposeDocker Desktop for Mac을 사용하며(M3 MacOS) Docker 환경을 구성하려 하기 때문에 arm64v8/redis 이미지를 사용하였습니다. docker-compose.ymlversion: '3'services: redis-master-1: container_name: redis-master-1 image: arm64v8/redis:latest restart: always volumes: - ./redis-master-1.conf:/etc/redis-master-1.conf command: redis-server /etc/redis-master-1.conf ports: - "7001:7001" ..
-
MSA) 서비스 별 각 인스턴스에서 애플리케이션을 Docker 컨테이너화 후, 발생한 Eureka Client 간의 통신 문제SpringBoot 2024. 7. 9. 10:38
개발 서버를 구축하기 위해, 현재 위와 같이MSA의 Eureka 서버를 제외하고, 각 서비스들을 각각의 인스턴스에 Blue/Green 무중단 배포를 적용하여 도커로 컨테이너화 한 상태였습니다. API Gateway 서버와 Batch Service 서버 모두CD가 동작하면 각 서버에 작성한 쉘 스크립트가 실행되어 Blue/Green 무중단 배포를 적용하는 방식입니다. 위와 같이 Blue/Green을 적용을 확인하기 위해 각 마이크로 서비스에 헬스 체크 컨트롤러를 만들어 둔 상태였습니다. 문제각 서비스에서 도커 컨테이너가 정상적으로 올라간 것을 확인한 후,API Gateway 서버에서 Batch Service의 API를 잘 라우팅 해주는지 확인하기 위해아래와 같이 리눅스 상에서 curl 명령을 통해 헬..
-
[AWS] IAM 개념 및 IAM 사용자 추가하기 + IAM 정책 시뮬레이터AWS 2024. 6. 18. 12:50
IAM(Identity and Access Management)유저를 관리하고 접근 레벨 및 권한에 대한 관리 AWS 계정을 최초로 생성할 때, 해당 계정은 모든 AWS 서비스 및 리소스에 대해 완전한 액세스 권한이 있는 루트 사용자입니다.이러한 루트 계정은 모든 권한을 가지고 있기 때문에 공유되어서 사용되면 안됩니다. 만약에 A라는 회사에서 보유하고 있는 루트 계정을B, C, D라는 직원이 입사하여 개발과 관리를 위해 권한이 필요하다고 루트 계정을 알려주게 되면보안상 심각한 문제가 됩니다. 거기다가 만약에 C라는 직원이 갑자기 퇴사하게 된다면...?!그러므로 루트 계정으로부터 특정 리소스에 대해서 관리하고 사용할 수 있는 권한을 부여해주는IAM 계정을 B, C, D 직원에 각각 부여하여 사용하는 것이..
-
MSA) Spring Cloud 기반의 MSA 구조에서 Swagger 통합하기 + FastAPI의 Swagger까지SpringBoot 2024. 6. 17. 21:51
들어가며 저번 시간에 FastAPI 서버를 Spring Cloud Eureka에 Client로 등록하는 방법에 이어서,이번에는 각 서비스마다 Swagger를 설정하여 이를 한 곳에서 통합하여 볼 수 있게끔 적용하려고 합니다. MSA 구조에서 프로젝트를 진행하면, 각 마이크로서비스들이 각각의 애플리케이션에서 돌아가기 때문에모놀리식 구조와 다르게 API 문서들을 관리하는데 어려움이 존재합니다. 쉽게 설명해보자면 모놀리식 구조의 경우 하나의 애플리케이션으로 운영 되므로애플리케이션에 Swagger를 하나만 띄우면 되지만 MSA 구조는 서비스들이 독립적으로 분리되어있기 때문에 서비스마다 Swagger를 띄워줘야합니다.이러한 상황에서 Swagger를 통합해주지 않는다면, API를 받아쓰는 프론트 입장에서는 호출하..
-
SW마에스트로 15기 발대식SW마에스트로 2024. 6. 14. 19:35
발대식6월부터 SW마에스트로 본 과정이 시작되면서, 6월 3일 15기의 시작을 알리는 발대식 행사가 개최되었습니다. 발대식 행사는 양재역에서 가까운 큰 예식장에서 진행되었고 행사장 층에 도착하니 포토존이랑 인생 네 컷이 준비되어 있었습니다.심지어 폴라로이드도 찍을 수 있게 마련되어 있었는데 행사 시작하기 전에 팀원들이랑 쉴 새 없이 찍었습니다 ㅎㅎ 행사장 내부에 들어갔을 때 규모도 크고 예쁘게 꾸며놓아서 정말 놀랐습니다..앞에는 내빈분들이랑 전 기수 우수자분들을 위한 테이블이 따로 있었고각 테이블들은 팀원들끼리 앉을 수 있도록 비치되어 있었습니다. 얘기가 딴 데로 새지만저희 팀 이름은 WE LIKE 2 CODING입니다 ㅎㅎ 오류 해결하느라 밤늦게 노래들으면서 코딩을 하는데 빅뱅 - WE..
-
MSA) Spring Cloud Eureka에 FastAPI 서버를 Client로 등록하기SpringBoot 2024. 6. 1. 00:21
들어가며저희 팀이 계획한 기획에서 python을 활용하여 데이터 분석과 여러 데이터들을 가져와야할 것 같아MSA 구조의 팀 프로젝트를 수행하기 전에, 연습하고 해당 내용을 기록하고자 글을 작성했습니다. Python 기반의 백엔드 프레임워크를 Flask를 쓸지 FastAPI를 쓸지는 정확히 확정이 되진 않았지만,Flask는 작은 프로젝트에서 다뤄본 경험이 있기도 하고 FastAPI가 좋다고들 하는데 사용해보지는 않아서배워볼겸 FastAPI로 진행하고자 합니다. 적용한 내용을 보기 쉽게 그림으로 그려보았습니다. FastAPI를 설치하기 전에, 가상환경 세팅하기# 가상환경을 만들 디렉토리로 이동$ cd {directory}# 가상환경 만들기$ python3 -m venv {venv name}# 가상환경..
-
Kubernetes 특강 3회차 공부 내용 정리1 - Annotation, CronJobKubernetes 2024. 5. 20. 22:52
3회차는 분량이 많기도 하고, 내용이 많이 어렵게 느껴져서 공부하면서 조금씩 정리해 보려고 합니다. 🥲🥲🥲 📚 Annotationk8s에서 Annotation은 Pod, Deployment, Service 등과 같은 오브젝트에 대한 부가적인 정보를 추가로 제공하기 위한 메커니즘입니다. 📖 Label vs Annotation개인적으로, 강의 초반부터 언급되었던 레이블이 생각이 나면서 어노테이션의 개념과 약간 혼동이 되었으나,아래 문장을 보고 정리가 되었던 것 같습니다.Labels are for Kubernetes, while annotations are for humans. k8s에서 Label레이블은 관련 리소스 그룹을 필터링하여 식별하기 위해 Selector와 함께 사용됩니다.예를 들어, ..