Are there any rules of thumb or any general tips for designing a scalable, high performance web app? Especially on the architecture. For example, how to separate out the front-end from the back-end (if at all)? My main interest is in Python, but any general advice will definitely help.

Thanks