I recently stumbled upon an interesting blockchain project: Akash Network (GitHub). In simplest terms, Akash is a decentralized cloud computing marketplace. This short article documents the process of deploying my personal site using Akash, comparisons with other cloud providers, and some thoughts on the future of Akash.
4 Simple steps to deploy a website on Akash
- Build your website and containerize
- Buy some $AKT and fund deployment wallet
- Run a few commands from your machine
- ??? Profit
In all seriousness, these were really the only 3 steps required to launch a basic website. No logins, no complex billing, no need to specify 10+ nitty gritty details, then do 5 different tasks before hosting(hint hint, AWS). What follows is a more in depth description of each step:
Building the website and containerizing — This should be something familiar to any web or app developer. For this, I used Tom Beynon’s personal site as a template, and simply modified some parameters. Just changing the variables in one html file for this project is enough web-dev for an entire year for me (sincerely respect all web developers out there..). After building the html + css files, simply use a Dockerfile with nginx to containerize the website! Here is a pretty good guide for those who wanna learn to do this themselves.
Buy $AKT and fund deployment wallet — This is the first and probably only mention of $AKT, the token used for transactions, governance and more on the Akash network. Will not talk much about it, here is a great article that shares more about the token. $AKT is available on a few exchanges, I personally used bitmax. Just fund it with some BTC or USDT, trade it for AKT and transfer it to your deployment wallet address. The wallet address is can be obtained from the next step, setting up Akash and deploying.
Setup Akash and deployment — In this step, I simply followed a guide from Tom once again. The official guide is also available from the Akash Docs. The main steps involved here would be creating a deployment wallet, with the encrypted keys stored in a local folder on your machine. Next, set pricing and compute resources required. Lastly, just run a few commands to create a bid and eventually deploy the application. In all, this took me just a few hours (mostly fiddling with the first step lol…) to complete.
Thoughts on overall deployment experience
After deployment, we can see the uri that the app is hosted on. My personal site can be found on the base Akash uri here, and also at https://yeeyangtee.com where I used CloudFlare CNAME and SSL. On the whole, the entire deployment process was seriously simple and streamlined. Documentation was surprisingly good and comprehensive for a project that launched its main-net less than 2 weeks ago (at time of writing this article). Any gaps on documentation or user (me) stupidity were also quickly handled by the awesome Akash Dev team on their discord server.
I set my deployment to the cheapest possible pricing — 1uakt per block. At an average block time of 6 seconds, that’s just 86400 * 30 * 10e-6 / 6 = 0.432 AKT per month. At current market price (of writing), that is around 2 USD for a completely independent hosting each month! If we consider alternatives from AWS such as Fargate or EC2 instances, this is roughly a 5 to 8x cost saving. Furthermore, the Akash team is working on further fractional pricing, which could bring the cheapest price to below 1uakt per block. However, we have to keep in mind that the AKT token price could vary and other factors such as market forces could impact the deployment cost. Hence this number is just an estimate of current costs.
What I’m excited for on Akash
Apart from feeling cool to host whatever you want on possibly a stranger’s server halfway across the world, then paying for it using programmable money, there are many other things about Akash that I’m excited to see! As a deep learning practitioner/researcher, one thing I face in the day-to-day is extreme swings in compute workloads.
Massive training workloads(think weeks of single-GPU time) are needed occasionally in my work, which mean that multi-GPU setups are required unless you enjoy staring at GPU fans. Even if researchers have access to multi-GPU setups at our institutes, it can still be insufficient at times so it is common to turn to cloud solutions such as AWS and GCP. On the other hand, there is a whole bunch of downtime where these physical setups are only partially used for days or weeks. Akash could potentially come in as a way for DL/ML research institutes to lease out underutilized compute during downtimes, and use the earned income to purchase compute when high workloads are needed!
All in all, was a fun experience to go through my first blockchain-enabled deployment. Looking forward to work on other applications that are more interesting and hosting them on Akash. Check out a whole list of cool projects others built for Akash at: https://github.com/ovrclk/awesome-akash. Some interesting projects are games like Super Mario, Snake or DEFI frontends.