
로드 밸런싱 : 트래픽을 여러 서버로 고르게 분산시켜 성능을 최적화하는 기술
dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
implementation 'org.springframework.boot:spring-boot-starter-web'
}
package com.example.eurekaserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer
public class EurekaServerApplication {
public static void main(String[] args) {
SpringApplication.run(EurekaServerApplication.class, args);
}
}
server:
port: 8761 # Eureka 서버의 기본 포트
eureka:
client:
register-with-eureka: false # 자기 자신을 Eureka에 등록하지 않음
fetch-registry: false # 레지스트리를 가져오지 않음
server:
enable-self-preservation: false # 자기 보호 모드 비활성화 (개발 중에만 사용)