Keep all your code in one repo, deploy that codebase to multiple servers, but have it acting in different capacities.
1 email server, 5 app servers dishing out html, 2 api servers
Etc
It works very well and was able to handle spikes of traffic during super bowl ads without any problems.