I have a PHP application running on an AWS auto-scale group that uses sticky sessions behind an AWS ELB.
When running CodeDeploy against these machines to release, CodeDeploy will initially delete the files before replacing them with the new ones. However, during that short period of time, all web requests hitting the servers will receive 404s or 500 server errors due to the files not all being there.
Connection draining and pulling the servers out of the pool won't work due to sticky sessioning as we'd be logging the users out of the system when we pulled a server out of the pool.
I've considered code deploying to a new directory in the file system and rsyncing over, but I think that would only partially solve the problem since rsync isn't instantaneous either.
Is there an option for sticky sessioned servers like this to see a seamless deploy?