capistrano 3에 배포 정책 (groups, sequence, parallel) 이 있다.


groups는 그룹단위로 병렬 배포를 할 수 있다. limit과 wait를 활용하여 배포할 수 있어서 서버가 많은 경우에 효과적이다.

sequence는 한대씩 배포하는 경우이다. 서버가 적은 경우 (3개 미만)일 때 효과적이다.

parallel은 동시에 배포하는 경우이다. 유틸리티나 스크립트 실행시 효과적일 수 있다. 


http://capistranorb.com/2013/06/01/release-announcement.html


# Capistrano 3.0.x
    on :all, in: :groups, limit: 3, wait: 5 do
      # Take all servers, in groups of three which execute in parallel
      # wait five seconds between groups of servers.
      # This is perfect for rolling restarts
    end

    on :all, in: :sequence, wait: 15 do
      # This takes all servers, in sequence and waits 15 seconds between
      # each server, this might be perfect if you are afraid about
      # overloading a shared resource, or want to defer the asset compilation
      # over your cluster owing to worries about load
    end

    on :all, in: :parallel do
      # This will simply try and execute the commands contained within
      # the block in parallel on all servers. This might be perfect for kicking
      # off something like a Git checkout or similar.
    end


Posted by '김용환'
,