Re: Load Balancing issues
Russ, Where can I find information on either of these? I'm using a hardware load balancer and we've been fiddling with the Affinity settings but nothings working better than 70% of the time (while both servers are up). I'm supposing these are Enterprise-only features? Also you can set up the loadbalancer to do sticky sessions (You can do this in coldfusion as well). This won't prevent people from losing their session if one of the servers fails, but it will send them to the same server as long as both servers are up. Russ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231260 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
The load balancer has to specifically support sticky sessions. I think it does this via some sort of cookie, but I'm not entirely sure. If you have clustering in coldfusion with session replication enabled, then you can also set the load balancing algorithm to either enable sticky session in JRUn proxy (which handles the connection from IIS or apache), or not enable them. If you do enable them, it used the JSESSIONID (which must be enabled for this to work) to send the request to the proper server. If you don't have sticky sessions enabled, it won't necessarily go to the same server, but it won't matter since sessions are replicated (session CFC's are currently not replicated, but I believe all other variables are). Now, session replication in CF is enterprise only, but I've been able to get it to work with CF7 Standard. This is not documented or supported by Macromedia AFAIK, but I don't think it's against the EULA. I am planning to write an article on it sometime soon. Look for it in the next few issues of Fusion Authority. Russ -Original Message- From: Tony Hicks [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 11:35 AM To: CF-Talk Subject: Re: Load Balancing issues Russ, Where can I find information on either of these? I'm using a hardware load balancer and we've been fiddling with the Affinity settings but nothings working better than 70% of the time (while both servers are up). I'm supposing these are Enterprise-only features? Also you can set up the loadbalancer to do sticky sessions (You can do this in coldfusion as well). This won't prevent people from losing their session if one of the servers fails, but it will send them to the same server as long as both servers are up. Russ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231264 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Load Balancing issues
On 2/3/06, Russ [EMAIL PROTECTED] wrote: The load balancer has to specifically support sticky sessions. I think it does this via some sort of cookie, but I'm not entirely sure. Yes, depending on your HWLB device, it can set a cookie, go by IP address or segment, URL params, etc., aka, literally anything that can be used to identify the end-user. Smart ones will use a combination of these tricks. Now, session replication in CF is enterprise only, but I've been able to get it to work with CF7 Standard. This is not documented or supported by Macromedia AFAIK, but I don't think it's against the EULA. I am planning to write an article on it sometime soon. Look for it in the next few issues of Fusion Authority. You've peaked my interest. I'm wondering how it would be possible... of course there are always workarounds like client variables (yuck!) or other DB storage mechanisms, and at one point i'd thought up a plan to allow web service session lookups between servers. In any event, I'd love to hear what you've got. :) -nathan strutz http://www.dopefly.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231268 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
Down these lines, does anyone have a recommendation for a good hardware load balancer? Doesn't have to be top of the line or have a ton of features. Just something reliable with decent features at a good price. John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -Original Message- From: Nathan Strutz [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:50 PM To: CF-Talk Subject: Re: Load Balancing issues On 2/3/06, Russ [EMAIL PROTECTED] wrote: The load balancer has to specifically support sticky sessions. I think it does this via some sort of cookie, but I'm not entirely sure. Yes, depending on your HWLB device, it can set a cookie, go by IP address or segment, URL params, etc., aka, literally anything that can be used to identify the end-user. Smart ones will use a combination of these tricks. Now, session replication in CF is enterprise only, but I've been able to get it to work with CF7 Standard. This is not documented or supported by Macromedia AFAIK, but I don't think it's against the EULA. I am planning to write an article on it sometime soon. Look for it in the next few issues of Fusion Authority. You've peaked my interest. I'm wondering how it would be possible... of course there are always workarounds like client variables (yuck!) or other DB storage mechanisms, and at one point i'd thought up a plan to allow web service session lookups between servers. In any event, I'd love to hear what you've got. :) -nathan strutz http://www.dopefly.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231269 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
We're using ServerIronXL in a shared environment managed by the hosting company. BigIp F5 is also supposed to be pretty good. Personally, I've never managed a loadbalancer, but if I had to go with the cheapest solution, I would roll my own using LVS. There is enough customization to allow you to do what you want. Also the latest version of apache allows it to be used as a loadbalancer. I haven't tested it yet, and I don't know if it supports sticky sessions, but it might very well be possible. Russ -Original Message- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:53 PM To: CF-Talk Subject: RE: Load Balancing issues Down these lines, does anyone have a recommendation for a good hardware load balancer? Doesn't have to be top of the line or have a ton of features. Just something reliable with decent features at a good price. John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -Original Message- From: Nathan Strutz [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:50 PM To: CF-Talk Subject: Re: Load Balancing issues On 2/3/06, Russ [EMAIL PROTECTED] wrote: The load balancer has to specifically support sticky sessions. I think it does this via some sort of cookie, but I'm not entirely sure. Yes, depending on your HWLB device, it can set a cookie, go by IP address or segment, URL params, etc., aka, literally anything that can be used to identify the end-user. Smart ones will use a combination of these tricks. Now, session replication in CF is enterprise only, but I've been able to get it to work with CF7 Standard. This is not documented or supported by Macromedia AFAIK, but I don't think it's against the EULA. I am planning to write an article on it sometime soon. Look for it in the next few issues of Fusion Authority. You've peaked my interest. I'm wondering how it would be possible... of course there are always workarounds like client variables (yuck!) or other DB storage mechanisms, and at one point i'd thought up a plan to allow web service session lookups between servers. In any event, I'd love to hear what you've got. :) -nathan strutz http://www.dopefly.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231272 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
Russ's 2 suggestions are excellent. ServerIron and BigIP. Both can be found for a steal on ebay quite a bit. If your on a budget stick with the ServerIron searches unless you want an old 4u BigIp. Emmet -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 2:02 PM To: CF-Talk Subject: RE: Load Balancing issues We're using ServerIronXL in a shared environment managed by the hosting company. BigIp F5 is also supposed to be pretty good. Personally, I've never managed a loadbalancer, but if I had to go with the cheapest solution, I would roll my own using LVS. There is enough customization to allow you to do what you want. Also the latest version of apache allows it to be used as a loadbalancer. I haven't tested it yet, and I don't know if it supports sticky sessions, but it might very well be possible. Russ -Original Message- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:53 PM To: CF-Talk Subject: RE: Load Balancing issues Down these lines, does anyone have a recommendation for a good hardware load balancer? Doesn't have to be top of the line or have a ton of features. Just something reliable with decent features at a good price. John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -Original Message- From: Nathan Strutz [mailto:[EMAIL PROTECTED] Sent: Friday, February 03, 2006 1:50 PM To: CF-Talk Subject: Re: Load Balancing issues On 2/3/06, Russ [EMAIL PROTECTED] wrote: The load balancer has to specifically support sticky sessions. I think it does this via some sort of cookie, but I'm not entirely sure. Yes, depending on your HWLB device, it can set a cookie, go by IP address or segment, URL params, etc., aka, literally anything that can be used to identify the end-user. Smart ones will use a combination of these tricks. Now, session replication in CF is enterprise only, but I've been able to get it to work with CF7 Standard. This is not documented or supported by Macromedia AFAIK, but I don't think it's against the EULA. I am planning to write an article on it sometime soon. Look for it in the next few issues of Fusion Authority. You've peaked my interest. I'm wondering how it would be possible... of course there are always workarounds like client variables (yuck!) or other DB storage mechanisms, and at one point i'd thought up a plan to allow web service session lookups between servers. In any event, I'd love to hear what you've got. :) -nathan strutz http://www.dopefly.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231281 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Load Balancing issues
On 2/1/06, Tony Hicks [EMAIL PROTECTED] wrote: I had an application that worked very well on one server, but growth required we move to a larger server arrangement with two web servers. Of course the servers couldn't share memory so session variables no longer really worked. I implemented client variables and the scope request.session. As I understand it.. all that is required for this to work is at the beginning of the application, I should create request.session scope and load it with data from the client.session scope via WDDX. I've done this -- it can be a performance dog on the individual server, but it does allow for cheap scaling out with N servers. I'd honestly think about buying a low-end load-balancer with sticky sessions and seeing if distributing the load that way helps. But that's another topic... From that point, I can read client.session with no need for scoping. The site works perfectly, except when the load balancer presents a different server. The user is logged out and loses all session data. Oh, my application uses site_storage (a dsn) as a client store and it on an SSL connection. (A secure cert for each server). What am I missing? I'd check to make sure that in your cfapplication tag that you're using *domain* cookies (setDomainCookies=true). Otherwise, the client cookie is stored for the particular web server (eg web01.domain.com vs web02.domain.com) -- John Paul Ashenfelter CTO/Transitionpoint (blog) http://www.ashenfelter.com (email) [EMAIL PROTECTED] ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231070 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
If you have CF7, you can do session sharing between the servers... -Original Message- From: John Paul Ashenfelter [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 10:48 PM To: CF-Talk Subject: Re: Load Balancing issues On 2/1/06, Tony Hicks [EMAIL PROTECTED] wrote: I had an application that worked very well on one server, but growth required we move to a larger server arrangement with two web servers. Of course the servers couldn't share memory so session variables no longer really worked. I implemented client variables and the scope request.session. As I understand it.. all that is required for this to work is at the beginning of the application, I should create request.session scope and load it with data from the client.session scope via WDDX. I've done this -- it can be a performance dog on the individual server, but it does allow for cheap scaling out with N servers. I'd honestly think about buying a low-end load-balancer with sticky sessions and seeing if distributing the load that way helps. But that's another topic... From that point, I can read client.session with no need for scoping. The site works perfectly, except when the load balancer presents a different server. The user is logged out and loses all session data. Oh, my application uses site_storage (a dsn) as a client store and it on an SSL connection. (A secure cert for each server). What am I missing? I'd check to make sure that in your cfapplication tag that you're using *domain* cookies (setDomainCookies=true). Otherwise, the client cookie is stored for the particular web server (eg web01.domain.com vs web02.domain.com) -- John Paul Ashenfelter CTO/Transitionpoint (blog) http://www.ashenfelter.com (email) [EMAIL PROTECTED] ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231071 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Load Balancing issues
Also you can set up the loadbalancer to do sticky sessions (You can do this in coldfusion as well). This won't prevent people from losing their session if one of the servers fails, but it will send them to the same server as long as both servers are up. Russ -Original Message- From: Tony Hicks [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 9:11 PM To: CF-Talk Subject: Load Balancing issues I had an application that worked very well on one server, but growth required we move to a larger server arrangement with two web servers. Of course the servers couldn't share memory so session variables no longer really worked. I implemented client variables and the scope request.session. As I understand it.. all that is required for this to work is at the beginning of the application, I should create request.session scope and load it with data from the client.session scope via WDDX. From that point, I can read client.session with no need for scoping. At the end of the page request, I need to copy the contents of request.session to client.session via WDDX. CFLOCATION can also throw a kink in it.. so I created cf_location which works identically but before the relocation, it copies from request.session to client.session via wddx.. The site works perfectly, except when the load balancer presents a different server. The user is logged out and loses all session data. Oh, my application uses site_storage (a dsn) as a client store and it on an SSL connection. (A secure cert for each server). What am I missing? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231072 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54