The most import tuning point of Tomcat is connection pool, because most service failures come between WAS and DBMS. Furthermore, tuning connection pool has the biggest impact on increasing WAS throughput. Tomcat has changed it's connection pool implementation from Apache DBCP to internal connection pool. (From Tomcat 7 both options are available) You can check … Continue reading Tuning Connection Pool for production system
Category: Tomcat
Tomcat sticky session
Common web architecture is Web - WAS - (DB). For example, Apache as Web Server and Tomcat as WAS. In this case, mod_jk is is used to connect from Apache to Tomcat. The following is Web to WAS load balancing architecture. With this architecture, multiple http request is sent to Tomcat#1 and Tomcat#2 in round … Continue reading Tomcat sticky session
Tips on customizing session manager
Tomcat internal cluster session manager can be used on a test system, but it has performance issue on a production system. (The problem of Tomcat session cluster) From my benchmark test, total TPS saturated from 3 instances. (It depends on H/W spec and business logic) Therefore I needed to make a custom session manager which … Continue reading Tips on customizing session manager
About Tomcat’s default session manager
Tomcat's default session manager is "StandardManager". (org.apache.catalina.session.StandardManager) Without specific setting, StandardManager manages session data. Class hierarchy All session manager must implement Manager interface. (Cluster manager also implements Manager) How StandardManager works? Usually, you create session as follows. What happens inside this code? HttpServletRequest.getSession() -> ApplicationHttpRequest.getSession() -> ManagerBase.createSession() -> StandardSession.setId() -> StandManager.add() Except HttpServletRequest, all … Continue reading About Tomcat’s default session manager
The problem of Tomcat session cluster
Some people said that Tomcat session cluster is not fit for high traffic web services. So I did performance test. (both DeltaManager and BackupManager) An ideal cluster is whose total TPS shows linear graph. But Tomcat session cluster showed log graph. (it's coefficient is dependent on usage pattern) I analyzed why it happened. The following … Continue reading The problem of Tomcat session cluster
About Tomcat session cluster
Servlet session on Tomcat is managed by "Tomcat manager". There are 3 kinds of session manager. Default manager (StandardManager) Delta manager Backup manager Default manager (StandardManager) is non clustered session manager. That is, sessions are not shared between Tomcat instances. Without specific setting, default manager is used when we use servlet session api. Delta manager … Continue reading About Tomcat session cluster