This blog, matigo.ca, has been online almost continuously since October 19, 2006. First under a terrible dyn-dns domain, then japanadian.net, then j2fi.net, then jasonirwin.ca, and finally here. In that time over 2,600 blog posts have been published and a host of other post types have also been added and made available. On an average day there are roughly 24,500 pages served to 3,700-odd visitors and a handful of search engines. With the average page being served in 0.18 seconds, this means my site sees just over an hour of work every day. For the other 23-odd hours it is just sitting around and waiting for someone to stop by. As someone who pays for a server to run 24 hours a day, 7 days a week, this can seem both silly and wasteful. Why wouldn't a price-sensitive or cost-conscious individual want to go with a hosted solution? Not only would it be cheaper, but it would be a better use of resources. In a world where people are actively trying to reduce their energy consumption, this seems like a logical choice. However, when it comes to digital sovereignty or just wanting to have more control over a website, is it the only choice?
This is something I've been thinking about over the last few weeks as I continue work on 10Cv5, the next big update to my publishing platform that will hopefully encourage people to consider saving words and images to their own site before sharing them with closed systems such as Twitter and Medium. Fortunately for me, the servers I have 10Centuries running on see anywhere between 3.8 and 113.2 requests per second every day of the week. There are hundreds of websites with thousands of posts and millions of links that are in demand. The average independent blogger, however, does not need to have a server (or collection of servers) operating every second of every day. The reason we do this is because "that's how it's always been" since the dawn of the Internet. A computer somewhere is on, idle, and waiting.
There must be a more ecologically responsible way of doing this.
An idea I've been kicking around in my head involves the concept of "serverless computing". This is essentially using the cloud to host code that only runs when someone specifically requests it. Serverless providers such as Amazon, Microsoft, and CloudFlare all have slightly different ways of doing this, but the end result is the same. You're only paying for the resources that are actually consumed. If a website has 100 visitors a day — which is true for many lesser-known blogs — then why pay for 24 hours of operation when you really only need 20~30 seconds of compute time?
So how would all of this work for a blog? It's pretty simple ... in principle.
Serverless code would be uploaded to a service. A domain would be pointed to the right location. A database and/or flat storage location would be set up to store the content. People would visit, and content would be served when requested. For people going "full Indieweb", things like WebMentions would be completely supported. For people using apps that make use of RESTful APIs, everything would run as expected. With the modern web, things are very much request based. Things only happen when you ask for them to happen.
Is this something that people would want, though? When people have asked me to help them set up a server for a website, I generally try to keep things simple. Nobody wants to hear about how to configure Apache or nginx, how to set up a SQL database, or what to type to install the software prerequisites. Fewer people want to hear me encourage they SSH into a server to apply regular software updates. Serverless could get around some of these issues by abstracting the details away, allowing a person to simply upload functions and open a browser.
Of course, I've been playing around with this idea myself, using Microsoft's Azure service. The idea has potential, and hosting 10C on a platform that can easily scale from 3.8 requests per second to 1000+ requests per second without needing to maintain a bunch of idle servers or spinning up VMs that need to first have their software updated before being added to a service pool would be nice. My costs of operation would remain the same but, for a person who is not hosting hundreds of sites for thousands of visitors to make hundreds of thousands of requests against, an incredible amount of money could be saved. Operating a website for $81 a year (not including the cost of a domain name) is incredibly attractive. Add to that the "green cred" of having a website that uses only the resources it needs and not an iota more, and the merits shine further.
Would people find value in this, though? Or am I once again thinking of a tool for a market that simply does not exist?
- this cost was calculated using Microsoft's Azure serverless offerings, flat files to store content, and an average of 1000 page loads a day for one year. ↩