Tag Archives: riverbed

Scripting the Zeus/Stingray API

So you are digging the Joyent API, you have your provisioning working with your Chef or Puppet Scripts. Here is a shell script you can use to add that new box to your Stingray load balancer. #!/bin/bash zxtm=localhost /opt/zeus/zxtm/bin/zcli << EOF Pool.addPool [“JoyentDemo”],[[“help.joyent.com:80″,”joyent.com:80″,”wiki.joyent.com:80″]] Pool.setLoadBalancingAlgorithm [“JoyentDemo”], roundrobin Pool.setPassiveMonitoring [“JoyentDemo”], 0 Pool.setMonitors [“JoyentDemo”], “Full HTTP” Pool.setKeepalive [“JoyentDemo”], […]

Posted in Foundations, Technology | Tagged as: , , , | Leave a comment

Load Balance by domain name

Wrote this little bit of TrafficScript for some clients today and published to the Joyent wiki. I think it’s pretty readable. $hostHeader = http.getHostHeader(); if( $hostHeader == “domain.com” || $hostHeader == “www.domain.com”){ pool.select( “domain.com-pool” ); } else if( $hostHeader == “another-domain.com” ){ pool.select( “another-domain.com-pool” ); Enjoy

Posted in Foundations, Technology | Tagged as: , , | Leave a comment