WAR, embedded Tomcat và configuration ownership
Deployment model quyết định ai sở hữu Tomcat version, classpath, config, rollout và process lifecycle.
Deployment
External container
WAR triển khai vào Host qua appBase/context descriptor/Manager tooling. Không chỉnh exploded app tại runtime; autoDeploy/deployOnStartup có operational và race trade-off. Context descriptor nên nằm ngoài artifact khi environment owns resources.
Embedded model
Executable JAR sở hữu container version và khởi tạo hierarchy bằng code. Spring Boot properties/customizers map vào connector/context nhưng effective configuration phải được inventory. Deploy process/image bất biến, externalize secrets/config và rollback artifact hoàn chỉnh.
Parallel deployment
Versioned context names cho phép nhiều version cùng context path; request mới đi version mới trong khi session cũ có thể bám version trước. Schema/session compatibility, routing và cleanup quyết định có an toàn hay không.
Configuration drift
Phân loại static image, environment config, secret và runtime flags. Validate effective ports, protocols, limits, valves, realms và JVM options ở startup; canary/rolling phải có readiness, rollback gate và config provenance.