Hi all
    I have some question about Haproxy that we are teting.  We want to
loadbance disk cache of  huge image application.  Haproxy provide a
consistent hash for backend.
   As we know haproxy's backup server  can not config for main server
1 vs 1 .  If an image cache server is down,  Consistent hash  also
cause  image cache server rebuilding cache.
  It is dangerous because robust image cache rebuilding, storage
server can not accept the fact.
  So haproxy can provide a pool based hash ?  such as:
===orgin===
backend image-cache-server-end
       mode             http
       balance uri
       hash-type  consistent    
       option allbackups        
       server webA 127.0.0.1:8081 check inter 1000
       server webB 127.0.0.2:8081 check inter 1000
       server webC 127.0.0.3:8081 check inter 1000 backup
       server webD 127.0.0.4:8081 check inter 1000 backup

====my suggest====

serversdefine  image-farm-pool1
          option allbackups   #define every server provide service in the pool
          server 127.0.0.1:8081 check inter 1000
          server 127.0.0.2:8081 check inter 1000 backup
          server 127.0.0.3:8081 check inter 1000 backup

serversdefine  image-farm-pool2
          option allbackups
          server 127.0.0.4:8081 check inter 1000
          server 127.0.0.5:8081 check inter 1000 backup
          server 127.0.0.6:8081 check inter 1000 backup

serversdefine  image-farm-pool3
          option allbackups
          server 127.0.0.7:8081 check inter 1000
          server 127.0.0.8:8081 check inter 1000 backup
          server 127.0.0.9:8081 check inter 1000 backup

backend image-cache-server-end
       mode             http
       balance uri
       hash-type  consistent    #just only for servers hash.
       option allbackups        
       servers image-farm-pool1
       servers image-farm-pool2
       servers image-farm-pool3

If haproxy provide such as configure.  We can  build a reliable disk
cache for huge image cache cluster.

Leon

Reply via email to