The background of this question is stemming from an article about someone who operates a website that is powered by a solar panel and the carbon footprint that we produce in the software space. Data centers use around 2% of the world's energy. It's made me think a bit further about what I can do as an engineer to be a bit greener.
An example that comes to mind was Etsy upgrading from PHP 5 to PHP 7. With the efficiency improvements, they were able to turn off 80%+ of their app servers.
I have been a huge fan of JAMStack websites of late (where the site itself is static using something like Vue/React and all dynamic content is pulled via an API). I've also been building most of my APIs in go which is a TON more efficient than PHP/Node. I'm trying to be language agnostic here, but that's obviously a factor.
My question is then, from energy (CPU utilization?) perspective is it more efficient to generate the markup on the server, or to do so client-side. I know page caching would improve this server-side, but if these views are dyamic (logged in) then caching the page will be useless.
I know servers aren't particularly efficient at generating markup and I couldn't find any concrete answers as to what is the best from an energy perspective.