The most interesting approach, the sort of holy grail if you will, is to write your code as a single application, and then the system figures out how to distribute it if/when needed. ServiceWeaver is this concept in Go
Reddit "critiquing" ServiceWeaver: https://www.reddit.com/r/programming/comments/1962avu/a_goog...