Table of Contents
Tomcat 대체물 Undertow
장단점
Tomcat
-
가장 많이 사용되고 있다.
-
Spring Boot 디폴트 내장 WAS
-
구시대유물
Undertow
- 대규모 트래픽에서 Tomcat 보다 안정적이라는 평가
Undertow 설치하기
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web') {
exclude module: 'spring-boot-starter-tomcat'
}
implementation('org.springframework.boot:spring-boot-starter-undertow')
}
Undertow 설정
server:
undertow:
threads:
io: 8
worker: 200
server.undertow.threads.io
I/O Thread 수
CPU Core 수의 두배가 적당하다고 한다.
server.undertow.threads.worker
Worker Thread 수
적정한 수는 없다고 한다.
톰캣의 max-threads 수는 256 이다.
Undertow 변경시 주의사항
- JSP 를 사용할 수 없다.