Tomcat 6.x: Cluster Basic Checkpoints
- ทุกๆ Session attribute ต้อง implement “
java.io.Serializable“
- เอา comment (“<!– Comment –>”) ของแท็ก
Cluster ใน server.xml ออก
- หากมีการเปลี่ยนหรือต้องการกำหนดค่า Valve สำหรับ
Cluster ต้องแต่ใจว่า ReplicationValve ต้องประกาศภายใต้แท็ก Cluster ใน server.xml
- ถ้า instance (ของ tomcat หรือ tomcat node หรือ node) ทำงานอยู่ในเครื่องเดียวกัน ก็ต้องให้แน่ใจว่าค่าในแอททริบิวต์
port (ในแท็ก Cluster) ไม่ซ้ำกัน ซึ่ง tomcat เองก็ฉลาดพอที่จะ resolve เองได้ โดยที่หา port ที่อยู่ในช่วงระหว่าง 4000 – 4100
- อย่าลืมใส่ <distributable/> ใน
web.xml ของ application
- ถ้าใช้
mod_jk ก็ให้ใส่ค่าในแอททริบิวต์ jvmRoute ในแท็ก Engine เป็นค่า worker name ในไฟล์ workers.properties
- ต้องแน่ใจว่าทุก node มีเวลาในเครื่องเป็นเวลาเดียวกัน หรือ sync กับ NTP เดียวกัน
- แน่ใจว่า Load Balancer กำหนดค่าเป็น sticky session โหมด
This entry was posted
on Monday, February 22nd, 2010 at 10:55 and is filed under Projects.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a Reply