Skip to content
Browse files

updated configuration example.

Minor changes to spawn_backends hook.
  • Loading branch information...
1 parent 03bf5f7 commit 8719f148d9d2dd003959353b4931b4159cbe6669 @victori committed May 4, 2010
Showing with 10 additions and 5 deletions.
  1. +6 −2 lib/Perlbal/Plugin/StickySessions.pm
  2. +4 −3 sample/perlbal.conf
View
8 lib/Perlbal/Plugin/StickySessions.pm
@@ -223,9 +223,13 @@ sub register {
# can't create more than this, assuming one pending connect per node
my $max_creatable = $pool ? ($self->{pool}->node_count - $self->{pending_connect_count}) : 1;
$to_create = $max_creatable if $to_create > $max_creatable;
+
+ if ($pool) {
+ $to_create = $self->{pool}->node_count * 3 if $to_create < $self->{pool}->node_count * 3
+ }
- # cap number of attempted connects at once
- $to_create = 10 if $to_create > 10;
+ # We are not worried about the limit since we need connections pooled.
+ #$to_create = 10 if $to_create > 10;
my $now = time;
View
7 sample/perlbal.conf
@@ -34,10 +34,11 @@ CREATE SERVICE balancer
SET error_retry_schedule = 0,.25,.25,.25,.25
SET always_trusted = true
SET backend_persist_cache = 4
- SET connect_ahead = 1
+# Do have a good number of backends pooled.
+ SET connect_ahead = 10
SET enable_reproxy = true
- SET verify_backend = on
- SET verify_backend_path = /up.html
+# SET verify_backend = on
+# SET verify_backend_path = /up.html
SET plugins = stats,stickysessions
ENABLE balancer

0 comments on commit 8719f14

Please sign in to comment.
Something went wrong with that request. Please try again.