Best Architecture for no downtime on migrate and js build

Hi,
I was wondering how can i change my architecture in order to maintain availability even on migration.
Does it work if a set up a master slave arch ? if yes this solve my problem only for db migration but in order to maintain availability on js build i have to set up load balancer that split requests between two instances right ?
what is the best way to set up such architecture ? do you have some step by step tutorial or advices ?

Thanks a lot for this great framework !