책/스프링으로 하는 마이크로서비스 구축
-
24년 기준 수정해야되는 부분책/스프링으로 하는 마이크로서비스 구축 2023. 12. 23. 19:27
따라하기 종류의 책들은 시간이 지나면서 버전 때문에 문제가 생겨서 선호하지 않지만 이 책 구성이 마음에 들어서 차근차근 해보고 있습니다. 혹시나 이 책으로 공부하려는 다른 분들에게 도움이 될까하여 기록으로 남겨봅니다. (시작 부분의 내용이 이 글의 가장 아래쪽에 위치하고 있습니다.) Chapter06 - 영속성 추가 m1 관련 이슈가 있어서 docker-compose.yml을 아래와 같이 변경하였습니다. version: "2.1" services: product: build: microservices/product-service mem_limit: 350m environment: - SPRING_PROFILES_ACTIVE=docker depends_on: - mongodb recommendation: ..
-
도커에서 자바를 실행할 때의 문제책/스프링으로 하는 마이크로서비스 구축 2023. 12. 20. 17:17
예전 자바 버전에서는 도커 컨테이너에 할당된 리소스 제약을 무시하고 도커 호스트의 전체 자원을 할당하는 이슈가 있었습니다. 도커와 로컬의 비교, 그리고 자바 버전별로 리소스 사용을 비교해보겠습니다. 1. 도커 없이 자바 커맨드 실행 현재 로컬 컴퓨터에서 사용가능한 리소스들을 측정해보겠습니다. 컴퓨터의 하드웨어를 살펴보면 8core를 사용할 수 있고, 메모리는 16GB 입니다. 1) 코어 먼저 사용가능한 코어 숫자를 확인해 봅니다. $ echo 'Runtime.getRuntime().availableProcessors()' | jshell -q Hardware Overview에서 보여주는 core 숫자와 일치하는 것을 확인할 수 있습니다. 2) 최대 힙 사이즈 이번에는 최대 힙 사이즈를 확인해보겠습니다. ..