Apache + mod_jk 연동시 Apache를 통해서 접근할 때는 flush 기능이 정상적으로 동작되지 않는 문제가 있음.
한참을 찾아서, mod_jk 옵션 문제라는 것을 알았다.
mod_jk 옵션에 다음의 옵션을 추가해야 flush 기능이 정상적으로 동작함.
JkOptions +FlushPackets
헤더까지 바로 전송하고 싶은 경우는
JkOptions +FlushHeader
옵션을 추가해 주면 됨.
아래는 tomcat connector에 나와 있는 옵션의 설명.
JkOptions FlushPackets, you ask mod_jk to flush Apache's connection buffer after each AJP packet chunk received from Tomcat. This option can have a strong performance penalty for Apache and Tomcat as writes are performed more often than would normally be required (ie: at the end of each response).
JkOptions +FlushPackets
JkOptions FlushHeader, you ask mod_jk to flush Apache's connection buffer after the response headers have been received from Tomcat.
JkOptions +FlushHeader


Comments