Section 1: Service Discovery - KwangtaekJung/MSA-SpringCloud-user-service GitHub Wiki
Section 1: Service Discovery
: ์ธ๋ถ์ ์๋น์ค๋ค์ด Microservice๋ฅผ ์ฐพ์ ์ ์๋๋ก ํด์ฃผ๋ ๊ฒ.
- Spring Cloud Netflix Eureka
- Eureka Service Discovery - ํ๋ก์ ํธ ์์ฑ
- User Service = ํ๋ก์ ํธ ์์ฑ
- User Service - ๋ฑ๋ก
- ๋ช
๋ น์ด๋ก ์คํํ๊ธฐ
$ ./mvnw spring-boot:run -Dspring-boot.run.jvmArguments='-Dserver.port=9003'
- ๋ช
๋ น์ด๋ก cleanํ๊ณ ์ฌ๋น๋ ํ ์คํํ๊ธฐ
$ ./mvnw clean $ ./mvnw compile package $ java -jar -Dserver.port=9004 ./target/user-service-0.0.1-SNAPSHOT.jar =>java -jar๋ฅผ ์ด์ฉํด์ ์คํํ๋ ๊ฒ๋ ๊ฐ๋ฅํจ.
- ๋ช
๋ น์ด๋ก ์คํํ๊ธฐ
- User Service - Load Balancer
์ฐธ๊ณ ์ฌ์ดํธ
- [Spring Cloud] Service Discover Server๋ก Netflix Eureka ์ด์ฉํ๊ธฐ: https://wonit.tistory.com/495