Thanks for adding the nsstats feature for average time saved with caching. I will have to check it out
I found that the proc ad_canonical_server_p found in server-cluster-procs.tcl, did not work for us as we are using https (port 443). Included below is a diff of how I made it work. Feel fee to modify as needed. Note: We use nsssl_v4 in our config.tcl
Thanks,
Marty
diff --git a/packages/acs-tcl/tcl/server-cluster-procs.tcl b/packages/acs-tcl/tcl/server-cluster-procs.tcl
index 5cafb058d..882bd562a 100644
--- a/packages/acs-tcl/tcl/server-cluster-procs.tcl
+++ b/packages/acs-tcl/tcl/server-cluster-procs.tcl
@@ -120,13 +120,26 @@ ad_proc -private ad_canonical_server_p {} {
set canonical_ip $canonical_server
}
- set driver_section [ns_driversection -driver nssock]
+ if { $canonical_port eq "443" } {
+ set driver_section [ns_driversection -driver nsssl_v6]
+ } else {
+ set driver_section [ns_driversection -driver nssock_v6]
+ }
+
+ if { $driver_section eq "" && $canonical_port eq "443" } {
+ set driver_section [ns_driversection -driver nsssl_v4]
+ } else {
+ set driver_section [ns_driversection -driver nssock_v4]
+ }
+
if { [ns_config $driver_section Address] == $canonical_ip
- && [ns_config $driver_section Port 80] == $canonical_port
+ && [ns_config $driver_section Port] == $canonical_port
} {
+ ns_log notice "Is CanonicalServer"
return 1
}
+ ns_log notice "Not CanonicalServer"
return 0
}